egovamap 0.14.4 → 0.15.2

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.
@@ -278,13 +278,13 @@ var egovaBI = function(globeMap, gisMap, mapType){
278
278
  args.highLightType,
279
279
  args.infoStyle,
280
280
  args.renderCanvas,
281
- options.clickCallback,
282
281
  args.tagName,
282
+ options.clickCallback,
283
+ options.mouseOverCallback,
283
284
  args.clusterOption,
284
285
  args.hasHover,
285
- options.mouseOverCallback,
286
- options.mouseOutCallback,
287
286
  layerName,
287
+ options.mouseOutCallback,
288
288
  options.option
289
289
  );
290
290
  });
@@ -322,6 +322,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
322
322
  "color": ctrOption.labelColor || [255, 255, 255, 1],
323
323
  "text": "",
324
324
  "zlevel": ctrOption.labelZlevel || 1,
325
+ "yoffset": -4,
325
326
  "font": ctrOption.labelFont || {
326
327
  "family": "Arial",
327
328
  "size": 10
@@ -330,7 +331,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
330
331
  distance: ctrOption.distance || 50
331
332
  };
332
333
 
333
- var param = [data, true, false, null, null, false, drawParam.tagName, clusterOption, false, drawParam.callback, drawParam.layerName, drawParam.drawOptions];
334
+ var param = [data, true, false, null, null, false, drawParam.tagName, drawParam.clickCallback, drawParam.mouseOverCallback, clusterOption, false, drawParam.layerName, drawParam.callback, drawParam.drawOptions];
334
335
  if (globeMap) {
335
336
  globeMap.showMultiObjectCurrentPosition(...param);
336
337
  } else if (gisMap) {
@@ -514,8 +514,14 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
514
514
  if (scene == null)
515
515
  return;
516
516
  // 移除监听
517
- that.removeEventBind("showMultiObjectCurrentPositionClick"+tagName);
518
- that.removeEventBind("showMultiObjectCurrentPositionMouseover"+tagName);
517
+ var clickBackName = "showMultiObjectCurrentPositionClick";
518
+ var mouseOverBackName = "showMultiObjectCurrentPositionMouseover";
519
+ if(tagName){
520
+ clickBackName += tagName;
521
+ mouseOverBackName += tagName;
522
+ }
523
+ that.removeEventBind(clickBackName);
524
+ that.removeEventBind(mouseOverBackName);
519
525
  var args =[];
520
526
  var FuncList = [];
521
527
  for(var i = 0;i<arguments.length;i++){
@@ -526,12 +532,12 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
526
532
  }
527
533
  }
528
534
  if (FuncList[0] instanceof Function) {
529
- that.bindEvent("showMultiObjectCurrentPositionClick"+tagName, function(evt) {
535
+ that.bindEvent(clickBackName, function(evt) {
530
536
  FuncList[0](evt.args);
531
537
  });
532
538
  }
533
539
  if (FuncList[1] instanceof Function) {
534
- that.bindEvent("showMultiObjectCurrentPositionMouseover"+tagName, function(evt) {
540
+ that.bindEvent(mouseOverBackName, function(evt) {
535
541
  FuncList[1](evt.args);
536
542
  });
537
543
  }
@@ -1132,6 +1138,14 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
1132
1138
  return scene.fire(msgPrefix + ":getPolygonArea", {args: [geometry]},parentScene);
1133
1139
  }
1134
1140
 
1141
+ that.intersectGeometry = function (polygon1, polygon2) {
1142
+ return scene.fire(msgPrefix + ":intersectGeometry", {args: [polygon1, polygon2]}, parentScene);
1143
+ }
1144
+
1145
+ that.getCenterPoint = function (polygon) {
1146
+ return scene.fire(msgPrefix + ":getCenterPoint", {args: [polygon]}, parentScene);
1147
+ }
1148
+
1135
1149
  /* 根据PointID定位空中全景 */
1136
1150
  that.mmsAirPanoLocateByID = function(pointID) {
1137
1151
  if(mmsMap && mmsMap.mmsLoaded) {
@@ -1821,6 +1821,11 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
1821
1821
  };
1822
1822
  that.callMap('getRegion', params, cb);
1823
1823
  }
1824
+
1825
+ that.getMapConfig = function(key, callback){
1826
+ that.callMap('getMapConfig', key, callback);
1827
+ }
1828
+
1824
1829
  that.init();
1825
1830
  }
1826
1831
 
@@ -2587,6 +2587,26 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
2587
2587
  return gisMap.getPolygonArea.apply(this, arguments);
2588
2588
  }
2589
2589
 
2590
+ /**
2591
+ * 计算面的相交部分
2592
+ */
2593
+ that.intersectGeometry = function(polygon1, polygon2) {
2594
+ if (scene == null)
2595
+ return;
2596
+ if (gisMap != null)
2597
+ return gisMap.intersectGeometry.apply(this, arguments);
2598
+ }
2599
+
2600
+ /**
2601
+ * 获取面的中心点
2602
+ */
2603
+ that.getCenterPoint = function(polygon) {
2604
+ if (scene == null)
2605
+ return;
2606
+ if (gisMap != null)
2607
+ return gisMap.getCenterPoint.apply(this, arguments);
2608
+ }
2609
+
2590
2610
  /* 切换地图类型 */
2591
2611
  that.changeControlParam = function (type, param) {
2592
2612
  if (scene == null)
@@ -3692,6 +3712,15 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
3692
3712
  }
3693
3713
  }
3694
3714
 
3715
+ //获取GIS配置
3716
+ that.getMapConfig = function(key, callback){
3717
+ if (scene == null)
3718
+ return;
3719
+ if (gisMap != null) {
3720
+ gisMap.getMapConfig.apply(this, arguments);
3721
+ }
3722
+ }
3723
+
3695
3724
 
3696
3725
  that.initMap(containerID, callback, mapType, mapConfig);
3697
3726
 
package/package.json CHANGED
@@ -1,13 +1,14 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.14.4",
3
+ "version": "0.15.2",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {
7
7
  "version:minor": "npm version minor -m \"[A]发布 v%s\"",
8
8
  "version:patch": "npm version patch -m \"[A]发布修复版本 v%s\"",
9
9
  "pub": "npm publish --registry https://registry.npmjs.org/",
10
- "postpublish": "git push && git push --tags"
10
+ "postpublish": "git push && git push --tags",
11
+ "start": "parcel test/test.html"
11
12
  },
12
13
  "author": "egova",
13
14
  "license": "MIT",
@@ -16,5 +17,8 @@
16
17
  },
17
18
  "engines": {
18
19
  "node": ">=12.13"
20
+ },
21
+ "devDependencies": {
22
+ "parcel": "^2.3.1"
19
23
  }
20
24
  }