egovamap 0.15.2 → 0.15.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.
@@ -348,6 +348,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
348
348
  var subUniqueCode = options.subUniqueCode;
349
349
  let queryCallback = function (featureInfos) {
350
350
  var features = featureInfos[queryParam.phyLayerIDs];
351
+ if (!features || !features.length) return;
351
352
  var symbolUrl = "";
352
353
  if (subUniqueCode.indexOf("http") > -1) {
353
354
  symbolUrl = subUniqueCode;
@@ -377,7 +378,7 @@ var egovaBI = function(globeMap, gisMap, mapType){
377
378
  this.drawOtherParts = function (options, data) {
378
379
  var self = this;
379
380
  const geomType = options.geomType;
380
- let queryParam = options.queryParam;
381
+ let queryParam = options.queryParam || {};
381
382
  function showParts(data) {
382
383
 
383
384
  }
@@ -386,29 +387,34 @@ var egovaBI = function(globeMap, gisMap, mapType){
386
387
  showParts(data);
387
388
  } else {
388
389
  const layerID = queryParam.phyLayerIDs;
390
+ const layerName = queryParam.layerName;
389
391
  const keyField = null;
390
392
  const keyValue = null;
391
393
  const clearMap = queryParam.clearMap || true;
392
394
  let inStyle = queryParam.style || {
393
- color: "lightblue"
395
+ color: "blue"
394
396
  };
395
397
  let inHStyle = queryParam.hStyle || {
396
- color: "lightblue"
398
+ color: "blue"
397
399
  };
398
400
  let style = null, hStyle = null;
399
401
  if (geomType == 1) {
400
402
  } else if (geomType == 2) {
401
403
  style = {
402
404
  type: "simple-line", // autocasts as new SimpleLineSymbol()
403
- color: inStyle.color || "lightblue",
405
+ color: inStyle.color || "blue",
404
406
  width: inStyle.width || "2px",
405
- style: inStyle.style || "solid"
407
+ style: inStyle.style || "solid",
408
+ cap: inStyle.cap || "round",
409
+ join: inStyle.join || "round",
406
410
  };
407
411
  hStyle = {
408
412
  type: "simple-line", // autocasts as new SimpleLineSymbol()
409
- color: inHStyle.color || "lightblue",
410
- width: inHStyle.width || "2px",
411
- style: inHStyle.style || "solid"
413
+ color: inHStyle.color || "red",
414
+ width: inHStyle.width || inStyle.width || "2px",
415
+ style: inHStyle.style || inStyle.style || "solid",
416
+ cap: inHStyle.cap || inStyle.cap || "round",
417
+ join: inHStyle.join || inStyle.join || "round",
412
418
  };
413
419
  } else if (geomType == 3) {
414
420
  style = {
@@ -416,17 +422,23 @@ var egovaBI = function(globeMap, gisMap, mapType){
416
422
  color: inStyle.color || [51, 51, 204, 0.9],
417
423
  style: inStyle.style || "solid",
418
424
  outline: { // autocasts as new SimpleLineSymbol()
419
- color: inStyle.outlineColor || "white",
420
- width: inStyle.outlineWidth || "1px"
425
+ color: inStyle.outlineColor || "blue",
426
+ width: inStyle.outlineWidth || "1px",
427
+ style: inStyle.outlineStyle || "solid",
428
+ cap: inStyle.outlineCap || "round",
429
+ join: inStyle.outlineJoin || "round",
421
430
  }
422
431
  };
423
432
  hStyle = {
424
433
  type: "simple-fill", // autocasts as new SimpleFillSymbol()
425
434
  color: inHStyle.color || [51, 51, 204, 0.9],
426
- style: inHStyle.style || "solid",
435
+ style: inHStyle.style || inStyle.style || "solid",
427
436
  outline: { // autocasts as new SimpleLineSymbol()
428
- color: inHStyle.outlineColor || "white",
429
- width: inHStyle.outlineWidth || "1px"
437
+ color: inHStyle.outlineColor || "red",
438
+ width: inHStyle.outlineWidth || inStyle.outlineWidth || "1px",
439
+ style: inHStyle.outlineStyle || inStyle.outlineStyle || "solid",
440
+ cap: inHStyle.outlineCap || inStyle.outlineCap || "round",
441
+ join: inHStyle.outlineJoin || inStyle.outlineJoin || "round",
430
442
  }
431
443
  };
432
444
  }
@@ -436,8 +448,13 @@ var egovaBI = function(globeMap, gisMap, mapType){
436
448
  const labelstyle = null;
437
449
  const geometry = null;
438
450
  const where = queryParam.where || "1=1";
451
+ const opts = {
452
+ layerId: layerName,
453
+ mouseOverCallback: queryParam.mouseOverCallback
454
+ };
439
455
 
440
- let param = [layerID, keyField, keyValue, clearMap, style, hStyle, bZoom, randomColor, labelField, labelstyle, geometry, where];
456
+ let param = [layerID, keyField, keyValue, clearMap, style, hStyle, bZoom, randomColor, labelField, labelstyle, geometry, where, null, null, opts, null, null, null, null, null, null, queryParam.callback];
457
+ //let param = [layerID, keyField, keyValue, clearMap, style, hStyle, bZoom, randomColor, labelField, labelstyle, geometry, where, null, null, opts, null, null, null, null, queryParam.callback];
441
458
  if (globeMap) {
442
459
  gisMap.locateFeatureByIDs(...param);
443
460
  } else if (gisMap) {
@@ -483,10 +500,10 @@ var egovaBI = function(globeMap, gisMap, mapType){
483
500
  }
484
501
  }
485
502
 
486
- if(data) {
503
+ if (data) {
487
504
  execOperation(data);
488
505
  } else {
489
- if(!options.idbSetting.usageID){return}
506
+ if (!options.idbSetting.usageID) { return }
490
507
 
491
508
  let storeName = !!globeMap ? "usageID" : "usage2D" + "_" + options.idbSetting.usageID;
492
509
  let queryFromGIS = () => {
@@ -496,33 +513,33 @@ var egovaBI = function(globeMap, gisMap, mapType){
496
513
  where: filterString,
497
514
  geometry: '',
498
515
  outGeometry: true,
499
- options:{
500
- originalData:true
516
+ options: {
517
+ originalData: true
501
518
  }
502
519
  }
503
520
  let queryCallback = function (featureInfos) {
504
521
  execOperation(featureInfos);
505
522
  }
506
- if(gisMap) {
507
- gisMap.queryFeature(queryParam, queryCallback)
523
+ if (gisMap) {
524
+ gisMap.queryFeature(queryParam, queryCallback)
508
525
  }
509
526
  }
510
527
 
511
- if(!options.idbSetting.enabled) {
528
+ if (!options.idbSetting.enabled) {
512
529
  // 直接查询
513
530
  queryFromGIS()
514
531
  } else {
515
532
  // 查询是否存在表
516
533
  checkObjectStore(storeName)
517
- .then(function(hasObjStore) {
518
- if(hasObjStore) {
519
- // 如果有,读取本地
520
- execOperation();
521
- } else {
522
- // 如果没有,查询queryFeature
523
- queryFromGIS()
524
- }
525
- })
534
+ .then(function (hasObjStore) {
535
+ if (hasObjStore) {
536
+ // 如果有,读取本地
537
+ execOperation();
538
+ } else {
539
+ // 如果没有,查询queryFeature
540
+ queryFromGIS()
541
+ }
542
+ })
526
543
  }
527
544
  }
528
545
  }
@@ -581,6 +581,13 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
581
581
  }
582
582
  scene.fire((msgPrefix + ":getBuffer"), {args: args}, parentScene, true);
583
583
  }
584
+ /* 获取多点的缓冲区 */
585
+ that.getMultiPointBuffer = function(points, radius){
586
+ if (scene == null)
587
+ return;
588
+ scene.fire((msgPrefix + ":getMultiPointBuffer"), {args: args}, parentScene, true);
589
+
590
+ }
584
591
  /* 显示监督员责任网格 */
585
592
  that.showPatrolDutygridCells = function(infoJson, zoom, clickCallback) {
586
593
  if (scene == null)
@@ -751,6 +751,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
751
751
  var cb = function (type, data) {
752
752
  if (callback) {
753
753
  if (type == 'locateFeatureByIDsCallback') callback(data);
754
+ else if (type == 'locateFeatureByIDsMouseOver') options && options.mouseOverCallback(data);
754
755
  } else {
755
756
  that.fireCallback(type, data);
756
757
  }
@@ -1793,7 +1793,17 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
1793
1793
  }
1794
1794
 
1795
1795
  }
1796
-
1796
+ /**
1797
+ * @param {*} points 点位坐标list,[[x,y],...]
1798
+ * @param {*} radius 缓冲距离,单位为米
1799
+ * @returns
1800
+ */
1801
+ that.getMultiPointBuffer = function(points, radius){
1802
+ if (scene == null)
1803
+ return;
1804
+ if (gisMap != null)
1805
+ gismap.getMultiPointBuffer(this, arguments);
1806
+ }
1797
1807
 
1798
1808
  /* 显示监督员责任网格 */
1799
1809
  that.showPatrolDutygridCells = function (infoJson, zoom, clickCallback) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "egovamap",
3
- "version": "0.15.2",
3
+ "version": "0.15.6",
4
4
  "description": "eUrbanGIS SDK",
5
5
  "main": "index.js",
6
6
  "scripts": {