Is there a way to zoom my map to the "exact" specified 4 corners/coordinate?
<DELPHI>
var
ZoomBounds: TBounds
begin
ZoomBounds.NorthEast.Latitude := 25.5;
ZoomBounds.NorthEast.Longitude := -87.9;
ZoomBounds.SouthWest.Latitude := 16.6;
ZoomBounds.SouthWest.Longitude := 71.1;
WebGMaps1.MapZoomTo(ZoomBounds);
end;
</DELPHI>
Using the above code, the map zoom to the general area I want, but not quite to the "exact" lat/long specified by my bounds. The result is that the map is zoomed out a bit too much.
I need it to be exactly as specified. Can you help?
Please note that the zoom level in the Google Maps API is limited to a set of predefined steps. This means it's not always possible to zoom to the exact bounds.
This can be illustrated by adding a rectangle polygon based on the provided ZoomBounds. You'll notice that the map will be zoomed the the lowest level possible where the rectangle is displayed completely. If the map is zoomed in 1 step further, part of the rectangle is no longer visible.