Re: How to open multiple infowindows or multiple markers using GMAP2
You can do something like that (pseudo code) : //create marker GMarker marker = new GMarker(new GLatLng(xx.xxx, xxx.xxx), new GMarkerOptions("Label to display on mouse hover", yourCustomIcon)); //add marker on the map addOverlay(marker); //add onClick event add(new ClickListener() { @Override protected void onClick(final AjaxRequestTarget varTarget, final GLatLng varLatLng, final GOverlay varOverlay) { if (varOverlay instanceof Gmarker) { Gmarker marker = (Gmarker) varOverlay; //use any logic to get the data you want to display (using lat and long for example) MyData data = yourService.findData(marker.getLatLng()); //open the infowindow getInfoWindow().open(marker, new yourPanelToDisplay(panelId, data)); } }); Hope this help. Gabriel. -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-open-multiple-infowindows-or-multiple-markers-using-GMAP2-tp4168848p4169864.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: How to open multiple infowindows or multiple markers using GMAP2
I think you can not do in gmap2, because of google map api (version2). you can check this address. http://code.google.com/apis/maps/documentation/javascript/v2/reference.html#GInfoWindow -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-open-multiple-infowindows-or-multiple-markers-using-GMAP2-tp4168848p4169284.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
How to open multiple infowindows or multiple markers using GMAP2
Hi, Fairly new to the Google Maps Api. I've got an array of data that I want to cycle through and plot on a map. Seems fairly simple, but all the multi-marker tutorials I have found are quite complex. Lets use the data array from google's site for an example: ['Bondi Beach', -33.890542, 151.274856, 4], ['Coogee Beach', -33.923036, 151.259052, 5], ['Cronulla Beach', -34.028249, 151.157507, 3], ['Manly Beach', -33.80010128657071, 151.28747820854187, 2], ['Maroubra Beach', -33.950198, 151.259302, 1] I simply want to plot all of these points and have an infoWindow pop up when clicked to display the name. Any help is greatly appreciated! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/How-to-open-multiple-infowindows-or-multiple-markers-using-GMAP2-tp4168848p4168848.html Sent from the Users forum mailing list archive at Nabble.com. - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org