Skip to content

Commit 0da04a3

Browse files
committed
修改动态标绘模块产品包
1 parent 8da0457 commit 0da04a3

File tree

3 files changed

+26
-15
lines changed

3 files changed

+26
-15
lines changed

dist/iclient9-plot-leaflet.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/leaflet/plot_dynamicPlot.html

Lines changed: 22 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -138,10 +138,6 @@
138138
</ul>
139139
</li>
140140

141-
<li>
142-
<a class="glyphicon glyphicon-retweet notArrow" data-i18n="[title]resources.text_screenshot" onclick="mapToImg1()"></a>
143-
</li>
144-
145141
<li>
146142
<a class="glyphicon glyphicon-adjust notArrow" data-i18n="[title]resources.text_avoid"></a>
147143
<ul>
@@ -224,7 +220,7 @@
224220
cancelDraw();
225221

226222
for(var i = 0; i < map.getPlottingLayers().length; i++){
227-
map.getPlottingLayers().removeAllFeatures();
223+
map.getPlottingLayers()[i].removeAllFeatures();
228224
}
229225
}
230226

@@ -346,14 +342,29 @@
346342
}
347343
}
348344

349-
//截屏
350-
function mapToImg1() {
351-
MapToImg && MapToImg.excute(map);
345+
//绘制避让区域
346+
function drawAvoidRegion() {
347+
if(editControl.getSelectedFeatures().length === 0){
348+
return;
349+
}
350+
editControl.avoidEdit(true);
352351
}
353352

354353
//绘制避让区域
355-
function drawAvoidRegion() {
356-
editControl.avoidEdit();
354+
function doneAvoidEdit() {
355+
editControl.avoidEdit(false);
356+
}
357+
358+
//绘制避让区域
359+
function deleteAvoidEdit() {
360+
if(editControl.getSelectedFeatures().length === 0){
361+
return;
362+
} else {
363+
if(editControl._avoidEditing === true){
364+
editControl.avoidEdit(false);
365+
}
366+
editControl.getSelectedFeatures()[0].removeAvoidRegions();
367+
}
357368
}
358369

359370
//创建组合对象
@@ -383,7 +394,7 @@
383394
function unGroupObject() {
384395
var features = editControl.getSelectedFeatures();
385396
for (var i = features.length - 1; i >= 0; i--) {
386-
if (features[i] instanceof L.GroupObject) {
397+
if (features[i] instanceof L.supermap.plotting.GroupObject) {
387398
var subLayers = plottingLayer.unGroupObject(features[i]);
388399
editControl.selectFeatures(subLayers);
389400
}

examples/leaflet/plot_graphicLayer.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
<html xmlns="http://www.w3.org/1999/html">
33
<head>
44
<meta charset="UTF-8">
5-
<title data-i18n="resources.title_graphicLayer"></title>
5+
<title data-i18n="resources.title_plotSymbolPerformance"></title>
66
<script type="text/javascript" include="bootstrap-css" src="../js/include-web.js"></script>
77
</head>
88
<body style=" margin: 0;overflow: hidden;background: #fff;width: 100%;height:100%;position: absolute;top: 0;">
@@ -47,7 +47,7 @@ <h5 class="panel-title text-center" style=" font-size: 16px;color: #ffffff;">高
4747
L.supermap.symbolInfoService(serverUrl).getSymbolInfo(params, function(result){
4848
for (var i = 0; i < count; ++i) {
4949
var coordinates = [2 * e * Math.random() - e, 2 * e * Math.random() - e];
50-
var dotSymbol = L.PlottingObject.createSymbol(421, 10100, L.latLng(coordinates[0], coordinates[1]), {serverUrl:serverUrl,symbolData: result.result, textContent: "常住人口"}, null, null);
50+
var dotSymbol = L.supermap.plotting.PlottingObject.createSymbol(421, 10100, L.latLng(coordinates[0], coordinates[1]), {serverUrl:serverUrl,symbolData: result.result, textContent: "常住人口"}, null, null);
5151
features.push(dotSymbol);
5252
}
5353
graphicLayer.addFeatures(features);
@@ -76,7 +76,7 @@ <h5 class="panel-title text-center" style=" font-size: 16px;color: #ffffff;">高
7676
for(var i = 0; i < count; ++i){
7777
var coordinates = [2 * e * Math.random() - e, 2 * e * Math.random() - e];
7878
var randomIndex = Math.floor(10 * Math.random());
79-
var dotSymbol = L.PlottingObject.createSymbol(421, randomCode[randomIndex], L.latLng(coordinates[0], coordinates[1]), {serverUrl:serverUrl,symbolData: randomSymbolData[randomIndex]}, null, null);
79+
var dotSymbol = L.supermap.plotting.PlottingObject.createSymbol(421, randomCode[randomIndex], L.latLng(coordinates[0], coordinates[1]), {serverUrl:serverUrl,symbolData: randomSymbolData[randomIndex]}, null, null);
8080
features.push(dotSymbol);
8181
}
8282
graphicLayer.addFeatures(features);

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