egovamap 0.15.8 → 0.15.11

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.
@@ -323,7 +323,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
323
323
  "color": ctrOption.labelColor || [255, 255, 255, 1],
324
324
  "text": "",
325
325
  "zlevel": ctrOption.labelZlevel || 1,
326
- "yoffset": -4,
326
+ "yoffset": 0,
327
327
  "font": ctrOption.labelFont || {
328
328
  "family": "Arial",
329
329
  "size": 10
@@ -773,7 +773,14 @@ var egovaBI = function(globeMap, gisMap, mapType){
773
773
  }
774
774
  } else {
775
775
  var _data = JSON.parse(JSON.stringify(data[0]));
776
- showGrid(data[0]);
776
+ var newData = data[0];
777
+ if (newData && newData.geometry) {
778
+ _data = JSON.parse(JSON.stringify(data));
779
+ showGrid(data);
780
+ } else {
781
+ showGrid(data[0]);
782
+ }
783
+
777
784
  var dbRequest = window.indexedDB.open('regionDB');
778
785
  dbRequest.onsuccess = function() {
779
786
  addStore(this.result.version);
@@ -1834,6 +1834,31 @@ var EGovaGlobeMap = function ($container, pScene, prefix, mapConfig, context, ca
1834
1834
  return;
1835
1835
  scene.fire((msgPrefix + ":lineOperation"), {args: [options, data]}, parentScene, false);
1836
1836
  };
1837
+ that.getMainSubTypeTree = function(params, callback){
1838
+ if (scene == null)
1839
+ return;
1840
+ var cb = function (type, data) {
1841
+ if (callback && type == 'getMainSubTypeTreeCallback') {
1842
+ callback(data);
1843
+ }
1844
+ };
1845
+ scene.fire((msgPrefix + ":getMainSubTypeTree"), {args: [params, cb]}, parentScene, false);
1846
+ };
1847
+ that.getRegion = function(params, callback){
1848
+ if (scene == null)
1849
+ return;
1850
+ var cb = function (type, data) {
1851
+ if (callback && type == 'getRegionCallback') {
1852
+ callback(data);
1853
+ }
1854
+ };
1855
+ scene.fire((msgPrefix + ":getRegion"), {args: [params, cb]}, parentScene, false);
1856
+ };
1857
+ that.getMapConfig = function(key, callback){
1858
+ if (scene == null)
1859
+ return;
1860
+ scene.fire((msgPrefix + ":getMapConfig"), {args: [key, callback]}, parentScene, false);
1861
+ };
1837
1862
 
1838
1863
  that.init();
1839
1864
  };
@@ -3642,6 +3642,9 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
3642
3642
  that.getMainSubTypeTree = function (params, callback) {
3643
3643
  if (scene == null)
3644
3644
  return;
3645
+ if(globeMap != null) {
3646
+ return globeMap.getMainSubTypeTree(params, callback);
3647
+ }
3645
3648
  if (gisMap != null) {
3646
3649
  gisMap.getMainSubTypeTree(params, callback);
3647
3650
  }
@@ -3659,6 +3662,9 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
3659
3662
  that.getRegion = function (params, callback) {
3660
3663
  if (scene == null)
3661
3664
  return;
3665
+ if(globeMap != null) {
3666
+ return globeMap.getRegion(params, callback);
3667
+ }
3662
3668
  if (gisMap != null) {
3663
3669
  gisMap.getRegion(params, callback);
3664
3670
  }
@@ -3726,6 +3732,9 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
3726
3732
  that.getMapConfig = function(key, callback){
3727
3733
  if (scene == null)
3728
3734
  return;
3735
+ if(globeMap != null) {
3736
+ return globeMap.getMapConfig(key, callback)
3737
+ }
3729
3738
  if (gisMap != null) {
3730
3739
  gisMap.getMapConfig.apply(this, arguments);
3731
3740
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.15.8",
3
+ "version": "0.15.11",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {