Skip to content

Commit 0f782fd

Browse files
修改标绘demo
1 parent 13d2255 commit 0f782fd

File tree

2 files changed

+11
-11
lines changed

2 files changed

+11
-11
lines changed

examples/leaflet/plot_dynamicPlot.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@
294294
function loadSimulationMap() {
295295
plotting.getSitDataManager().openSmlFileOnServer("situationMap", function(evt){
296296
drawControl.setDrawingLayer(evt.sitDataLayers[0]);
297+
plottingLayer = evt.sitDataLayers[0];
297298
});
298299
}
299300

examples/leaflet/plot_movingTarget.html

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -46,20 +46,19 @@
4646
window.setInterval(updateInterval, 1000);
4747

4848
function updateInterval() {
49-
var bounds = map.get
5049
var features = movingTargetLayer.features;
5150
for(var i = 0; i < features.length; i++) {
5251
if(features[i].symbolType === SuperMap.Plot.SymbolType.DOTSYMBOL){
53-
// var latlng = features[i].getLatLngs()[0];
52+
var latlng = features[i].getLatLngs()[0];
5453

55-
// var x = latlng.lat;
56-
// var y = latlng.lng;
57-
// if(x >= e || x <= ((-1)*e)){
58-
// trackingDirs[features[i].uuid][0] *= (-1);
59-
// }
60-
// if(y >= e || y <= ((-1)*e)){
61-
// trackingDirs[features[i].uuid][1] *= (-1);
62-
// }
54+
var x = latlng.lat;
55+
var y = latlng.lng;
56+
if(x >= e || x <= ((-1)*e)){
57+
trackingDirs[features[i].uuid][0] *= (-1);
58+
}
59+
if(y >= e || y <= ((-1)*e)){
60+
trackingDirs[features[i].uuid][1] *= (-1);
61+
}
6362

6463
var trackingDir = trackingDirs[features[i].uuid];
6564

@@ -136,4 +135,4 @@
136135
}
137136
</script>
138137
</body>
139-
</html>
138+
</html>

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy