Connecting Tech Pros Worldwide Forums | Help | Site Map

Google Map API - adding infoWindow to a marker

Member
 
Join Date: Jul 2007
Posts: 37
#1: Oct 22 '09
Hai All,

In my application i hve a MarkerManager with markers greater then 1nos.
On click of any marker i want to display the info window.Im not getting how to add GEvent.I want the info window to be displayed on click on the marker .

here is the code snippet

Expand|Select|Wrap|Line Numbers
  1. mgr = new MarkerManager(map);  
  2. mgr.addMarkers(getplotMark(count),0);
  3.  
  4. function getplotMark(n){ 
  5.   var batch = [];           
  6.   for (var i = 0; i < n; i++) {   
  7.          var x=i;
  8.          var labelTex="AAA";
  9.          var options = [{"icon": iconsm, "clickable": false, "title":labelTex,   "labelText":"aa","labelClass":"label", "labelOffset":new GSize(-1,-1) } ];
  10.  
  11.          batch.push(new LabeledMarker(new GLatLng(lat[k],longi[k]),options[0]));
  12.      }
  13.             return batch;            
  14.  }

acoder's Avatar
Site Moderator
 
Join Date: Nov 2006
Location: UK
Posts: 14,592
#2: Oct 26 '09

re: Google Map API - adding infoWindow to a marker


This link should help.
Reply