Google标记集群未被创建

时间:2016-05-13 14:08:50

标签: javascript google-maps

我是Google群集地图API的新手,并尝试在我的网站中使用它。

  <script src="http://maps.google.com/maps/api/js"></script> 
<script src="http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer.js"></script>


function createcluster(){
alert(markerlist.length);
markerCluster = new MarkerClusterer(map, markerlist, {
        gridSize:40,
        minimumClusterSize: 2
    });
    }

我在脚本标签中使用了上述导入并创建了markerCluster,如上面的代码所示。我检查了markerlist,很好。但是没有创建markerCluster。有人可以帮我解决这个问题吗?提前致谢

1 个答案:

答案 0 :(得分:0)

我对以下关于Google MarkerCluster库的帖子的回答应提供解决方案:

MarkerCluster V3 stopped working properly