Google Maps API v3 adding an InfoWindow to each marker

前端 未结 9 545
刺人心
刺人心 2020-11-29 21:36

NOTE: I\'m using v3 of the Google Maps API

I\'m trying to add an info window to each marker I put on the map. Currently I\'m doing this with the following code:

9条回答
  •  执念已碎
    2020-11-29 22:23

    In My case (Using Javascript insidde Razor) This worked perfectly inside an Foreach loop

    google.maps.event.addListener(marker, 'click', function() {
        marker.info.open(map, this);
    });
    

提交回复
热议问题