Custom Google Map overlay? - google-maps

How can you use a custom tileset/overlay on a Google map, like was done here:
http://www.philaplace.org
That is pretty cool, and I would like to experiment with this.

There are a couple different ways to do it. One way is to create a GTileLayer object and implement the getTileURL() to return the URL pointing to your tiles.
But first you'll need an image that's cut properly in the tile format. For starters, I'd recommend you look at MapTiler: http://www.maptiler.org/ It will cut images for you AND generate a GoogleMap with the overlay.

You'll want to look at Google's Overlays (especially Custom Overlays) and Custom Map Types documentation for Version 3 of their Maps API.

Related

Google Maps iOS custom UIView instead of a marker

I'm looking for a way to use a custom UIView (not just a custom image) instead of default marker provided by Google Maps iOS SDK. Basically I need a possibility to place my UIView agains proper coordinates of the map, so not necessarily to use markers as they are, just any suitable solution. Any ideas?
There is not currently a way to do this. You can view the relevent feature request (and star it, to show interest) here: https://code.google.com/p/gmaps-api-issues/issues/detail?id=5203
The marker only shows an image. So it cannot take a CustomView. Moreover, if your custom view has some sort of button on it there is no way you can track the events from those button.
In simple words the map renders the markers as UIImage.

Georeferencing of image (like Google Floor Plans)

I have a building floor plan and I need to specify its position on top of google map.
I like the way this is done in Google Floor Plans app - screenshot(the right part with map) - but I cannot figure out how they made it! :)
What part in Google Maps API I should look at?
In short - I have an image (plan of floor), and need to show it on top of Google Map and be able to manipulate with it (changing dimensions on events).
I'm thinking you'll want to implement a custom overlay. That link provides the relevant instructions for doing so. Also, Google provides a simple example so you can see the result here. Is that sort of what you're going for?
#Cianan Sims: Well, sure, I want custom overlay, but how is the question :-)
Fortunately, Google published tool called Overlay Tiler, which does exactly what I wanted - georeferencing of the image.

Custom layer/overlay in google maps

Is it possible to create custom layers/overlays in google maps?
As an example, would it be possible to have one layer with polygons, another with circles, and a third with markers? and then hide/show these layers individually?
I tried looking at the documentation, but the layers seems to only be a fixed set of predefined layers. And overlays seems to only support image overlays.
Any help on this is appreciated.
I'm not sure if there exists a better way to do this, but I've found a workaround to a similar problem. My example utilizes markers and polylines, but it should be easy to extend the functionality to circles and polygons too.
Link to JSFiddle
Basically it works like this:
Initialize the map.
User selects an option what he would like to see on the map.
Click triggers a method (see HTML part of the fiddle) in the map object that first clears the map and then pushes new overlays on map.
The data that is currently shown on map is stored in arrays, and the map clearing method simply goes through these arrays and checks if there exists any content on map, and removes them if does.
Hope this helps. Cheers!

Convert google map v2 custom overlay to v3 custom overlay

I have been doing so much research and yet to find the exact answer to help me. I need to convert my map at http://www.uaf.edu/campusmap/ from V2 to V3 so I can try to combine it with my fusion tables. It uses tiles made by Map Tiler. Is there anyone who can help me out?
I guess you need to port the whole map to V3 and use Custom Map Types.
BTW, you're loading the API twice, once from http://www.uaf.edu/files/campusmap/ and then again from http://www.uaf.edu/files/campusmap/campusmap-122311.html -- which is loaded in an iframe. Probably better to remove one of them, I think you can get rid of the first one.
I think there are two main things you'll need to worry about when converting to v3:
GTileOverlay doesn't exist in v3. You can use Custom Map Types, as per the pp.
To do this, you'll want to make an ImageMapType (see the docs). You'll then need to add this to the Map.overlayMapTypes MVCArray (which will display it above the base map - Map reference).
There's nothing like GDownloadUrl and GXml for downloading and parsing an XML document in v3. You'll need to use a generic library like jQuery to help downloading your marker locations.

Google Maps: Traffic on top of Custom Map

I want to add traffic information to my custom map. Currently I'm using a Tile Layer Overlay on my Google Map to display custom map tiles. When I try to add GTrafficOverlay to my map, my custom map tiles display above the traffic information. Is there any way to display the traffic above my GTileLayerOverlay?
(Using the JavaScript api)
You should be able to do this in V3. Take a look at this sample: http://code.google.com/apis/maps/documentation/v3/overlays.html#ImageMapTypes
I tried this out and wasn't able to find a solution to the problem. There is nothing in the GTrafficOverlayOptions and I couldn't find anything in the references about the z-order of this stuff. I have suspect that this isn't possible.
Would love to see an alternative answer showing that I am wrong.