@@ -101,17 +101,18 @@ <h5 class='panel-title text-center' data-i18n="resources.title_operatePlottingLa
101
101
102
102
function createChildPlotLayer ( ) {
103
103
widgets . alert . clearAlert ( ) ;
104
- if ( plotMapManager . getActivePlottingLayer ( ) !== undefined ) {
104
+ if ( plotMapManager . getActivePlottingLayer ( ) != null ) {
105
105
var plottingLayerName = "子图层" ;
106
106
var plottingLayerCaption = plottingLayerName ;
107
107
childPlotLayer = L . supermap . plotting . childPlotLayer ( plottingLayerName , plottingLayerCaption ) ;
108
108
plottingLayer . addChildPlotLayer ( childPlotLayer ) ;
109
- plottingLayer . setActiveChildPlotLayer ( childPlotLayer ) ;
109
+ plotMapManager . setActiveChildPlotLayer ( childPlotLayer ) ;
110
+
111
+ var successMessage = "子图层 " + childPlotLayer . name + " 创建成功" ;
112
+ widgets . alert . showAlert ( successMessage , true ) ;
110
113
} else {
111
114
widgets . alert . showAlert ( "请先添加标绘图层!" , true ) ;
112
115
}
113
- var successMessage = "子图层 " + childPlotLayer . name + " 创建成功" ;
114
- widgets . alert . showAlert ( successMessage , true ) ;
115
116
}
116
117
117
118
function removeChildPlotLayer ( ) {
@@ -152,7 +153,7 @@ <h5 class='panel-title text-center' data-i18n="resources.title_operatePlottingLa
152
153
153
154
function plotSymbol ( ) {
154
155
widgets . alert . clearAlert ( ) ;
155
- if ( drawControl . drawingLayer !== undefined ) {
156
+ if ( drawControl . drawingLayer != null ) {
156
157
drawControl . handler . libID = 421 ;
157
158
drawControl . handler . code = 10100 ;
158
159
drawControl . handler . serverUrl = serverUrl ;
0 commit comments