On Feb 16, 8:45 pm, Philip <[email protected]> wrote:
> The background is that I'm writing a custom map type that can be > overlayed on an existing map type. However, I need to convert the tile > coordinates into lat/lng. This needs a MapCanvasProjection object, but > they are hard to come by. There's a good explanation of how conversions work in V3 here: http://code.google.com/apis/maps/documentation/v3/overlays.html#CustomMapTypes This example contains a MercatorProjection object: http://code.google.com/apis/maps/documentation/v3/examples/map-coordinates.html -- Marcelo - http://maps.forum.nu -- > > The documentation on MapType is pretty limited. I need the current > projection (to convert tile coords back into latlng). This is listed > as a property of the MapType, but it certainly isn't being set (by the > time that the first getTile method is called). [Also, I note that the > type of projection property is probably wrong in the documentation > as well]. So I thought I would just grab the projection from the > current map type being displayed. However the mapTypes on the main map > is a MapTypeRegistry and even though the getter method is probably > 'get', I can't figure out the argument to get the current (or any) > MapType. In particular, map.mapTypes.get(map.getMapTypeId()) returns > null. > > Philip -- You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
