Closed GoogleCodeExporter closed 8 years ago
[deleted comment]
The geocoding search bar in WebGL Earth is using the open-source Nominatim
service (OpenStreetMap data), in fact the free and unlimited online service
from MapQuest is called whenever you search:
http://open.mapquestapi.com/nominatim/.
Part of the JSON response is also the boundingbox (min/max for lat/lon).
So the task is to find for the given bounding box and the actual viewport
(window size) the relevant zoom level in mercator pyramid. It should be quite
easy with math from
http://www.maptiler.org/google-maps-coordinates-tile-bounds-projection/.
BTW This function should be also exported into the JavaScript API as
.setBounds().
Original comment by klo...@gmail.com
on 20 Jan 2011 at 11:27
Original comment by slouppetr
on 24 Oct 2011 at 9:51
Original issue reported on code.google.com by
laurent....@gmail.com
on 20 Jan 2011 at 1:56