开发者

Show multiple infowindow at once in gMap

From the author's website, let's say we have multiple markers:

$("#map1").gMap({ markers: [{ latitude: 47.660937,
                              longitude: 9.569803,
                              html: "Tettnang, Germany",
                              popup: true }],
                  zoom: 6 });

$("#map2").gMap({ markers: [{ latitude: 47开发者_运维问答.660940,
                              longitude: 9.569803,
                              html: "Tettnang, Germany",
                              popup: true }],
                  zoom: 6 });
$("#map3").gMap({ markers: [{ latitude: 47.660946,
                          longitude: 9.569803,
                          html: "Tettnang, Germany",
                          popup: true }],
              zoom: 6 });

We use popup: true to show the infowindow by default when the map is loaded. But only the last infowindow (#map3) is shown. Others remain just a marker.

How do I make all infowindow to popup at once? Thanks.


As pointed on the Google Map API page, only one InfoWindow may be displayed at one time (at least with V2)

Best alternative I've found so far is this library called elabel.js which can be used to add labels to the map

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜