On Feb 9, 3:32 pm, D <[email protected]> wrote: > Can some one explain fromLatLngToDivPixel to me?
>From the docs: "Computes the pixel coordinates of the given geographical point in the DOM element that holds the draggable map." http://code.google.com/apis/maps/documentation/reference.html#GMap2.fromLatLngToDivPixel That means a big great DIV, which is internal to the API, which gets dragged when you drag the map, and which is partly hidden. That is not the div that you created as a container for the map. To get the pixel on the div where you place the map, (or the map container), use fromLatLngToContainerPixel: http://code.google.com/apis/maps/documentation/reference.html#GMap2.fromLatLngToContainerPixel -- Marcelo - http://maps.forum.nu -- > > I was thinking that it would return the pixel location within the main > map div. But apparently that's not how it works: > > http://www.douglassdavis.com/gmaps/topixel.html > > Every time you click on the pixel, on the bottom, it will display what > fromLatLngToDivPixel returns. However, after I drag the map, it > doesn't seem to change. I already read the docs, and I still don't > understand the concept behind fromLatLngToDivPixel. > > -d -- You received this message because you are subscribed to the Google Groups "Google Maps API" 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-api?hl=en.
