Skip to content

Commit 2517c80

Browse files
committed
修改标绘 图层操作 demo bug
1 parent da9896f commit 2517c80

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

examples/leaflet/plot_operatePlottingLayer.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,17 +101,18 @@ <h5 class='panel-title text-center' data-i18n="resources.title_operatePlottingLa
101101

102102
function createChildPlotLayer() {
103103
widgets.alert.clearAlert();
104-
if(plotMapManager.getActivePlottingLayer() !== undefined){
104+
if(plotMapManager.getActivePlottingLayer() != null){
105105
var plottingLayerName = "子图层";
106106
var plottingLayerCaption = plottingLayerName;
107107
childPlotLayer = L.supermap.plotting.childPlotLayer(plottingLayerName,plottingLayerCaption);
108108
plottingLayer.addChildPlotLayer(childPlotLayer);
109-
plottingLayer.setActiveChildPlotLayer(childPlotLayer);
109+
plotMapManager.setActiveChildPlotLayer(childPlotLayer);
110+
111+
var successMessage = "子图层 " + childPlotLayer.name + " 创建成功";
112+
widgets.alert.showAlert(successMessage,true);
110113
}else{
111114
widgets.alert.showAlert("请先添加标绘图层!",true);
112115
}
113-
var successMessage = "子图层 " + childPlotLayer.name + " 创建成功";
114-
widgets.alert.showAlert(successMessage,true);
115116
}
116117

117118
function removeChildPlotLayer(){
@@ -152,7 +153,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_operatePlottingLa
152153

153154
function plotSymbol(){
154155
widgets.alert.clearAlert();
155-
if(drawControl.drawingLayer !== undefined){
156+
if(drawControl.drawingLayer != null){
156157
drawControl.handler.libID = 421;
157158
drawControl.handler.code = 10100;
158159
drawControl.handler.serverUrl = serverUrl;

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