using jquery with google maps api (markerclusterer)
Hi all, iam trying to fill div with jquery after click (ussing GEvent.addListener
http://code.google.com/intl/cs/apis/maps/documentation/events.html#Events_overview) on markerclusterer (
http://googlegeodevelopers.blogspot.com/2009/04/markerclusterer-solution-to-too-many.html) from gmaps api. But It doesnt work. I dont know if markerclusterer supports gevent listener or, if gmaps api doenst support jquery ?
Here is code of what i tried with no success:
- for (var i = 0; i < data.count; ++i) {
var latlng = new GLatLng(data.photos[i].latitude, data.photos[i].longitude);
marker = createMarker(data.photos[i].latitude, data.photos[i].longitude, icon, data.photos[i].picture, data.photos[i].address, map, data.photos[i].name);
markers.push(marker);
}
var markerCluster = new MarkerClusterer(map, markers);
GEvent.addListener(markerCluster, "click",
function() {
$.('supporters').val('Test');
alert("heeey");
});
And alert hasnt showed too. So do you guys have any experience with clusterer an gmaps api (srry for little OT)
?
Any advice would be much aprecciate.