egovamap 0.24.4 → 0.24.6
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.
- package/egovamap/egovagisviewer.js +10 -0
- package/egovamap/egovamap.js +19 -1
- package/egovamap/egovamobile.js +6 -0
- package/package.json +1 -1
|
@@ -347,6 +347,12 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
347
347
|
if (!window.eMapList) {
|
|
348
348
|
window.eMapList = {};
|
|
349
349
|
}
|
|
350
|
+
|
|
351
|
+
if (typeof eMap === 'undefined') {
|
|
352
|
+
console.error('eMap未初始化');
|
|
353
|
+
return;
|
|
354
|
+
}
|
|
355
|
+
|
|
350
356
|
window.eMapList[that.id] = new eMap.default(
|
|
351
357
|
params,
|
|
352
358
|
that.globalCallback.bind(that));
|
|
@@ -1905,6 +1911,10 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1905
1911
|
that.callMap('agsToWKT', geometry, callback);
|
|
1906
1912
|
}
|
|
1907
1913
|
|
|
1914
|
+
that.getZoomInfo = function(callback) {
|
|
1915
|
+
that.callMap('getZoomInfo', callback);
|
|
1916
|
+
}
|
|
1917
|
+
|
|
1908
1918
|
that.zoomIn = function () {
|
|
1909
1919
|
that.callMap('zoomIn');
|
|
1910
1920
|
}
|
package/egovamap/egovamap.js
CHANGED
|
@@ -81,6 +81,11 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
that.initMap = function (container, callback, mapType, _mapConfig, mapParam) {
|
|
84
|
+
if (!container) {
|
|
85
|
+
console.error('container为空');
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
|
|
84
89
|
$mapsContainer = getMapContainer(container);
|
|
85
90
|
that.uniqueID = getUniqueID($mapsContainer);
|
|
86
91
|
msgPrefix = that.uniqueID;
|
|
@@ -188,7 +193,7 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
188
193
|
}
|
|
189
194
|
}
|
|
190
195
|
} catch (e) {
|
|
191
|
-
|
|
196
|
+
console.error(e.message);
|
|
192
197
|
}
|
|
193
198
|
|
|
194
199
|
//绑定地图切换事件
|
|
@@ -4388,6 +4393,19 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
4388
4393
|
that.geometryToWKT = function(geometry){
|
|
4389
4394
|
return GeometryTrans.geometryToWKT(geometry)
|
|
4390
4395
|
}
|
|
4396
|
+
|
|
4397
|
+
/**
|
|
4398
|
+
* 获取地图层级信息
|
|
4399
|
+
* @param {Function} callback 回调函数,返回地图的层级信息:[{ minZoom, maxZoom }]
|
|
4400
|
+
* @returns
|
|
4401
|
+
*/
|
|
4402
|
+
that.getZoomInfo = function(callback) {
|
|
4403
|
+
if (scene == null) { return; }
|
|
4404
|
+
if (gisMap != null) {
|
|
4405
|
+
gisMap.getZoomInfo(callback);
|
|
4406
|
+
}
|
|
4407
|
+
}
|
|
4408
|
+
|
|
4391
4409
|
that.initMap(containerID, callback, mapType, mapConfig);
|
|
4392
4410
|
|
|
4393
4411
|
// EGovaBI(globeMap).bind(this)();
|
package/egovamap/egovamobile.js
CHANGED
|
@@ -209,6 +209,12 @@ var EGovaMobileMap = function ($container, pScene, prefix, gisParams, mapConfig,
|
|
|
209
209
|
if (!window.eMapList) {
|
|
210
210
|
window.eMapList = {};
|
|
211
211
|
}
|
|
212
|
+
|
|
213
|
+
if (typeof eMap === 'undefined') {
|
|
214
|
+
console.error('eMap未初始化');
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
|
|
212
218
|
window.eMapList[that.id] = new eMap(
|
|
213
219
|
params,
|
|
214
220
|
that.onMapLoaded.bind(that));
|