Marker Clusterer

谷歌地图 JavaScript API v3 的标记聚类库。「A marker clustering library for the Google Maps JavaScript API v3.」

Github星跟蹤圖

Please note: This repository is kept for historical purpose only - the current version of marker clusterer is available as part of the v3-utility-library repository.

Marker Clusterer – A Google Maps JavaScript API utility library

A Google Maps JavaScript API v3 library to create and manage per-zoom-level clusters for large amounts of markers.
Analytics

Reference documentation

Migrated from the Google Maps JavaScript API utility libraries on Google Code.

Usage

Download or clone markerclusterer.js and images m1.png to m5.png, save images in images folder.

To use your own custom cluster images just name your images m[1-5].png or set the imagePath option to the location and name of your images like this: imagePath: 'customImages/cat' for images cat1.png to cat5.png.

index.html

...

<div id="map-container"><div id="map"></div></div>
<script src="markerclusterer.js"></script>
<script>
    function initialize() {
        var center = new google.maps.LatLng(51.5074, 0.1278);

        var map = new google.maps.Map(document.getElementById('map'), {
          zoom: 3,
          center: center,
          mapTypeId: google.maps.MapTypeId.ROADMAP
        });

        var markers = [];
        var marker = new google.maps.Marker({
            position: new google.maps.LatLng(51.5074, 0.1278)
        });
        markers.push(marker);

        var options = {
            imagePath: 'images/m'
        };

        var markerCluster = new MarkerClusterer(map, markers, options);
    }

    google.maps.event.addDomListener(window, 'load', initialize);
</script>
...

Live Demos

Marker Clusterer Screenshot

Examples page

Contributing

Want to contribute? Check out the contributing guide!

License

Copyright 2014 Google Inc. All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

主要指標

概覽
名稱與所有者googlearchive/js-marker-clusterer
主編程語言JavaScript
編程語言JavaScript (語言數: 1)
平台
許可證Apache License 2.0
所有者活动
創建於2014-09-12 19:32:50
推送於2019-06-16 08:14:59
最后一次提交
發布數0
用户参与
星數1.3k
關注者數84
派生數764
提交數90
已啟用問題?
問題數89
打開的問題數72
拉請求數14
打開的拉請求數27
關閉的拉請求數22
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?