Google Maps - Attaching InfoWindows to polygons in array

后端 未结 3 761
半阙折子戏
半阙折子戏 2021-01-21 07:46

I\'ve been banging my head against the wall all morning with this one. I an creating an array of polygons, and want to associate some data in each one that will show in an info

3条回答
  •  时光取名叫无心
    2021-01-21 08:22

    Please take a look at this https://developers.google.com/maps/documentation/javascript/examples/event-closure and combine it with the response above to assign a unique message for each polygon in your array of polygons.

    I am also working in having multiple polygons in one layer with unique message for each polygon. I have not succeeded yet. With the response above, I got info window to show up, but I get the same message for all the polygons. Once I solve my problem, I will post the solution.

提交回复
热议问题