google-mapsgeocodingviewportgoogle-geocoding-api

Difference between viewport and bounds in google geocoding


What the difference between viewport and bounds rects in google geocoding api?

For big countries (USA, Russia) viewport differs from bounds (sample request for Canada: http://maps.googleapis.com/maps/api/geocode/xml?address=Canada&sensor=false, but for smaller countries, regions and cities they are equal.


Solution

  • I think that if the viewport and the bounds are not the same for big countries is just because they can not be display with the default zoom. So the bounds are correct for the current view but the whole country will not be displayed.

    For the viewport, it's just the minimum bound to display the whole country.

    Hope i answer your question.