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

InfoWindow

you are here :TECMap > Overlays

A InfoWindow is a bubble of information that can contain HTML text, they are accessible through the list InfoWindow type TECMapInfoWindows

Fig. 39 A InfoWindow associated with a circle
Fig. 39 A InfoWindow associated with a circle

TECMapInfoWindows

This class has methods and properties


function Add(sContent:string):integer;
Adds InfoWindow

content can be plain text or HTML

32
procedure Clear;
Clears all InfoWindow
procedure Delete(index:integer);
Deletes InfoWindow which we pass the index
property Count:integer;
Returns the number of marker in the list
property InfoWindow[index:integer]:TECMapInfoWindow;
Table that allows access to InfoWindow is the default property so you can access it directly by map.InfoWindows[index] instead of map.InfoWindows.InfoWindow[index]
property ToKml : string;
Read-only property that returns a string in kml format listing the infowindows
property ToTxt : string;
Property read / write which gives access to the list in text format InfoWindow.

In writing there is an addition and not a replacement, if you do not want to keep the old values before making a Clear adding

33

TECMapInfoWindow

The InfoWindow have methods and properties

procedure setPosition(const dLatitude,dLongitude:double);

Moves InfoWindow in Latitude, Longitude

Not available CloudMade

10
property Anchor : integer;
Property read / written InfoWindow combines to a marker

Under the CloudMade InfoWindow must necessarily be associated with a marker to be displayed

10
property Content : string;
Property read / written defining the content of InfoWindow
property Latitude : double;

Property read / written with access to the latitude

Not available CloudMade

11
property Longitude: double;

Property read / written with access to the longitude

Not available CloudMade

12
property MaxWidth : integer;

Property read / written to define the maximum width that can reach InfoWindow

Not available CloudMade

13
property Open : boolean

Property read / written to open / close a InfoWindow

The closure of a InfoWindow triggering event OnCloseInfoWindow

property Zindex : integer;
Property read / written, attribute a priority index for displaying the InfoWindow a InfoWindow with a zIndex higher will be displayed on top of a lower zIndex
property Index : integer;
Index InfoWindow in its list
property ToKml : string;
Read-only property that returns a string in kml format containing InfoWindow
property ToTxt : string;
Property read / write which gives access to InfoWindow in a text format.

OnCloseInfoWindow

Event triggered the closure of a InfoWindow

procedure OnCloseInfoWindow(sender: Tobject;const Index:integer)

Index index in the list InfoWindow InfoWindow

Difference between API

Under CloudMade to be displayed a InfoWindow must be associated with a marker

// load mapillary image 256x256 in a TImage
bmp := TBitmap.Create;
try

// also url1024 and url2048

if FMapillaryLayer.LoadMapillaryBitmap(Sequence[ImageIndex].Url256,bmp) then

Image.Picture.Assign(bmp);

finally
bmp.Free;
end;

While in Google Maps you can directly open a InfoWindow without associating it with a marker

go to page
© 2016 ESCOT-SEP Christophe - Made width Help&Web - RSS - Google+