I need to draw a polyline that is exactly 200 meters thick, regardless of
the zoom level, so I need to compute current scale when map zoom changes or
current viewport center changes significantly. But that's a different story.
That trick @Marcelo mentioned, about computing distance between two
I need to draw a polyline that is exactly 200 meters thick
I'd have thought it would be easier to draw a polygon of two parallel
sides 200m apart
--
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
The info you found for OSM should be applicable to Google Maps as
well.
It's basically find two things: 1) how many horizontal pixel (for
global) at zoom level Z? and 2) how many meters (for global) at
latitude LAT?
The first one is basically 256x2^Z.
The second one should be
The geometry library can calculate the distance in meters between two
lat/lon pairs.
http://code.google.com/apis/maps/documentation/javascript/geometry.html
The Mercator projection object used in this example:
http://code.google.com/apis/maps/documentation/javascript/examples/map-coordinates.html