On Jun 26, 3:58 am, Tim <
koop...@gmail.com> wrote:
> But how in the world do I get an
> OverlayView object?
see the following example map which implements the most basic
OverlayView.
It returns the div and container pixel coordinates when you click on
the map
http://www.william-map.com/20100416/1/map.htm
>
> I've tried the basic map.getProjection().fromLatLngToPoint(...), but
> this result doesn't change when I zoom the map.
>
see the following example which demonstrates the use of this function.
The function returns floating point pixel values between 0 and 255,
and needs to be scaled according to the zoom (multiply by 2^zoom),
then rounded to integers.
var worldCoordinate = projection.fromLatLngToPoint(chicago);
var pixelCoordinate = new google.maps.Point(
worldCoordinate.x * Math.pow(2, map.getZoom()),
worldCoordinate.y * Math.pow(2, map.getZoom()));
http://code.google.com/apis/maps/documentation/javascript/examples/map-coordinates.html
...