- ECMap
- Achat - Contact
- Licence d'utilisation
- Installation
- Positionnement
- Type de carte
- Contrôles
- Localisation
- Places
- Import/Export
- Overlays
- StreetView
- EarthView
- Panoramio
- DistanceMatrix
- Table des illustrations
- Glossaire
Une InfoWindow est une bulle d'information pouvant contenir du texte HTML, elles sont accessibles au travers de la liste InfoWindows de type TECMapInfoWindows
TECMapInfoWindows
Cette classe dispose des méthodes et propriétés
function Add(sContent:string):integer;
procedure Clear;
TECMapInfoWindow
Les infowindows disposent des méthodes et propriétés
property Anchor : integer;
Sous CloudMade les infowindows doivent obligatoirement être associées à un marker pour pouvoir s'afficher
11property Longitude: double;
property MaxWidth : integer;
Propriété en lecture/écrite permettant de définir la largeur maximale que peut atteindre l'infowindow
Non disponible sous CloudMade
12Propriété en lecture/écrite permettant d'ouvrir/fermer une infowindow
La fermeture d'une infowindow déclenche l'évènement OnCloseInfoWindow
OnCloseInfoWindow
Évènement déclenché à la fermeture d'une infowindow
procedure OnCloseInfoWindow(sender: Tobject;const Index:integer)Différence entre API
Sous CloudMade pour être affichée une infowindow doit obligatoirement être associée à un marker// 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;
Alors que sous Google Maps vous pouvez directement ouvrir une infowindow sans l'associer à un marker