When I use Maps.ZoomToBounds(Maps.Markers.ToCoordinateArray)
and there is only one marker set then TTMNSFNCMap will zoom to the topmost
zoom level. I believe in Google maps this is the level 22.
Is there a possibility to limit the maximum level? e.g. 18?
The approach to use the following code works, but seems a bit dilettantish
because the map zooms up and afterwards down again:
procedure TFrmMaps.Button1Click(Sender: TObject);
begin
FLimitZoomLevel := 18;
Maps.Markers.ToCoordinateArray;
Maps.GetZoomLevel;
end;
procedure TFrmMaps.MapsGetZoomLevel(Sender: TObject; AZoomLevel: Double);
begin
if (AZoomLevel > FLimitZoomLevel) then
Maps.SetZoomLevel(FLimitZoomLevel);
end;