By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,376 Members | 1,716 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,376 IT Pros & Developers. It's quick & easy.

Google Map API - adding infoWindow to a marker

P: 40
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.  }
Oct 22 '09 #1
Share this Question
Share on Google+
1 Reply


acoder
Expert Mod 15k+
P: 16,027
This link should help.
Oct 26 '09 #2

Post your reply

Sign in to post your reply or Sign up for a free account.