egovamap 0.16.4 → 0.16.7

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.
@@ -333,10 +333,47 @@ var egovaBI = function(globeMap, gisMap, mapType){
333
333
  };
334
334
 
335
335
  var param = [data, true, false, null, null, false, drawParam.tagName, drawParam.clickCallback, drawParam.mouseOverCallback, clusterOption, false, drawParam.layerName, drawParam.callback, drawParam.drawOptions];
336
+ //三维聚类参数
337
+ var globeOptions = {
338
+ zoom:true,
339
+ scale: 0.9,
340
+ clear :true,
341
+ nearFarScalar:[8000, 1.0, 10000, 0.6],
342
+ clickCallBack: drawParam.clickCallback,
343
+ layerName: drawParam.layerName,
344
+ minSize:30,
345
+ clusterLimit: 20,
346
+ style:"default",
347
+ clusterImageInfo: {
348
+ horizontalOrigin: "center",
349
+ verticalOrigin: "bottom",
350
+ cssStyle: {
351
+ "borderRadius": 500,
352
+ "fillColor": "rgba(0,0,0,0.7)",
353
+ "borderLineWidth": 3,
354
+ "borderLineColor": "rgba(250,140,0,0.9)",
355
+ "paddingX": 15,
356
+ "paddingY": 6,
357
+ "marginBottom": 2
358
+ },
359
+ textStyle: {
360
+ "font": "60px Helvetica",
361
+ "fillColor": "rgba(220,220,220,1.0)",
362
+ "outlineColor": "black",
363
+ "outlineWidth": 1,
364
+ "padding": 1,
365
+ "textScale": 0.5,
366
+ "textStartX": 40,
367
+ "textStartY": 15
368
+ }
369
+ }
370
+ }
336
371
  if (globeMap) {
337
- globeMap.showMultiObjectCurrentPosition(...param);
372
+ globeMap.addClusterLayer({
373
+ data,
374
+ options:globeOptions
375
+ })
338
376
  } else if (gisMap) {
339
- param[5] = true;//三维采用高性能渲染
340
377
  gisMap.showMultiObjectCurrentPosition(...param );
341
378
  }
342
379
  }
@@ -362,6 +399,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
362
399
  symbolUrl = subUniqueCode;
363
400
  } else {
364
401
  symbolUrl = "".concat(subUniqueCode, ".png");
402
+ if(globeMap) symbolUrl = queryParam.gisServerURL ? `${queryParam.gisServerURL}/symbol/${symbolUrl}` : symbolUrl;
365
403
  }
366
404
  var dataList = features.map((function (feature) {
367
405
  return Object.assign({}, { x: feature.geometry.x, y: feature.geometry.y }, {
@@ -369,6 +407,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
369
407
  label:self.getLabel(feature.attributes),
370
408
  symbolType: -1,
371
409
  symbolUrl: symbolUrl,
410
+ scale: 0.5
372
411
  });
373
412
  }));
374
413
  callback && callback(dataList);
@@ -523,8 +523,8 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
523
523
  }
524
524
 
525
525
  /* 根据regionId缩放 */
526
- that.zoomByRegionId = function (regionId, options, callback) {
527
- that.callMap('zoomByRegionId', regionId, options, callback);
526
+ that.zoomByRegionCode = function (regionCode, options, callback) {
527
+ that.callMap('zoomByRegionCode', regionCode, options, callback);
528
528
  }
529
529
 
530
530
  /* 切换到截图工具 */
@@ -791,6 +791,14 @@ var EGovaGlobeMap = function ($container, pScene, prefix, mapConfig, context, ca
791
791
  that.fireEvent("zoomToLevel", {args: [level, duration]}, false);
792
792
  }
793
793
 
794
+ /* 缩放到指定级别 */
795
+ that.zoomByRegionCode = function (regionCode, options, callback) {
796
+ if (scene == null)
797
+ return;
798
+
799
+ that.fireEvent("zoomByRegionCode", {args: [regionCode, options, callback]}, false);
800
+ }
801
+
794
802
  //三维场景按照中心点旋转,更方便查看
795
803
  that.rotateScene = function (heading, pitch, roll, duration, callback) {
796
804
  if (scene == null)
@@ -426,12 +426,12 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
426
426
  }
427
427
 
428
428
  /* 根据regionId缩放 */
429
- that.zoomByRegionId = function (regionId, options, callback) {
429
+ that.zoomByRegionCode = function (regionCode, options, callback) {
430
430
  if(gisMap){
431
- gisMap.zoomByRegionId(regionId, options, callback);
431
+ gisMap.zoomByRegionCode(regionCode, options, callback);
432
432
  }
433
433
  if(globeMap){
434
- //globeMap.zoomByRegionId(regionId, options, callback);
434
+ globeMap.zoomByRegionCode(regionCode, options, callback);
435
435
  }
436
436
  }
437
437
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.16.4",
3
+ "version": "0.16.7",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {