zooming

is it posible to zoom in or out to show all visible markers



Nico

You'd need to catch the min & max longitude & latitude of all displayed markers and then specify the view rectange of WebGMaps to these values.

do you have a example on how to do that ??



Nico

It would be something like:


var
  bnd: TBounds;
begin
  bnd.NorthEast.Latitude := Minimum_Latitude;
  bnd.NorthEast.Longitude := Minimum_Longitude;

  bnd.SouthWest.Latitude := Maximum_Latitude;
  bnd.SouthWest.Longitude :=  Maximum_Longitude;

  webgmaps1.MapZoomTo(bnd);
end;