A InfoWindow is a bubble of information that can contain HTML text, they are accessible through the list InfoWindow type TECMapInfoWindows
TECMapInfoWindows
This class has methods and properties
function Add(sContent:string):integer;
procedure Clear;
TECMapInfoWindow
The InfoWindow have methods and properties
property Anchor : integer;
Under the CloudMade InfoWindow must necessarily be associated with a marker to be displayed
10property Longitude: double;
property MaxWidth : integer;
Property read / written to define the maximum width that can reach InfoWindow
Not available CloudMade
12Property read / written to open / close a InfoWindow
The closure of a InfoWindow triggering event OnCloseInfoWindow
OnCloseInfoWindow
Event triggered the closure of a InfoWindow
procedure OnCloseInfoWindow(sender: Tobject;const Index:integer)
Difference between API
Under CloudMade to be displayed a InfoWindow must be associated with a marker
// Delphi
map component ECMap
// create marker on center of
map
id_marker :=
map.AddMarker(map.Latitude,map.longitude);
// create infowindow
id_info := map.InfoWindows.Add('InfoWindow 1');
// link infowindow width
marker
map.InfoWindows[id_info].Anchor := id_marker;
// open infowindow - good in
CloudMage and Google
map.InfoWindows[id_info].open := true;
// create infowindow
id_info_2 := map.InfoWindows.Add('InfoWindow 2');
// fix position
map.InfoWindows[id_info2].setPosition(48,0.7);
// open - Google ok, but don't open
on CloudMade
map.InfoWindows[id_info2].open := true;
While in Google Maps you can directly open a InfoWindow without associating it with a marker