egovamap 0.18.1 → 0.18.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.
- package/egovamap/egovaBI.js +45 -1
- package/package.json +1 -1
package/egovamap/egovaBI.js
CHANGED
|
@@ -836,11 +836,26 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
836
836
|
// 转换一下
|
|
837
837
|
var geometries = [];
|
|
838
838
|
var extraGeometries = [];
|
|
839
|
+
var specialAreaS=options.specialAreaS;//玲珑平台分类设色
|
|
839
840
|
for (var i = 0; i < realData.length; i++) {
|
|
840
841
|
var feature = realData[i];
|
|
841
842
|
var geom = feature.geometry;
|
|
842
843
|
geom.attributes = feature.attributes; // attributes会导致id没用,使用自带的id
|
|
843
|
-
|
|
844
|
+
var hasPush=false;
|
|
845
|
+
if(specialAreaS&&specialAreaS.length>0){
|
|
846
|
+
for (var j = 0; j < specialAreaS.length; j++) {
|
|
847
|
+
var specialArea=specialAreaS[j];
|
|
848
|
+
if(!specialArea.geometries){
|
|
849
|
+
specialArea.geometries=[];
|
|
850
|
+
}
|
|
851
|
+
let filterResult=new Function(`return ${specialArea.statusControl.compiled}`)().call(null,feature.attributes);
|
|
852
|
+
if(filterResult==true){
|
|
853
|
+
specialArea.geometries.push(geom);
|
|
854
|
+
hasPush=true;
|
|
855
|
+
}
|
|
856
|
+
}
|
|
857
|
+
}
|
|
858
|
+
!hasPush&&(geometries.push(geom));
|
|
844
859
|
}
|
|
845
860
|
if (options.specialArea && options.selectedSetting.selected.length) {
|
|
846
861
|
var extraIds = options.selectedSetting.selected.map(s => s.selectID);
|
|
@@ -896,6 +911,35 @@ var egovaBI = function(globeMap, gisMap, mapType){
|
|
|
896
911
|
options.eventSetting.clickCallback
|
|
897
912
|
);
|
|
898
913
|
}
|
|
914
|
+
if(specialAreaS&&specialAreaS.length>0){
|
|
915
|
+
for (var j = 0; j < specialAreaS.length; j++) {
|
|
916
|
+
var specialArea=specialAreaS[j];
|
|
917
|
+
if(specialArea.geometries.length>0){
|
|
918
|
+
gisMap.locateFeatureByCoords(specialArea.geometries, 'polygon',
|
|
919
|
+
options.layerName, // id,如果已经有attributes就没用了
|
|
920
|
+
specialArea.style, // style
|
|
921
|
+
options.highlightStyle, // highlightStyle
|
|
922
|
+
options.commonSetting.zoom, // zoom
|
|
923
|
+
options.keyFieldName,
|
|
924
|
+
specialArea.specialAreaStyle.textLabelShowEnabled&&specialArea.specialAreaStyle.labelFieldName, // keyField, labelField
|
|
925
|
+
specialArea.labelStyle, // labelStyle
|
|
926
|
+
false,// randomColor
|
|
927
|
+
false, // renderCanvas
|
|
928
|
+
true, // singleSelect
|
|
929
|
+
{
|
|
930
|
+
minZoom: options.visiblitySetting.beginLevel,
|
|
931
|
+
maxZoom: options.visiblitySetting.endLevel,
|
|
932
|
+
layerId: options.layerName,
|
|
933
|
+
comCallbak: callback
|
|
934
|
+
// hLabelStyle: options.hLabelStyle, // 选中文字时效果,没用
|
|
935
|
+
},
|
|
936
|
+
options.layerName, // layerTag
|
|
937
|
+
options.eventSetting.clickCallback
|
|
938
|
+
);
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
}
|
|
942
|
+
}
|
|
899
943
|
}
|
|
900
944
|
|
|
901
945
|
if (!data) {
|