egovamap 0.33.28 → 0.33.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -134,124 +134,132 @@ var EGovaGISMap = function (
134
134
  that.onMapLoaded = function () {
135
135
  that.isLoading = false;
136
136
  that.gisLoaded = true;
137
- if (context.mapCenterFlag) {
138
- if (context.mapCenterFlag == "1") {
139
- if (context.coordinateX && context.coordinateY) {
140
- that.centerAndZoom(
141
- context.coordinateX,
142
- context.coordinateY,
143
- 4
144
- );
145
- }
146
- } else if (context.mapCenterFlag == "2") {
147
- if (context.coordinateX && context.coordinateY) {
148
- that.centerAndZoom(
149
- context.coordinateX,
150
- context.coordinateY,
151
- 1
152
- );
153
- }
154
- if (context.humanLayerUsageID && context.regionCode) {
155
- var zoom = gisParams && gisParams.maskZoom == true;
156
- var style = {
157
- type: "simple-fill",
158
- style: "solid",
159
- color: [100, 100, 255, 0.5],
160
- outline: {
161
- type: "simple-line",
137
+ var cb = function() {
138
+ if (context.mapCenterFlag) {
139
+ if (context.mapCenterFlag == "1") {
140
+ if (context.coordinateX && context.coordinateY) {
141
+ that.centerAndZoom(
142
+ context.coordinateX,
143
+ context.coordinateY,
144
+ 4
145
+ );
146
+ }
147
+ } else if (context.mapCenterFlag == "2") {
148
+ if (context.coordinateX && context.coordinateY) {
149
+ that.centerAndZoom(
150
+ context.coordinateX,
151
+ context.coordinateY,
152
+ 1
153
+ );
154
+ }
155
+ if (context.humanLayerUsageID && context.regionCode) {
156
+ var zoom = gisParams && gisParams.maskZoom == true;
157
+ var style = {
158
+ type: "simple-fill",
162
159
  style: "solid",
163
- color: [255, 0, 0, 1],
164
- width: 1,
165
- },
166
- };
167
- var pos = {
168
- visible: true,
169
- top: 95,
170
- right: 127,
171
- };
172
- if (mapConfig && mapConfig.maskPos) {
173
- pos = MapUtils.deepClones(
174
- true,
175
- {},
176
- pos,
177
- mapConfig.maskPos
160
+ color: [100, 100, 255, 0.5],
161
+ outline: {
162
+ type: "simple-line",
163
+ style: "solid",
164
+ color: [255, 0, 0, 1],
165
+ width: 1,
166
+ },
167
+ };
168
+ var pos = {
169
+ visible: true,
170
+ top: 95,
171
+ right: 127,
172
+ };
173
+ if (mapConfig && mapConfig.maskPos) {
174
+ pos = MapUtils.deepClones(
175
+ true,
176
+ {},
177
+ pos,
178
+ mapConfig.maskPos
179
+ );
180
+ }
181
+ that.addMaskLayer(
182
+ context.humanLayerUsageID,
183
+ context.humanLayerKeyFieldName,
184
+ context.regionCode,
185
+ style,
186
+ zoom,
187
+ pos
178
188
  );
179
189
  }
180
- that.addMaskLayer(
181
- context.humanLayerUsageID,
182
- context.humanLayerKeyFieldName,
183
- context.regionCode,
184
- style,
185
- zoom,
186
- pos
187
- );
188
- }
189
- } else if (context.mapCenterFlag == "3") {
190
- if (context.coordinateX && context.coordinateY) {
191
- that.centerAndZoom(
192
- context.coordinateX,
193
- context.coordinateY,
194
- 1
195
- );
196
- }
197
- if (context.humanLayerUsageID && context.regionCode) {
198
- var zoom = gisParams && gisParams.maskZoom == false;
199
- var style = {
200
- type: "simple-fill",
201
- style: "solid",
202
- color: [100, 100, 255, 0],
203
- outline: {
204
- type: "simple-line",
190
+ } else if (context.mapCenterFlag == "3") {
191
+ if (context.coordinateX && context.coordinateY) {
192
+ that.centerAndZoom(
193
+ context.coordinateX,
194
+ context.coordinateY,
195
+ 1
196
+ );
197
+ }
198
+ if (context.humanLayerUsageID && context.regionCode) {
199
+ var zoom = gisParams && gisParams.maskZoom == false;
200
+ var style = {
201
+ type: "simple-fill",
205
202
  style: "solid",
206
- color: [255, 0, 0, 1],
207
- width: 3,
208
- },
209
- };
210
- var pos = {
211
- visible: true,
212
- top: 95,
213
- right: 127,
214
- };
215
- if (mapConfig && mapConfig.maskPos) {
216
- pos = MapUtils.deepClones(
217
- true,
218
- {},
219
- pos,
220
- mapConfig.maskPos
203
+ color: [100, 100, 255, 0],
204
+ outline: {
205
+ type: "simple-line",
206
+ style: "solid",
207
+ color: [255, 0, 0, 1],
208
+ width: 3,
209
+ },
210
+ };
211
+ var pos = {
212
+ visible: true,
213
+ top: 95,
214
+ right: 127,
215
+ };
216
+ if (mapConfig && mapConfig.maskPos) {
217
+ pos = MapUtils.deepClones(
218
+ true,
219
+ {},
220
+ pos,
221
+ mapConfig.maskPos
222
+ );
223
+ }
224
+ that.addMaskLayer(
225
+ context.humanLayerUsageID,
226
+ context.humanLayerKeyFieldName,
227
+ context.regionCode,
228
+ style,
229
+ zoom,
230
+ pos
221
231
  );
222
232
  }
223
- that.addMaskLayer(
224
- context.humanLayerUsageID,
225
- context.humanLayerKeyFieldName,
226
- context.regionCode,
227
- style,
228
- zoom,
229
- pos
230
- );
231
233
  }
232
234
  }
233
- }
234
- try {
235
- //如果启用了实景功能需要注册实景监听
236
- if (context.mmsEnabled != undefined && that.gisMapContainer) {
237
- var mmsEnabled = Number(context.mmsEnabled);
238
- if (mmsEnabled > 0) {
239
- var eMap = window.eMapList[that.id];
240
- mmsMap = new EGovaMMSMap(
241
- $container,
242
- scene,
243
- msgPrefix,
244
- context.mmsParams,
245
- mapConfig,
246
- mmsEnabled,
247
- eMap
248
- );
235
+ try {
236
+ //如果启用了实景功能需要注册实景监听
237
+ if (context.mmsEnabled != undefined && that.gisMapContainer) {
238
+ var mmsEnabled = Number(context.mmsEnabled);
239
+ if (mmsEnabled > 0) {
240
+ var eMap = window.eMapList[that.id];
241
+ mmsMap = new EGovaMMSMap(
242
+ $container,
243
+ scene,
244
+ msgPrefix,
245
+ context.mmsParams,
246
+ mapConfig,
247
+ mmsEnabled,
248
+ eMap
249
+ );
250
+ }
249
251
  }
252
+ } catch (e) {
253
+ console.error(e.message);
250
254
  }
251
- } catch (e) {
252
- console.error(e.message);
253
- }
254
- callback && callback();
255
+ callback && callback();
256
+ };
257
+ var eMap = window.eMapList[that.id];
258
+ $.get(eMap.serverURL + '/home/gis/map/getsysconfig.htm?getConfigMode=onlyGetOtherConfig', {}, function (data) {
259
+ eMap.egovagis.sysConfig = $.extend({}, eMap.egovagis.sysConfig, data[0]);
260
+ cb(),
261
+ 'jsonp';
262
+ })
255
263
  };
256
264
 
257
265
  that.init = function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.33.28",
3
+ "version": "0.33.29",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {