function AddPoint (arr) {let index = 1 + markerList.length // 序号var content = '<div class="marker-icon">' + index + '</div>'; // 自定义markervar marker = new AMap.Marker({content: content,position: arr,//位置})map.add(marker);//添加到地图}
.marker-icon {width: 24px;height: 24px;color: #fff;background: url(images/mark.png);font-size: 14px;text-align: center;align-items: center;}