-1
Je dois ouvrir un infoWindow
sur customMarker
.Ne pas ouvrir infoWindow avec un marqueur personnalisé. (Google Maps)
L'info-fenêtre ne s'ouvre pas. "Cliquez sur" ne fonctionne pas:
$google.maps.event.addDomListener(overlay, 'click', function() {
console.log("test");
iw.open(map, this);
});
Voici mon code:
$.getJSON(jsonShops, function(places) {
for (var i = 0, index = 0; i < places.shops.length; i++, index++) {
var bounds = new google.maps.LatLng(places.shops[i].lat, places.shops[i].lng);
var overlay = new MarkerSOverlay(bounds, alphabet.charAt(index), map);
var iw = new google.maps.InfoWindow({
content: "Simple",
position: bounds
});
google.maps.event.addDomListener(overlay, 'click', function() {
console.log("test");
iw.open(map, this);
});
}