Composant Delphi / Google Maps / OpenStreetMap / Leaflet  / Mappilary / Native Maps 100% Delphi 0% WebBrowser 0% Javascript

Multi view

you are here :TECNativeMap

you have the possibility to connect several TECNativeMap on your motherboard, you'll get as many different view.

The views are independent from each other but they all use the elements of the main map, the data are not duplicated they exist only in the main map.

If you added elements in one of the side views, they are actually integrated in the main view.

Any changes on one of the views is immediately passed on to all of the maps

Fig. 1 Left the main map - right side view

procedure TNativeMapControl.AddView(const view:TNativeMapControl);

procedure TNativeMapControl.ReleaseView(const view:TNativeMapControl);

procedure TNativeMapControl.ReleaseAllView;

property TNativeMapControl.ViewCount : integer;

property TNativeMapControl.Views[index:integer] : TNativeMapControl

property TNativeMapControl.OnAddShapeToView : TOnAddShapeToView

Tune in to this event if you want to filter the items displayed in the view

Example, we want to see that elements of type TECShapePOI star shaped

// add view for map
Map.addView(ViewA);
// add filter on ViewA
ViewA.OnAddShapeToView := doOnAddShapeToView;
...
procedure TForm.doOnAddShapeToView(sender : TObject; const Shape:TECShape;var cancel:boolean) ;
begin

// sender is the view, cast for use TECNativeMap(sender);

if Shape is TECShapePOI then
cancel := not (TECShapePOI(shape).POIShape = poiStar)
else
cancel := true;

end;
go to page
Réalisé avec la version gratuite pour les particuliers d'Help&Web