使用常量
//聚合点显示
var _renderCluserMarker = function (context) {
var point = {};
var markerContent = document.createElement("span");
// 点标记中的文本
var markerSpan = document.createElement("div");
markerSpan.className = '';
markerSpan.innerHTML = '<div><img style="width: 40px" src=.'+context.markers[0].getExtData().imageEmptyUrl+'><div style="bottom: -15px;position: fixed;left: 10px;color: green;font-weight: bold" class="markerFac-noborder">'+context.markers.length+'</div></div>';
markerContent.appendChild(markerSpan);
context.marker.setContent(markerContent);
}
jzsjdCluster = new AMap.MarkerClusterer(map, jzsjdMarkers,{gridSize:40,renderCluserMarker:_renderCluserMarker});
如果要隐藏聚合点直接使用 jzsjdCluster .setMap(null);