egovamap 0.15.13 → 0.15.16
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/egovaBI.js +2 -2
- package/egovamap/egovagis.js +17 -18
- package/egovamap/egovagisviewer.js +34 -42
- package/egovamap/egovamap.js +11 -3
- package/package.json +1 -1
package/egovamap/egovaBI.js
CHANGED
|
@@ -136,8 +136,8 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
136
136
|
type: "text",
|
|
137
137
|
color: options.clusterStyle.fillColor,
|
|
138
138
|
text: "",
|
|
139
|
-
xoffset: options.clusterStyle.
|
|
140
|
-
yoffset: options.clusterStyle.
|
|
139
|
+
xoffset: options.clusterStyle.xoffset + "px",
|
|
140
|
+
yoffset: options.clusterStyle.yoffset + "px",
|
|
141
141
|
font: {
|
|
142
142
|
size: options.clusterStyle.fontSize + "px",
|
|
143
143
|
weight: options.clusterStyle.fontWeight || "normal",
|
package/egovamap/egovagis.js
CHANGED
|
@@ -475,7 +475,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
475
475
|
parentScene);
|
|
476
476
|
}
|
|
477
477
|
/* 显示案件分布 */
|
|
478
|
-
that.showRecListDistribution = function(infoJson, zoom, clickCallback, labelInfo,isShowLegend) {
|
|
478
|
+
that.showRecListDistribution = function(infoJson, zoom, clickCallback, labelInfo,isShowLegend, symbolUrl, options) {
|
|
479
479
|
if (scene == null || infoJson.length == 0)
|
|
480
480
|
return;
|
|
481
481
|
//如果xy坐标没有值不处理
|
|
@@ -493,7 +493,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
493
493
|
clickCallback(evt.args);
|
|
494
494
|
});
|
|
495
495
|
}
|
|
496
|
-
scene.fire((msgPrefix + ":showRecListDistribution"), { args : [ infoJson, zoom, labelInfo,isShowLegend ] }, parentScene, false);
|
|
496
|
+
scene.fire((msgPrefix + ":showRecListDistribution"), { args : [ infoJson, zoom, labelInfo,isShowLegend, symbolUrl, options] }, parentScene, false);
|
|
497
497
|
|
|
498
498
|
//如果启用了实景功能,同时进行实景定位
|
|
499
499
|
if(mmsMap && infoJson.length == 1) {
|
|
@@ -516,32 +516,31 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
516
516
|
// 移除监听
|
|
517
517
|
var clickBackName = "showMultiObjectCurrentPositionClick";
|
|
518
518
|
var mouseOverBackName = "showMultiObjectCurrentPositionMouseover";
|
|
519
|
-
|
|
519
|
+
var mouseOutBackName = "showMultiObjectCurrentPositionMouseout";
|
|
520
|
+
if (options&&options.callbacksuffix) {
|
|
520
521
|
clickBackName += options.callbacksuffix;
|
|
521
522
|
mouseOverBackName += options.callbacksuffix;
|
|
523
|
+
mouseOutBackName += options.callbacksuffix;
|
|
522
524
|
}
|
|
523
525
|
that.removeEventBind(clickBackName);
|
|
524
526
|
that.removeEventBind(mouseOverBackName);
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
for(var i = 0;i<arguments.length;i++){
|
|
528
|
-
if (arguments[i] instanceof Function) {
|
|
529
|
-
FuncList.push(arguments[i]);
|
|
530
|
-
}else{
|
|
531
|
-
args.push(arguments[i]);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
if (FuncList[0] instanceof Function) {
|
|
527
|
+
that.removeEventBind(mouseOutBackName);
|
|
528
|
+
if (clickCallback instanceof Function) {
|
|
535
529
|
that.bindEvent(clickBackName, function(evt) {
|
|
536
|
-
|
|
530
|
+
clickCallback(evt.args);
|
|
537
531
|
});
|
|
538
532
|
}
|
|
539
|
-
if (
|
|
533
|
+
if (mouseOverCallBack instanceof Function) {
|
|
540
534
|
that.bindEvent(mouseOverBackName, function(evt) {
|
|
541
|
-
|
|
535
|
+
mouseOverCallBack(evt.args);
|
|
536
|
+
});
|
|
537
|
+
}
|
|
538
|
+
if(mouseOutCallback instanceof Function){
|
|
539
|
+
that.bindEvent(mouseOutBackName, function(evt) {
|
|
540
|
+
mouseOutCallback(evt.args);
|
|
542
541
|
});
|
|
543
542
|
}
|
|
544
|
-
scene.fire((msgPrefix + ":showMultiObjectCurrentPosition"), {args:
|
|
543
|
+
scene.fire((msgPrefix + ":showMultiObjectCurrentPosition"), {args: [jsonInfo, zoom, bClear, hStyleID, infoStyle, bCanvas, tagName, clusterOption, hasHover, layerID, options]}, parentScene, false);
|
|
545
544
|
}
|
|
546
545
|
/* 显示监督员 */
|
|
547
546
|
that.showPatrolCurrentPosition = function (jsonInfo, zoom, bClear, hStyleID, clickCallback) {
|
|
@@ -1180,7 +1179,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig,con
|
|
|
1180
1179
|
|
|
1181
1180
|
/* 获取图层信息 */
|
|
1182
1181
|
that.getPhyLayerInfo=function (phyLayerID,getPhyLayerInfoCallBack) {
|
|
1183
|
-
that.removeEventBind("
|
|
1182
|
+
that.removeEventBind("getPhyLayerInfoCallback");
|
|
1184
1183
|
if (getPhyLayerInfoCallBack != undefined) {
|
|
1185
1184
|
that.bindEvent("getPhyLayerInfoCallback", function(evt) {
|
|
1186
1185
|
getPhyLayerInfoCallBack(evt.args);
|
|
@@ -303,7 +303,6 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
303
303
|
var mainScript = document.createElement('script');
|
|
304
304
|
mainScript.setAttribute('type', 'text/javascript');
|
|
305
305
|
var distOrSource = getLocalStorageItem('gisDebug') ? 'source' : 'dist';
|
|
306
|
-
distOrSource = 'source';
|
|
307
306
|
var cssUrl = gisServerURL + '/library/egovaviewer/build/' + distOrSource + '/index.css';
|
|
308
307
|
var mainLink = document.createElement('link');
|
|
309
308
|
// mainLink.setAttribute('name','egoavagisviewer_' + uniqueID);
|
|
@@ -759,7 +758,7 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
759
758
|
that.callMap('locateFeatureByIDs', layerID, keyValue, keyFiled, clearMap, style, hStyle, bZoom, randomColor, labelfield, labelstyle, geometry, where, renderCanvas, singleSelected, options, extendProperty, layerTag, outFieldStr, animiteStep, index, clipGeom, cb, popupTemplate);
|
|
760
759
|
}
|
|
761
760
|
/* 显示案件分布 */
|
|
762
|
-
that.showRecListDistribution = function (infoJson, zoom, clickCallback, labelInfo, isShowLegend, symbolUrl) {
|
|
761
|
+
that.showRecListDistribution = function (infoJson, zoom, clickCallback, labelInfo, isShowLegend, symbolUrl, options) {
|
|
763
762
|
if (scene == null || infoJson.length == 0)
|
|
764
763
|
return;
|
|
765
764
|
//如果xy坐标没有值不处理
|
|
@@ -769,23 +768,12 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
769
768
|
return;
|
|
770
769
|
}
|
|
771
770
|
}
|
|
772
|
-
|
|
773
|
-
// 移除监听
|
|
774
|
-
that.removeEventBind("showRecListDistributionCallback");
|
|
775
|
-
|
|
776
|
-
if (clickCallback != undefined) {
|
|
777
|
-
that.bindEvent("showRecListDistributionCallback", function (evt) {
|
|
778
|
-
clickCallback(evt.args);
|
|
779
|
-
});
|
|
780
|
-
}
|
|
781
|
-
scene.fire((msgPrefix + ":showRecListDistribution"), { args: [infoJson, zoom, labelInfo, isShowLegend] }, parentScene, false);
|
|
782
|
-
*/
|
|
783
|
-
|
|
771
|
+
|
|
784
772
|
var cb = function (type, data) {
|
|
785
773
|
if (clickCallback && type == 'showRecListDistributionCallback')
|
|
786
774
|
clickCallback(data);
|
|
787
775
|
};
|
|
788
|
-
that.callMap('showRecListDistribution', infoJson, zoom, labelInfo, isShowLegend, symbolUrl, cb);
|
|
776
|
+
that.callMap('showRecListDistribution', infoJson, zoom, labelInfo, isShowLegend, symbolUrl, cb, options);
|
|
789
777
|
//如果启用了实景功能,同时进行实景定位
|
|
790
778
|
if (mmsMap && infoJson.length == 1) {
|
|
791
779
|
var recInfo = infoJson[0];
|
|
@@ -1785,48 +1773,52 @@ var EGovaGISMap = function ($container, pScene, prefix, gisParams, mapConfig, co
|
|
|
1785
1773
|
};
|
|
1786
1774
|
that.callMap('getCenterPoint', polygon, cb);
|
|
1787
1775
|
}
|
|
1788
|
-
|
|
1789
|
-
|
|
1776
|
+
|
|
1777
|
+
/*设置图层显示与隐藏*/
|
|
1790
1778
|
that.setLayerVisible = function (name, visible) {
|
|
1791
1779
|
if (scene == null)
|
|
1792
1780
|
return;
|
|
1793
|
-
|
|
1781
|
+
|
|
1794
1782
|
that.callMap('setLayerVisible', name, visible);
|
|
1795
1783
|
}
|
|
1796
1784
|
|
|
1797
|
-
that.removeWMSLayer = function(layerName){
|
|
1785
|
+
that.removeWMSLayer = function (layerName) {
|
|
1798
1786
|
if (scene == null)
|
|
1799
1787
|
return;
|
|
1800
|
-
|
|
1788
|
+
|
|
1801
1789
|
that.callMap('removeWMSLayer', layerName);
|
|
1802
1790
|
}
|
|
1803
|
-
|
|
1804
|
-
that.getMainSubTypeTree = function (params, callback) {
|
|
1805
|
-
if (scene == null)
|
|
1806
|
-
return;
|
|
1807
|
-
var cb = function (type, data) {
|
|
1808
|
-
if (callback && type == 'getMainSubTypeTreeCallback') {
|
|
1809
|
-
callback(data);
|
|
1810
|
-
}
|
|
1811
|
-
};
|
|
1812
|
-
that.callMap('getMainSubTypeTree', params, cb);
|
|
1813
|
-
}
|
|
1814
1791
|
|
|
1815
|
-
|
|
1816
|
-
|
|
1817
|
-
|
|
1818
|
-
|
|
1819
|
-
|
|
1820
|
-
|
|
1821
|
-
|
|
1822
|
-
|
|
1823
|
-
|
|
1824
|
-
|
|
1792
|
+
that.getMainSubTypeTree = function (params, callback) {
|
|
1793
|
+
if (scene == null)
|
|
1794
|
+
return;
|
|
1795
|
+
var cb = function (type, data) {
|
|
1796
|
+
if (callback && type == 'getMainSubTypeTreeCallback') {
|
|
1797
|
+
callback(data);
|
|
1798
|
+
}
|
|
1799
|
+
};
|
|
1800
|
+
that.callMap('getMainSubTypeTree', params, cb);
|
|
1801
|
+
}
|
|
1802
|
+
|
|
1803
|
+
that.getRegion = function (params, callback) {
|
|
1804
|
+
if (scene == null)
|
|
1805
|
+
return;
|
|
1806
|
+
var cb = function (type, data) {
|
|
1807
|
+
if (callback && type == 'getRegionCallback') {
|
|
1808
|
+
callback(data);
|
|
1809
|
+
}
|
|
1810
|
+
};
|
|
1811
|
+
that.callMap('getRegion', params, cb);
|
|
1812
|
+
}
|
|
1825
1813
|
|
|
1826
|
-
that.getMapConfig = function(key, callback){
|
|
1814
|
+
that.getMapConfig = function (key, callback) {
|
|
1827
1815
|
that.callMap('getMapConfig', key, callback);
|
|
1828
1816
|
}
|
|
1829
1817
|
|
|
1818
|
+
that.clearLayerSelectStyle = function (id, options) {
|
|
1819
|
+
that.callMap('clearLayerSelectStyle', id, options);
|
|
1820
|
+
}
|
|
1821
|
+
|
|
1830
1822
|
that.init();
|
|
1831
1823
|
}
|
|
1832
1824
|
|
package/egovamap/egovamap.js
CHANGED
|
@@ -1638,7 +1638,7 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
1638
1638
|
}
|
|
1639
1639
|
};
|
|
1640
1640
|
/* 显示案件分布 */
|
|
1641
|
-
that.showRecListDistribution = function (infoJson, zoom, clickCallback, labelInfo, isShowLegend) {
|
|
1641
|
+
that.showRecListDistribution = function (infoJson, zoom, clickCallback, labelInfo, isShowLegend, symbolUrl, options) {
|
|
1642
1642
|
if (scene == null)
|
|
1643
1643
|
return;
|
|
1644
1644
|
if (gisMap != null) {
|
|
@@ -3729,10 +3729,10 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
3729
3729
|
}
|
|
3730
3730
|
|
|
3731
3731
|
//获取GIS配置
|
|
3732
|
-
that.getMapConfig = function(key, callback){
|
|
3732
|
+
that.getMapConfig = function (key, callback) {
|
|
3733
3733
|
if (scene == null)
|
|
3734
3734
|
return;
|
|
3735
|
-
if(globeMap != null) {
|
|
3735
|
+
if (globeMap != null) {
|
|
3736
3736
|
return globeMap.getMapConfig(key, callback)
|
|
3737
3737
|
}
|
|
3738
3738
|
if (gisMap != null) {
|
|
@@ -3740,6 +3740,14 @@ var EGovaMap = function (containerID, callback, mapConfig, mapType, mapParam, co
|
|
|
3740
3740
|
}
|
|
3741
3741
|
}
|
|
3742
3742
|
|
|
3743
|
+
that.clearLayerSelectStyle = function (id, options) {
|
|
3744
|
+
if (scene == null)
|
|
3745
|
+
return;
|
|
3746
|
+
if (gisMap != null) {
|
|
3747
|
+
gisMap.clearLayerSelectStyle.apply(this, arguments);
|
|
3748
|
+
}
|
|
3749
|
+
}
|
|
3750
|
+
|
|
3743
3751
|
|
|
3744
3752
|
that.initMap(containerID, callback, mapType, mapConfig);
|
|
3745
3753
|
|