@vtx/ol-map 1.0.132 → 1.0.134
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/CHANGELOG.md +217 -0
- package/README.md +205 -205
- package/lib/_util/EventEmitter.js +13 -11
- package/lib/_util/EventEmitter.js.map +1 -1
- package/lib/_util/StyleCache.js +10 -8
- package/lib/_util/StyleCache.js.map +1 -1
- package/lib/_util/encryptParams.js +22 -17
- package/lib/_util/encryptParams.js.map +1 -1
- package/lib/_util/filterSpecialCharacters.js +12 -12
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +1 -1
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getCookie.js +6 -5
- package/lib/_util/getCookie.js.map +1 -1
- package/lib/_util/getDefaultMapInfo.js +8 -7
- package/lib/_util/getDefaultMapInfo.js.map +1 -1
- package/lib/_util/getSystemInfo.js +8 -7
- package/lib/_util/getSystemInfo.js.map +1 -1
- package/lib/_util/getToken.js +4 -2
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +3 -2
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/http.js +32 -30
- package/lib/_util/http.js.map +1 -1
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/layer.js +37 -33
- package/lib/_util/layer.js.map +1 -1
- package/lib/_util/mapTool.js +37 -36
- package/lib/_util/mapTool.js.map +1 -1
- package/lib/_util/projzh/datum/bd-09.js +3 -2
- package/lib/_util/projzh/datum/bd-09.js.map +1 -1
- package/lib/_util/projzh/datum/gcj-02.js +2 -1
- package/lib/_util/projzh/datum/gcj-02.js.map +1 -1
- package/lib/_util/projzh/datum/index.js +3 -2
- package/lib/_util/projzh/datum/index.js.map +1 -1
- package/lib/_util/projzh/index.js +3 -2
- package/lib/_util/projzh/index.js.map +1 -1
- package/lib/_util/projzh/projection/baidu-mercator.js +2 -1
- package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -1
- package/lib/_util/projzh/projection/index.js +3 -2
- package/lib/_util/projzh/projection/index.js.map +1 -1
- package/lib/_util/projzh/projection/spherical-mercator.js +2 -1
- package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -1
- package/lib/_util/projzh/util.js +2 -1
- package/lib/_util/projzh/util.js.map +1 -1
- package/lib/_util/search.js +16 -13
- package/lib/_util/search.js.map +1 -1
- package/lib/_util/setCookie.js +6 -5
- package/lib/_util/setCookie.js.map +1 -1
- package/lib/_util/stringToFun.js +5 -5
- package/lib/_util/stringToFun.js.map +1 -1
- package/lib/_util/transform.js +10 -9
- package/lib/_util/transform.js.map +1 -1
- package/lib/_util/useColSize.js +3 -2
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +13 -12
- package/lib/_util/useSet.js.map +1 -1
- package/lib/analysis-layer/index.js +50 -44
- package/lib/analysis-layer/index.js.map +1 -1
- package/lib/analysis-layer/style/css.js.map +1 -1
- package/lib/analysis-layer/style/index.js.map +1 -1
- package/lib/buffer-draw/BufferDraw.js +13 -11
- package/lib/buffer-draw/BufferDraw.js.map +1 -1
- package/lib/buffer-draw/index.js +10 -10
- package/lib/buffer-draw/index.js.map +1 -1
- package/lib/buffer-draw/style/css.js.map +1 -1
- package/lib/buffer-draw/style/index.js.map +1 -1
- package/lib/circle/Circle.js +24 -22
- package/lib/circle/Circle.js.map +1 -1
- package/lib/circle/index.js +4 -4
- package/lib/circle/index.js.map +1 -1
- package/lib/circle/style/css.js.map +1 -1
- package/lib/circle/style/index.js.map +1 -1
- package/lib/config.js +2 -1
- package/lib/config.js.map +1 -1
- package/lib/convertCamelToCSS.js +2 -1
- package/lib/convertCamelToCSS.js.map +1 -1
- package/lib/dom/Dom.js +21 -19
- package/lib/dom/Dom.js.map +1 -1
- package/lib/dom/index.js +11 -11
- package/lib/dom/index.js.map +1 -1
- package/lib/dom/style/css.js.map +1 -1
- package/lib/dom/style/index.js.map +1 -1
- package/lib/events/index.js +6 -4
- package/lib/events/index.js.map +1 -1
- package/lib/feature-draw/FeatureDraw.js +46 -40
- package/lib/feature-draw/FeatureDraw.js.map +1 -1
- package/lib/feature-draw/index.js +11 -11
- package/lib/feature-draw/index.js.map +1 -1
- package/lib/feature-draw/style/css.js.map +1 -1
- package/lib/feature-draw/style/index.js.map +1 -1
- package/lib/feature-layer/FeatureLayer.js +126 -90
- package/lib/feature-layer/FeatureLayer.js.map +1 -1
- package/lib/feature-layer/MyCluster.js +31 -28
- package/lib/feature-layer/MyCluster.js.map +1 -1
- package/lib/feature-layer/createFeatureCollection.js +35 -27
- package/lib/feature-layer/createFeatureCollection.js.map +1 -1
- package/lib/feature-layer/index.js +16 -16
- package/lib/feature-layer/index.js.map +1 -1
- package/lib/feature-layer/style/css.js.map +1 -1
- package/lib/feature-layer/style/index.js.map +1 -1
- package/lib/flow-line-layer/FlowLineLayer.js +25 -22
- package/lib/flow-line-layer/FlowLineLayer.js.map +1 -1
- package/lib/flow-line-layer/index.js +16 -16
- package/lib/flow-line-layer/index.js.map +1 -1
- package/lib/flow-line-layer/style/css.js.map +1 -1
- package/lib/flow-line-layer/style/index.js.map +1 -1
- package/lib/fly-line-layer/FlyLineLayer.js +14 -12
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -1
- package/lib/fly-line-layer/index.js +9 -9
- package/lib/fly-line-layer/index.js.map +1 -1
- package/lib/fly-line-layer/style/css.js.map +1 -1
- package/lib/fly-line-layer/style/index.js.map +1 -1
- package/lib/group-layer/GroupLayer.js +12 -10
- package/lib/group-layer/GroupLayer.js.map +1 -1
- package/lib/group-layer/index.js +9 -9
- package/lib/group-layer/index.js.map +1 -1
- package/lib/group-layer/style/css.js.map +1 -1
- package/lib/group-layer/style/index.js.map +1 -1
- package/lib/heatmap-layer/HeatmapLayer.js +30 -29
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -1
- package/lib/heatmap-layer/index.js +9 -9
- package/lib/heatmap-layer/index.js.map +1 -1
- package/lib/heatmap-layer/style/css.js.map +1 -1
- package/lib/heatmap-layer/style/index.js.map +1 -1
- package/lib/high-layer/HighLayer.js +15 -13
- package/lib/high-layer/HighLayer.js.map +1 -1
- package/lib/high-layer/index.js +13 -12
- package/lib/high-layer/index.js.map +1 -1
- package/lib/high-layer/style/css.js.map +1 -1
- package/lib/high-layer/style/index.js.map +1 -1
- package/lib/image-layer/ImageLayer.js +33 -31
- package/lib/image-layer/ImageLayer.js.map +1 -1
- package/lib/image-layer/ImageTileLayer.js +33 -31
- package/lib/image-layer/ImageTileLayer.js.map +1 -1
- package/lib/image-layer/index.js +11 -11
- package/lib/image-layer/index.js.map +1 -1
- package/lib/image-layer/style/css.js.map +1 -1
- package/lib/image-layer/style/index.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legend/index.js +23 -21
- package/lib/legend/index.js.map +1 -1
- package/lib/legend/style/css.js.map +1 -1
- package/lib/legend/style/index.js.map +1 -1
- package/lib/legend/style/index.less +73 -73
- package/lib/map/Analysis.js +27 -24
- package/lib/map/Analysis.js.map +1 -1
- package/lib/map/Layers.js +28 -24
- package/lib/map/Layers.js.map +1 -1
- package/lib/map/Popup.js +24 -23
- package/lib/map/Popup.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +2 -1
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +9 -7
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js +10 -8
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +9 -7
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/index.js +21 -15
- package/lib/map/getBaseLayers/index.js.map +1 -1
- package/lib/map/index.js +46 -42
- package/lib/map/index.js.map +1 -1
- package/lib/map/style/css.js.map +1 -1
- package/lib/map/style/index.js.map +1 -1
- package/lib/map/style/index.less +152 -152
- package/lib/map-icon/svg/index.js +3 -2
- package/lib/map-icon/svg/index.js.map +1 -1
- package/lib/map-icon/svg/tuceng.svg.js.map +1 -1
- package/lib/marker/Marker.js +33 -26
- package/lib/marker/Marker.js.map +1 -1
- package/lib/marker/index.js +4 -4
- package/lib/marker/index.js.map +1 -1
- package/lib/marker/style/css.js.map +1 -1
- package/lib/marker/style/index.js.map +1 -1
- package/lib/path-line-layer/PathLineLayer.js +23 -21
- package/lib/path-line-layer/PathLineLayer.js.map +1 -1
- package/lib/path-line-layer/getPathLineStyles.js +9 -8
- package/lib/path-line-layer/getPathLineStyles.js.map +1 -1
- package/lib/path-line-layer/index.js +16 -16
- package/lib/path-line-layer/index.js.map +1 -1
- package/lib/path-line-layer/style/css.js.map +1 -1
- package/lib/path-line-layer/style/index.js.map +1 -1
- package/lib/path-play-back/PathPlayBack.js +21 -19
- package/lib/path-play-back/PathPlayBack.js.map +1 -1
- package/lib/path-play-back/index.js +9 -8
- package/lib/path-play-back/index.js.map +1 -1
- package/lib/path-play-back/style/css.js.map +1 -1
- package/lib/path-play-back/style/index.js.map +1 -1
- package/lib/poi-search/Location.js +8 -8
- package/lib/poi-search/Location.js.map +1 -1
- package/lib/poi-search/PoiList.js +10 -10
- package/lib/poi-search/PoiList.js.map +1 -1
- package/lib/poi-search/Search.js +21 -21
- package/lib/poi-search/Search.js.map +1 -1
- package/lib/poi-search/index.js +11 -10
- package/lib/poi-search/index.js.map +1 -1
- package/lib/poi-search/style/css.js.map +1 -1
- package/lib/poi-search/style/index.js.map +1 -1
- package/lib/poi-search/style/index.less +97 -97
- package/lib/point/Point.js +24 -22
- package/lib/point/Point.js.map +1 -1
- package/lib/point/index.js +4 -4
- package/lib/point/index.js.map +1 -1
- package/lib/point/style/css.js.map +1 -1
- package/lib/point/style/index.js.map +1 -1
- package/lib/polygon/Polygon.js +24 -22
- package/lib/polygon/Polygon.js.map +1 -1
- package/lib/polygon/index.js +4 -4
- package/lib/polygon/index.js.map +1 -1
- package/lib/polygon/style/css.js.map +1 -1
- package/lib/polygon/style/index.js.map +1 -1
- package/lib/polyline/Polyline.js +24 -22
- package/lib/polyline/Polyline.js.map +1 -1
- package/lib/polyline/index.js +4 -4
- package/lib/polyline/index.js.map +1 -1
- package/lib/polyline/style/css.js.map +1 -1
- package/lib/polyline/style/index.js.map +1 -1
- package/lib/popup/index.js +16 -15
- package/lib/popup/index.js.map +1 -1
- package/lib/popup/style/css.js.map +1 -1
- package/lib/popup/style/index.js.map +1 -1
- package/lib/popup/style/index.less +129 -129
- package/lib/provider/index.js +5 -3
- package/lib/provider/index.js.map +1 -1
- package/lib/provider/style/css.js.map +1 -1
- package/lib/provider/style/index.js.map +1 -1
- package/lib/renderer/Fill.js +19 -17
- package/lib/renderer/Fill.js.map +1 -1
- package/lib/renderer/Stroke.js +19 -17
- package/lib/renderer/Stroke.js.map +1 -1
- package/lib/renderer/index.js +15 -13
- package/lib/renderer/index.js.map +1 -1
- package/lib/renderer/style/css.js.map +1 -1
- package/lib/renderer/style/index.js.map +1 -1
- package/lib/renderer/transformRgb.js +2 -1
- package/lib/renderer/transformRgb.js.map +1 -1
- package/lib/search-map/VtxModal.js +25 -22
- package/lib/search-map/VtxModal.js.map +1 -1
- package/lib/search-map/index.js +11 -10
- package/lib/search-map/index.js.map +1 -1
- package/lib/search-map/style/css.js.map +1 -1
- package/lib/search-map/style/index.js.map +1 -1
- package/lib/search-map/style/index.less +82 -82
- package/lib/search-map/style/modal.less +58 -58
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -9
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/tile-layer/TileLayer.js +22 -20
- package/lib/tile-layer/TileLayer.js.map +1 -1
- package/lib/tile-layer/index.js +4 -4
- package/lib/tile-layer/index.js.map +1 -1
- package/lib/tile-layer/style/css.js.map +1 -1
- package/lib/tile-layer/style/index.js.map +1 -1
- package/lib/tools/Layer/LayerService.js +9 -8
- package/lib/tools/Layer/LayerService.js.map +1 -1
- package/lib/tools/Layer/LayersCheckService.js +39 -32
- package/lib/tools/Layer/LayersCheckService.js.map +1 -1
- package/lib/tools/Layer/index.js +15 -15
- package/lib/tools/Layer/index.js.map +1 -1
- package/lib/tools/Layer/index.less +43 -43
- package/lib/tools/Search/index.js +21 -19
- package/lib/tools/Search/index.js.map +1 -1
- package/lib/tools/Toolbox/BoxSelect/index.js +6 -5
- package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/CircleSelect/index.js +6 -5
- package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/EagleEye/index.js +11 -10
- package/lib/tools/Toolbox/EagleEye/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +36 -33
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.js +24 -23
- package/lib/tools/Toolbox/MapBookmark/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.less +20 -20
- package/lib/tools/Toolbox/MapDownload/index.js +2 -2
- package/lib/tools/Toolbox/MapDownload/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.js +20 -19
- package/lib/tools/Toolbox/MapPrint/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.less +4 -4
- package/lib/tools/Toolbox/Measure/Area/index.js +4 -3
- package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Distance/index.js +4 -3
- package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Measure.js +10 -8
- package/lib/tools/Toolbox/Measure/Measure.js.map +1 -1
- package/lib/tools/Toolbox/Measure/index.js +14 -13
- package/lib/tools/Toolbox/Measure/index.js.map +1 -1
- package/lib/tools/Toolbox/PolygonSelect/index.js +6 -5
- package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/ScaleLine/index.js +11 -10
- package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.js +43 -41
- package/lib/tools/Toolbox/SelectTools/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.less +87 -87
- package/lib/tools/Toolbox/SpaceQuery/index.js +13 -13
- package/lib/tools/Toolbox/SpaceQuery/index.js.map +1 -1
- package/lib/tools/Toolbox/SpaceQuery/index.less +16 -16
- package/lib/tools/Toolbox/ZoomInput/index.js +11 -10
- package/lib/tools/Toolbox/ZoomInput/index.js.map +1 -1
- package/lib/tools/Toolbox/ZoomInput/index.less +5 -5
- package/lib/tools/Toolbox/index.js +10 -8
- package/lib/tools/Toolbox/index.js.map +1 -1
- package/lib/tools/Toolbox/index.less +2 -2
- package/lib/tools/Utils/CreateOverlay.js +11 -10
- package/lib/tools/Utils/CreateOverlay.js.map +1 -1
- package/lib/tools/Utils/Draw.js +19 -16
- package/lib/tools/Utils/Draw.js.map +1 -1
- package/lib/tools/Utils/HighLayer.js +16 -14
- package/lib/tools/Utils/HighLayer.js.map +1 -1
- package/lib/tools/Utils/measure.js +7 -6
- package/lib/tools/Utils/measure.js.map +1 -1
- package/lib/tools/Utils/utils.js +45 -36
- package/lib/tools/Utils/utils.js.map +1 -1
- package/lib/tools/View/index.js +16 -15
- package/lib/tools/View/index.js.map +1 -1
- package/lib/tools/View/index.less +28 -28
- package/lib/tools/analysis-tool/index.js +20 -19
- package/lib/tools/analysis-tool/index.js.map +1 -1
- package/lib/tools/base-map-switch/index.js +16 -15
- package/lib/tools/base-map-switch/index.js.map +1 -1
- package/lib/tools/components/Chart/index.js +130 -120
- package/lib/tools/components/Chart/index.js.map +1 -1
- package/lib/tools/components/Icon/index.js +3 -2
- package/lib/tools/components/Icon/index.js.map +1 -1
- package/lib/tools/components/Info/index.js +3 -2
- package/lib/tools/components/Info/index.js.map +1 -1
- package/lib/tools/components/Info/index.less +26 -26
- package/lib/tools/components/ItemWrap/index.js +11 -10
- package/lib/tools/components/ItemWrap/index.js.map +1 -1
- package/lib/tools/components/ItemWrap/index.less +41 -41
- package/lib/tools/components/Modal/index.js +11 -10
- package/lib/tools/components/Modal/index.js.map +1 -1
- package/lib/tools/components/Modal/index.less +33 -33
- package/lib/tools/components/MyTabs/index.js +1 -1
- package/lib/tools/components/MyTabs/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.js +7 -7
- package/lib/tools/components/RequiredLabel/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.less +5 -5
- package/lib/tools/components/Select/index.js +3 -2
- package/lib/tools/components/Select/index.js.map +1 -1
- package/lib/tools/components/Table/index.js +17 -16
- package/lib/tools/components/Table/index.js.map +1 -1
- package/lib/tools/components/Table/index.less +13 -13
- package/lib/tools/components/ToolItem/index.js +3 -2
- package/lib/tools/components/ToolItem/index.js.map +1 -1
- package/lib/tools/components/ToolItem/index.less +27 -27
- package/lib/tools/components/ToolsSelect/index.js +3 -2
- package/lib/tools/components/ToolsSelect/index.js.map +1 -1
- package/lib/tools/components/ToolsSelect/index.less +10 -10
- package/lib/tools/full-screen/index.js +12 -11
- package/lib/tools/full-screen/index.js.map +1 -1
- package/lib/tools/index.js +14 -13
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/layer-control/index.js +26 -23
- package/lib/tools/layer-control/index.js.map +1 -1
- package/lib/tools/refresh/index.js +12 -11
- package/lib/tools/refresh/index.js.map +1 -1
- package/lib/tools/style/css.js.map +1 -1
- package/lib/tools/style/index.js.map +1 -1
- package/lib/tools/style/index.less +154 -154
- package/lib/tools-item/index.js +11 -10
- package/lib/tools-item/index.js.map +1 -1
- package/lib/use-props/index.js +2 -1
- package/lib/use-props/index.js.map +1 -1
- package/lib/use-props/style/css.js.map +1 -1
- package/lib/use-props/style/index.js.map +1 -1
- package/lib/wms-layer/WmsLayer.js +33 -31
- package/lib/wms-layer/WmsLayer.js.map +1 -1
- package/lib/wms-layer/index.js +11 -11
- package/lib/wms-layer/index.js.map +1 -1
- package/lib/wms-layer/style/css.js.map +1 -1
- package/lib/wms-layer/style/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -8,7 +8,7 @@ var _layer = require("ol/layer");
|
|
|
8
8
|
var _ol = require("ol");
|
|
9
9
|
var _source = require("ol/source");
|
|
10
10
|
var _renderer = _interopRequireDefault(require("../renderer"));
|
|
11
|
-
var
|
|
11
|
+
var _style6 = require("ol/style");
|
|
12
12
|
var _isFunction = _interopRequireDefault(require("../_util/isFunction"));
|
|
13
13
|
var _createFeatureCollection = require("./createFeatureCollection");
|
|
14
14
|
var _isObject = _interopRequireDefault(require("../_util/isObject"));
|
|
@@ -16,40 +16,40 @@ var _encryptParams = _interopRequireDefault(require("../_util/encryptParams"));
|
|
|
16
16
|
var _stringToFun = _interopRequireDefault(require("../_util/stringToFun"));
|
|
17
17
|
var _convertCamelToCSS = _interopRequireDefault(require("../convertCamelToCSS"));
|
|
18
18
|
var _MyCluster = _interopRequireDefault(require("./MyCluster"));
|
|
19
|
+
var _Marker = require("../marker/Marker");
|
|
19
20
|
var _excluded = ["url", "params", "data", "dataField", "features", "sourceOptions", "key", "name", "label", "labelField", "point", "cluster", "template", "autoRefresh", "method", "layerControl", "show", "style", "group", "iconOptions", "afterGetData", "legend", "viewOnly", "encrypt", "valueField", "map", "tipTemplate", "alarmBg", "cancelPopup"],
|
|
20
21
|
_excluded2 = ["color", "background", "backgroundStroke", "backgroundStrokeWidth"],
|
|
21
|
-
_excluded3 = ["
|
|
22
|
-
|
|
23
|
-
function
|
|
22
|
+
_excluded3 = ["type", "iconSrc", "color", "scale"],
|
|
23
|
+
_excluded4 = ["numberStyle", "iconOptions"];
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
25
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
24
26
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
25
|
-
function _unsupportedIterableToArray(
|
|
26
|
-
function _iterableToArray(
|
|
27
|
-
function _arrayWithoutHoles(
|
|
28
|
-
function _arrayLikeToArray(
|
|
29
|
-
function _typeof(
|
|
30
|
-
function ownKeys(
|
|
31
|
-
function _objectSpread(
|
|
32
|
-
function _objectWithoutProperties(
|
|
33
|
-
function _objectWithoutPropertiesLoose(
|
|
34
|
-
function _classCallCheck(
|
|
35
|
-
function _defineProperties(
|
|
36
|
-
function _createClass(
|
|
37
|
-
function
|
|
38
|
-
function
|
|
39
|
-
function
|
|
40
|
-
function
|
|
41
|
-
function
|
|
42
|
-
function
|
|
43
|
-
function
|
|
44
|
-
function
|
|
45
|
-
function
|
|
46
|
-
function
|
|
47
|
-
function
|
|
48
|
-
function
|
|
49
|
-
function
|
|
50
|
-
function
|
|
51
|
-
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
52
|
-
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
27
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
28
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
29
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
30
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
31
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
32
|
+
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
33
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
34
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
35
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
36
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
37
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor); } }
|
|
38
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
39
|
+
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
40
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
41
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
42
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
43
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
44
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
45
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
46
|
+
function set(target, property, value, receiver) { if (typeof Reflect !== "undefined" && Reflect.set) { set = Reflect.set; } else { set = function set(target, property, value, receiver) { var base = _superPropBase(target, property); var desc; if (base) { desc = Object.getOwnPropertyDescriptor(base, property); if (desc.set) { desc.set.call(receiver, value); return true; } else if (!desc.writable) { return false; } } desc = Object.getOwnPropertyDescriptor(receiver, property); if (desc) { if (!desc.writable) { return false; } desc.value = value; Object.defineProperty(receiver, property, desc); } else { _defineProperty(receiver, property, value); } return true; }; } return set(target, property, value, receiver); }
|
|
47
|
+
function _set(target, property, value, receiver, isStrict) { var s = set(target, property, value, receiver || target); if (!s && isStrict) { throw new TypeError('failed to set property'); } return value; }
|
|
48
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
49
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
50
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
51
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
52
|
+
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
53
53
|
var addOverlay = function addOverlay(feature, map, alarmBg) {
|
|
54
54
|
if (alarmBg) {
|
|
55
55
|
var itemVal = alarmBg.find(function (v) {
|
|
@@ -82,8 +82,10 @@ var addOverlay = function addOverlay(feature, map, alarmBg) {
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
85
|
+
_inherits(FeatureLayer, _Vector);
|
|
86
|
+
var _super = _createSuper(FeatureLayer);
|
|
85
87
|
function FeatureLayer(_options) {
|
|
86
|
-
var _this2;
|
|
88
|
+
var _thisSuper, _this2;
|
|
87
89
|
_classCallCheck(this, FeatureLayer);
|
|
88
90
|
var url = _options.url,
|
|
89
91
|
params = _options.params,
|
|
@@ -133,8 +135,8 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
133
135
|
});
|
|
134
136
|
}
|
|
135
137
|
}
|
|
136
|
-
_this2 =
|
|
137
|
-
_defineProperty(_this2, "getClusterTextStyle", function (size, options) {
|
|
138
|
+
_this2 = _super.call(this, props);
|
|
139
|
+
_defineProperty(_assertThisInitialized(_this2), "getClusterTextStyle", function (size, options) {
|
|
138
140
|
var _ref = options && _typeof(options) === 'object' ? options : {},
|
|
139
141
|
color = _ref.color,
|
|
140
142
|
background = _ref.background,
|
|
@@ -144,7 +146,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
144
146
|
var style = _objectSpread({
|
|
145
147
|
text: String(size),
|
|
146
148
|
font: '18px Calibri,sans-serif',
|
|
147
|
-
fill: new
|
|
149
|
+
fill: new _style6.Fill({
|
|
148
150
|
color: color || '#fff'
|
|
149
151
|
}),
|
|
150
152
|
padding: [0, 0, 0, 0],
|
|
@@ -155,19 +157,19 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
155
157
|
offsetX: 16
|
|
156
158
|
}, otherVal);
|
|
157
159
|
if (background) {
|
|
158
|
-
style.backgroundFill = new
|
|
160
|
+
style.backgroundFill = new _style6.Fill({
|
|
159
161
|
color: background
|
|
160
162
|
});
|
|
161
163
|
}
|
|
162
164
|
if (backgroundStroke) {
|
|
163
|
-
style.backgroundStroke = new
|
|
165
|
+
style.backgroundStroke = new _style6.Stroke({
|
|
164
166
|
color: '#FFFFFF',
|
|
165
167
|
width: backgroundStrokeWidth || 2
|
|
166
168
|
});
|
|
167
169
|
}
|
|
168
|
-
return new
|
|
170
|
+
return new _style6.Text(style);
|
|
169
171
|
});
|
|
170
|
-
_defineProperty(_this2, "getLabelStyle", function (feature, color) {
|
|
172
|
+
_defineProperty(_assertThisInitialized(_this2), "getLabelStyle", function (feature, color) {
|
|
171
173
|
var labelField = _this2._options.labelField;
|
|
172
174
|
|
|
173
175
|
// 判断是否是聚合点位
|
|
@@ -179,16 +181,16 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
179
181
|
}
|
|
180
182
|
}
|
|
181
183
|
if (labelField) {
|
|
182
|
-
return new
|
|
184
|
+
return new _style6.Text({
|
|
183
185
|
text: feature.values_[labelField] || '-',
|
|
184
186
|
font: '12px Calibri,sans-serif',
|
|
185
|
-
fill: new
|
|
187
|
+
fill: new _style6.Fill({
|
|
186
188
|
color: color
|
|
187
189
|
}),
|
|
188
|
-
backgroundFill: new
|
|
190
|
+
backgroundFill: new _style6.Fill({
|
|
189
191
|
color: '#fff'
|
|
190
192
|
}),
|
|
191
|
-
backgroundStroke: new
|
|
193
|
+
backgroundStroke: new _style6.Stroke({
|
|
192
194
|
color: color,
|
|
193
195
|
width: 1
|
|
194
196
|
}),
|
|
@@ -199,7 +201,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
199
201
|
});
|
|
200
202
|
}
|
|
201
203
|
});
|
|
202
|
-
|
|
204
|
+
_set((_thisSuper = _assertThisInitialized(_this2), _getPrototypeOf(FeatureLayer.prototype)), "show", show, _thisSuper, true);
|
|
203
205
|
// 参数
|
|
204
206
|
_this2._options = _options;
|
|
205
207
|
|
|
@@ -311,8 +313,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
311
313
|
}
|
|
312
314
|
|
|
313
315
|
// 初始化数据
|
|
314
|
-
|
|
315
|
-
return _createClass(FeatureLayer, [{
|
|
316
|
+
_createClass(FeatureLayer, [{
|
|
316
317
|
key: "init",
|
|
317
318
|
value: function init() {
|
|
318
319
|
// 是否存在地址
|
|
@@ -333,7 +334,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
333
334
|
}, {
|
|
334
335
|
key: "show",
|
|
335
336
|
get: function get() {
|
|
336
|
-
return
|
|
337
|
+
return _get(_getPrototypeOf(FeatureLayer.prototype), "show", this);
|
|
337
338
|
},
|
|
338
339
|
set: function set(value) {
|
|
339
340
|
this.setVisible(value);
|
|
@@ -391,18 +392,46 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
391
392
|
});
|
|
392
393
|
}
|
|
393
394
|
}
|
|
395
|
+
}, {
|
|
396
|
+
key: "getCustomClusterStyle",
|
|
397
|
+
value: function getCustomClusterStyle(feature, clusterStyle) {
|
|
398
|
+
var _feature$get2;
|
|
399
|
+
var type = clusterStyle.type,
|
|
400
|
+
iconSrc = clusterStyle.iconSrc,
|
|
401
|
+
color = clusterStyle.color,
|
|
402
|
+
_clusterStyle$scale = clusterStyle.scale,
|
|
403
|
+
scale = _clusterStyle$scale === void 0 ? 1 : _clusterStyle$scale,
|
|
404
|
+
iconOptions = _objectWithoutProperties(clusterStyle, _excluded3);
|
|
405
|
+
var size = ((_feature$get2 = feature.get('features')) === null || _feature$get2 === void 0 ? void 0 : _feature$get2.length) || 0;
|
|
406
|
+
return [new _renderer["default"].Marker({
|
|
407
|
+
image: (0, _Marker.getImgUrl)(type || 'CommonIcon', {
|
|
408
|
+
color: color || '#2491fc',
|
|
409
|
+
hideFooter: true,
|
|
410
|
+
info: {
|
|
411
|
+
text: '',
|
|
412
|
+
fontSize: 18
|
|
413
|
+
}
|
|
414
|
+
}),
|
|
415
|
+
text: this.getClusterTextStyle(size)
|
|
416
|
+
}), new _renderer["default"].Marker(_objectSpread({
|
|
417
|
+
image: iconSrc,
|
|
418
|
+
scale: scale || 1,
|
|
419
|
+
anchor: [1.1, 1.25]
|
|
420
|
+
}, iconOptions))];
|
|
421
|
+
}
|
|
394
422
|
}, {
|
|
395
423
|
key: "getStyleByMode",
|
|
396
424
|
value: function getStyleByMode() {
|
|
397
425
|
var _this4 = this;
|
|
398
426
|
return function (feature, resolution) {
|
|
399
|
-
var _this4$group;
|
|
427
|
+
var _feature$get3, _this4$group;
|
|
428
|
+
var size = ((_feature$get3 = feature.get('features')) === null || _feature$get3 === void 0 ? void 0 : _feature$get3.length) || 0;
|
|
400
429
|
var _this4$_options = _this4._options,
|
|
401
430
|
style = _this4$_options.style,
|
|
402
431
|
cluster = _this4$_options.cluster,
|
|
403
432
|
otherStyle = _this4$_options.otherStyle;
|
|
404
433
|
var show = true;
|
|
405
|
-
(_this4$group = _this4.group) === null || _this4$group === void 0
|
|
434
|
+
(_this4$group = _this4.group) === null || _this4$group === void 0 ? void 0 : _this4$group.map(function (v) {
|
|
406
435
|
var _v$filter;
|
|
407
436
|
if (v !== null && v !== void 0 && (_v$filter = v.filter) !== null && _v$filter !== void 0 && _v$filter.call(v, feature.values_)) {
|
|
408
437
|
style = v.style || style;
|
|
@@ -428,11 +457,14 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
428
457
|
}
|
|
429
458
|
}
|
|
430
459
|
}
|
|
460
|
+
if (size > 1 && cluster !== null && cluster !== void 0 && cluster.style.iconSrc) {
|
|
461
|
+
return _this4.getCustomClusterStyle(feature, cluster.style);
|
|
462
|
+
}
|
|
431
463
|
if (style) {
|
|
432
464
|
if (typeof style === 'string' || (0, _isFunction["default"])(style) && cluster) {
|
|
433
465
|
styles.push(new _renderer["default"].Marker(_objectSpread({}, _this4.getMarkerOptions(feature, style))));
|
|
434
466
|
return styles;
|
|
435
|
-
} else if (style instanceof
|
|
467
|
+
} else if (style instanceof _style6.Style) {
|
|
436
468
|
// 判断是否为 ol Style
|
|
437
469
|
styles.push(style);
|
|
438
470
|
return styles;
|
|
@@ -457,8 +489,6 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
457
489
|
return styles;
|
|
458
490
|
}
|
|
459
491
|
if (mode === 'UniqueValue') {
|
|
460
|
-
var _feature$get2;
|
|
461
|
-
var size = ((_feature$get2 = feature.get('features')) === null || _feature$get2 === void 0 ? void 0 : _feature$get2.length) || 0;
|
|
462
492
|
if (size > 1) {
|
|
463
493
|
var _options3 = _this4.getSimpleStyle(feature, style.render.render[0]);
|
|
464
494
|
styles.push(_renderer["default"].Simple(_options3));
|
|
@@ -469,9 +499,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
469
499
|
return styles;
|
|
470
500
|
}
|
|
471
501
|
if (mode === 'ClassBreaks') {
|
|
472
|
-
|
|
473
|
-
var _size = ((_feature$get3 = feature.get('features')) === null || _feature$get3 === void 0 ? void 0 : _feature$get3.length) || 0;
|
|
474
|
-
if (_size > 1) {
|
|
502
|
+
if (size > 1) {
|
|
475
503
|
var _options5 = _this4.getSimpleStyle(feature, style.render.render[0]);
|
|
476
504
|
styles.push(_renderer["default"].Simple(_options5));
|
|
477
505
|
return styles;
|
|
@@ -487,17 +515,17 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
487
515
|
}
|
|
488
516
|
}
|
|
489
517
|
}
|
|
490
|
-
styles.push(new
|
|
491
|
-
image: new
|
|
518
|
+
styles.push(new _style6.Style({
|
|
519
|
+
image: new _style6.Circle({
|
|
492
520
|
radius: 4,
|
|
493
|
-
fill: new
|
|
521
|
+
fill: new _style6.Fill({
|
|
494
522
|
color: 'rgba(0,155,255, 0.8)'
|
|
495
523
|
})
|
|
496
524
|
}),
|
|
497
|
-
fill: new
|
|
525
|
+
fill: new _style6.Fill({
|
|
498
526
|
color: 'rgba(255, 255, 255, 0.6)'
|
|
499
527
|
}),
|
|
500
|
-
stroke: new
|
|
528
|
+
stroke: new _style6.Stroke({
|
|
501
529
|
color: '#009BFF',
|
|
502
530
|
width: 2
|
|
503
531
|
})
|
|
@@ -545,11 +573,11 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
545
573
|
var isFun = (0, _isFunction["default"])(style);
|
|
546
574
|
var data = {};
|
|
547
575
|
if (isFun) {
|
|
548
|
-
var _data, _data2, _data3, _data4, _data5, _data6;
|
|
576
|
+
var _data, _data$style, _data2, _data3, _data3$style, _data4, _data5, _data5$style, _data6;
|
|
549
577
|
data = style(feature) || {};
|
|
550
|
-
icon = ((_data = data) === null || _data === void 0
|
|
551
|
-
color = ((_data3 = data) === null || _data3 === void 0
|
|
552
|
-
image = ((_data5 = data) === null || _data5 === void 0
|
|
578
|
+
icon = ((_data = data) === null || _data === void 0 ? void 0 : (_data$style = _data.style) === null || _data$style === void 0 ? void 0 : _data$style.icon) || ((_data2 = data) === null || _data2 === void 0 ? void 0 : _data2.icon) || icon;
|
|
579
|
+
color = ((_data3 = data) === null || _data3 === void 0 ? void 0 : (_data3$style = _data3.style) === null || _data3$style === void 0 ? void 0 : _data3$style.color) || ((_data4 = data) === null || _data4 === void 0 ? void 0 : _data4.color) || color;
|
|
580
|
+
image = ((_data5 = data) === null || _data5 === void 0 ? void 0 : (_data5$style = _data5.style) === null || _data5$style === void 0 ? void 0 : _data5$style.image) || ((_data6 = data) === null || _data6 === void 0 ? void 0 : _data6.image) || image;
|
|
553
581
|
}
|
|
554
582
|
var size = ((_feature$get4 = feature.get('features')) === null || _feature$get4 === void 0 ? void 0 : _feature$get4.length) || 0;
|
|
555
583
|
var P = {
|
|
@@ -654,39 +682,45 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
654
682
|
})
|
|
655
683
|
});
|
|
656
684
|
if ((_group = group) !== null && _group !== void 0 && _group.length) {
|
|
657
|
-
var _group2;
|
|
658
|
-
var style;
|
|
685
|
+
var _group2, _groupItem, _groupItem$clusterSty;
|
|
686
|
+
var style, groupItem;
|
|
659
687
|
var f = features[0];
|
|
660
688
|
var size = features.length;
|
|
661
|
-
(_group2 = group) === null || _group2 === void 0
|
|
689
|
+
(_group2 = group) === null || _group2 === void 0 ? void 0 : _group2.map(function (v) {
|
|
662
690
|
var _v$filter2;
|
|
663
691
|
if (v !== null && v !== void 0 && (_v$filter2 = v.filter) !== null && _v$filter2 !== void 0 && _v$filter2.call(v, f.values_)) {
|
|
664
692
|
style = v.style || style;
|
|
693
|
+
groupItem = v;
|
|
665
694
|
}
|
|
666
695
|
});
|
|
667
696
|
var markerStyle = _objectSpread({}, style.style);
|
|
668
|
-
if (size > 1) {
|
|
669
|
-
var
|
|
670
|
-
|
|
671
|
-
|
|
697
|
+
if (size > 1 && (_groupItem = groupItem) !== null && _groupItem !== void 0 && (_groupItem$clusterSty = _groupItem.clusterStyle) !== null && _groupItem$clusterSty !== void 0 && _groupItem$clusterSty.iconSrc) {
|
|
698
|
+
var _style = _this6.getCustomClusterStyle(feature, groupItem.clusterStyle);
|
|
699
|
+
feature.setStyle(_style);
|
|
700
|
+
} else {
|
|
701
|
+
if (size > 1) {
|
|
702
|
+
var _style4, _markerStyle2, _cluster2;
|
|
703
|
+
if ((_style4 = style) !== null && _style4 !== void 0 && _style4.clusterStyle) {
|
|
704
|
+
markerStyle = _objectSpread({}, style.clusterStyle);
|
|
705
|
+
}
|
|
706
|
+
var _markerStyle = markerStyle,
|
|
707
|
+
numberStyle = _markerStyle.numberStyle,
|
|
708
|
+
iconOptions = _markerStyle.iconOptions,
|
|
709
|
+
otherStyle = _objectWithoutProperties(_markerStyle, _excluded4);
|
|
710
|
+
markerStyle = _objectSpread(_objectSpread({}, otherStyle), {}, {
|
|
711
|
+
text: _this6.getClusterTextStyle((_markerStyle2 = markerStyle) !== null && _markerStyle2 !== void 0 && _markerStyle2.image ? size : ' ', numberStyle),
|
|
712
|
+
iconOptions: _objectSpread({
|
|
713
|
+
hideFooter: true,
|
|
714
|
+
info: {
|
|
715
|
+
text: size,
|
|
716
|
+
fontSize: 18
|
|
717
|
+
}
|
|
718
|
+
}, iconOptions || ((_cluster2 = cluster) === null || _cluster2 === void 0 ? void 0 : _cluster2.iconOptions) || {})
|
|
719
|
+
});
|
|
672
720
|
}
|
|
673
|
-
var
|
|
674
|
-
|
|
675
|
-
iconOptions = _markerStyle.iconOptions,
|
|
676
|
-
otherStyle = _objectWithoutProperties(_markerStyle, _excluded3);
|
|
677
|
-
markerStyle = _objectSpread(_objectSpread({}, otherStyle), {}, {
|
|
678
|
-
text: _this6.getClusterTextStyle((_markerStyle2 = markerStyle) !== null && _markerStyle2 !== void 0 && _markerStyle2.image ? size : ' ', numberStyle),
|
|
679
|
-
iconOptions: _objectSpread({
|
|
680
|
-
hideFooter: true,
|
|
681
|
-
info: {
|
|
682
|
-
text: size,
|
|
683
|
-
fontSize: 18
|
|
684
|
-
}
|
|
685
|
-
}, iconOptions || ((_cluster2 = cluster) === null || _cluster2 === void 0 ? void 0 : _cluster2.iconOptions) || {})
|
|
686
|
-
});
|
|
721
|
+
var _style5 = new _renderer["default"].Marker(markerStyle);
|
|
722
|
+
feature.setStyle(_style5);
|
|
687
723
|
}
|
|
688
|
-
var _style = new _renderer["default"].Marker(markerStyle);
|
|
689
|
-
feature.setStyle(_style);
|
|
690
724
|
}
|
|
691
725
|
|
|
692
726
|
// 增加聚合点位标识
|
|
@@ -945,7 +979,7 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
945
979
|
}, {
|
|
946
980
|
key: "setVisible",
|
|
947
981
|
value: function setVisible(visible) {
|
|
948
|
-
|
|
982
|
+
_get(_getPrototypeOf(FeatureLayer.prototype), "setVisible", this).call(this, visible); // 将属性传递给父类
|
|
949
983
|
|
|
950
984
|
var map = this.getMap && this.getMap();
|
|
951
985
|
if (map) {
|
|
@@ -978,6 +1012,8 @@ var FeatureLayer = /*#__PURE__*/function (_Vector) {
|
|
|
978
1012
|
this.clearAlarmBg();
|
|
979
1013
|
}
|
|
980
1014
|
}]);
|
|
1015
|
+
return FeatureLayer;
|
|
981
1016
|
}(_layer.Vector);
|
|
982
|
-
var _default =
|
|
1017
|
+
var _default = FeatureLayer;
|
|
1018
|
+
exports["default"] = _default;
|
|
983
1019
|
//# sourceMappingURL=FeatureLayer.js.map
|