lion 2 years ago
parent c9c43c087c
commit 7317b27875

@ -661,7 +661,7 @@
} }
}] }]
}); });
panToHospital() // panToHospital()
window.setInterval(function() { window.setInterval(function() {
// panToHospital(); // panToHospital();
}, 3000); }, 3000);
@ -676,30 +676,15 @@
var center = new TMap.LatLng(item.lat, item.lng); var center = new TMap.LatLng(item.lat, item.lng);
// marker.setMap(null); // marker.setMap(null);
// var marker1 = null; // var marker1 = null;
var marker1 = new TMap.MultiMarker({ var mark = { //点标注数据数组
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", "id": "demo",
"styleId": "marker", "styleId": "marker",
"position": center, "position": center,
"properties": { "properties": {
"title": "marker" "title": "marker"
} }
}] }
}); marker.geometries.push(mark)
marker.push(marker1)
}) })
// map.panTo(center); // map.panTo(center);

Loading…
Cancel
Save