In this project my aim is to create a software via GoogleMaps in Delphi 2009, it will be like this one but in different way. In this project the user can add a point on the map and in every point beside the icon I will add some information and these information should be relate with the icon, so if the user want to click on one of them the information will open automatically. My problem is I can create the information but when I close it I can not open it again. How can I manage this problem my code as below, Thanks a lot.
procedure TfrmMain.btnAddMarkerClick(Sender: TObject);
var
Doc2: IHTMLDocument2;
Win2: IHTMLWindow2;
latlng: String;
information: String;
begin
Doc2 := WebBrowser1.Document as IHTMLDocument2;
Win2 := Doc2.parentWindow;
information:='its a example';
latlng := '"' + leLat.Text + '", "' + leLng.Text + '"';
Win2.execScript('map.addOverlay(new GMarker(new GLatLng(' + latlng + ')) );', 'JavaScript');
Win2.execScript('map.openInfoWindow(new GLatLng(' + latlng + '),document.createTextNode("'+information +'"));','JavaScript');
end;
The Design as below: alt text http://img829.imageshack.us/img829/8474/adszdi.png