On Feb 13, 12:52 pm, D <[email protected]> wrote: > I want to find out what pixels on the larger draggable map div that > the north east and south west corners of the visible portion of the > map represent. That tells me exactly what area of the draggable map > div I am actually seeing, in terms of the pixels. > > One way to get the NE and SW pixel of the visible area by calling > fromLatLngToDivPixel > > var mapNE = map.fromLatLngToDivPixel( > map.getBounds().getNorthEast() > ); > var mapSW = map.fromLatLngToDivPixel( > map.getBounds().getSouthWest() > ); > > However at zoom level 0 and 1 this no longer makes sense, as > longitudes are repeated multiple times and the visible area goes past > the north and south poles. So, latitude and longitude are useless > here. > > What in the API would allow me to get the pixel coordinates of the > visible map area?
So... I guess this is impossible. I'm wondering why everything has to go through a translation to lat lon (when lat/lon is ambiguous sometimes). It would be great if there was a from container pixel to div pixel function. But, that's just wishful thinking :-) -- 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.
