Frequently Asked Component Specific Questions
Options |
Display all FAQ items |
Displaying items 1 to 1 of 1, page 1 of 1
<< previous next >>
TMS VCL WebGMaps
How to save and restore a map position
How to save and restore a map position
Initialization:
public MapBounds: TBounds; MapZoom: Integer; procedure TForm2.FormCreate(Sender: TObject); begin MapBounds := TBounds.Create; end;
WebGMaps1.GetMapBounds;
procedure TForm1.WebGMaps1BoundsRetrieved(Sender: TObject; Bounds: TBounds); begin MapBounds.NorthEast.Latitude := Bounds.NorthEast.Latitude; MapBounds.NorthEast.Longitude := Bounds.NorthEast.Longitude; MapBounds.SouthWest.Latitude := Bounds.SouthWest.Latitude; MapBounds.SouthWest.Longitude := Bounds.SouthWest.Longitude; MapZoom := WebGMaps1.MapOptions.ZoomMap; end;
WebGMaps1.MapZoomTo(MapBounds); WebGMaps1.MapOptions.ZoomMap := MapZoom;