|
|
|
|
@ -638,29 +638,7 @@
|
|
|
|
|
center: center, //设置地图中心点坐标
|
|
|
|
|
});
|
|
|
|
|
//初始化marker
|
|
|
|
|
marker = new TMap.MultiMarker({
|
|
|
|
|
id: "marker-layer", //图层id
|
|
|
|
|
map: map,
|
|
|
|
|
styles: { //点标注的相关样式
|
|
|
|
|
"marker": new TMap.MarkerStyle({
|
|
|
|
|
"width": 25,
|
|
|
|
|
"height": 35,
|
|
|
|
|
"anchor": {
|
|
|
|
|
x: 16,
|
|
|
|
|
y: 32
|
|
|
|
|
},
|
|
|
|
|
"src": "https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/markerDefault.png"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
geometries: [{ //点标注数据数组
|
|
|
|
|
"id": "demo",
|
|
|
|
|
"styleId": "marker",
|
|
|
|
|
"position": center,
|
|
|
|
|
"properties": {
|
|
|
|
|
"title": "marker"
|
|
|
|
|
}
|
|
|
|
|
}]
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
panToHospital()
|
|
|
|
|
window.setInterval(function() {
|
|
|
|
|
// panToHospital();
|
|
|
|
|
@ -672,6 +650,7 @@
|
|
|
|
|
// if (current_hospital == hospitals.length) {
|
|
|
|
|
// current_hospital = 0;
|
|
|
|
|
// }
|
|
|
|
|
var geometriesArr = []
|
|
|
|
|
hospitals.map(item=>{
|
|
|
|
|
var center = new TMap.LatLng(item.lat, item.lng);
|
|
|
|
|
// marker.setMap(null);
|
|
|
|
|
@ -684,9 +663,25 @@
|
|
|
|
|
"title": "marker"
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
marker.geometries.push(mark)
|
|
|
|
|
geometriesArr.push(mark)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
marker = new TMap.MultiMarker({
|
|
|
|
|
id: "marker-layer", //图层id
|
|
|
|
|
map: map,
|
|
|
|
|
styles: { //点标注的相关样式
|
|
|
|
|
"marker": new TMap.MarkerStyle({
|
|
|
|
|
"width": 25,
|
|
|
|
|
"height": 35,
|
|
|
|
|
"anchor": {
|
|
|
|
|
x: 16,
|
|
|
|
|
y: 32
|
|
|
|
|
},
|
|
|
|
|
"src": "https://mapapi.qq.com/web/lbs/javascriptGL/demo/img/markerDefault.png"
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
geometries: geometriesArr
|
|
|
|
|
});
|
|
|
|
|
// map.panTo(center);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|