@vtx/ol-map 1.0.125 → 1.0.127
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 +4 -3
- 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 +60 -46
- 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 +25 -16
- 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 +4 -2
- 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 +47 -46
- 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 +18 -17
- 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/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 +8 -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 +3 -2
- 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 +11 -9
- package/lib/map/getBaseLayers/index.js.map +1 -1
- package/lib/map/index.js +41 -39
- 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 +24 -21
- 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 +31 -17
- 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 +71 -71
- 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 +48 -36
- 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 +46 -43
- 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 +11 -11
- 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 +315 -0
- package/lib/wms-layer/WmsLayer.js.map +1 -0
- package/lib/wms-layer/index.js +98 -0
- package/lib/wms-layer/index.js.map +1 -0
- package/lib/wms-layer/style/css.js +4 -0
- package/lib/wms-layer/style/css.js.map +1 -0
- package/lib/wms-layer/style/index.css +0 -0
- package/lib/wms-layer/style/index.js +4 -0
- package/lib/wms-layer/style/index.js.map +1 -0
- package/lib/wms-layer/style/index.less +0 -0
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_HeatmapLayer","_interopRequireDefault","_ahooks","_events","_useProps2","_provider","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_HeatmapLayer","_interopRequireDefault","_ahooks","_events","_useProps2","_provider","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_slicedToArray","arr","i","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","o","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","Array","from","test","len","length","arr2","_i","Symbol","iterator","_s","_e","_x","_r","_arr","_n","_d","next","done","push","value","err","isArray","_default","props","url","params","data","features","sourceOptions","labelField","autoRefresh","method","_props$blur","blur","_props$radius","radius","_props$show","show","afterGetData","children","_useState","useState","_useState2","layerLoad","setLayerLoad","_useProps","useProps","map","layerRef","useRef","useEffect","layer","HeatmapLayer","registerEventLayer","current","addLayer","setShow","removeLayer","useUpdateEffect","loadData","JSON","stringify","loadUrlData","createElement","Fragment","featureLayer"],"sources":["heatmap-layer/index.js"],"sourcesContent":["import React, { useState, useRef, useEffect } from 'react';\nimport HeatmapLayer from './HeatmapLayer';\nimport { useUpdateEffect } from 'ahooks';\nimport { registerEventLayer } from '../events';\nimport useProps from '../use-props';\nimport Provider from '../provider';\n\nexport default function(props) {\n const {\n url,\n params,\n data,\n features,\n sourceOptions,\n key,\n name,\n labelField,\n autoRefresh,\n method,\n blur = 15,\n radius = 8,\n show = true,\n afterGetData,\n children,\n } = props;\n const [layerLoad, setLayerLoad] = useState(false);\n const { map } = useProps();\n const layerRef = useRef();\n\n useEffect(() => {\n let layer = new HeatmapLayer({\n url,\n params,\n data,\n features,\n sourceOptions,\n key,\n name,\n labelField,\n autoRefresh,\n method,\n blur,\n radius,\n show,\n afterGetData,\n });\n // 注册事件\n registerEventLayer(layer, props);\n setLayerLoad(true);\n layerRef.current = layer;\n\n map.addLayer(layerRef.current);\n\n layerRef.current.setShow(show);\n\n return () => {\n if (layerRef.current) {\n map.removeLayer(layerRef.current);\n }\n };\n }, []);\n\n useUpdateEffect(() => {\n layerRef.current.loadData(data);\n }, [JSON.stringify(data)]);\n\n useUpdateEffect(() => {\n layerRef.current.loadUrlData(url, params, method);\n }, [JSON.stringify(params), url, method]);\n\n useUpdateEffect(() => {\n layerRef.current.setShow(show);\n }, [show]);\n\n return (\n <>\n {layerLoad && (\n <Provider\n value={{\n map,\n featureLayer: layerRef.current,\n }}\n >\n {children}\n </Provider>\n )}\n </>\n );\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,aAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAH,sBAAA,CAAAF,OAAA;AACA,IAAAM,SAAA,GAAAJ,sBAAA,CAAAF,OAAA;AAAmC,SAAAE,uBAAAK,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBA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CAACC,SAAS,CAACnC,IAAI,CAAC,CAAC,CAAC;EAE1B,IAAAgC,uBAAe,EAAC,YAAM;IAClBV,QAAQ,CAACM,OAAO,CAACQ,WAAW,CAACtC,GAAG,EAAEC,MAAM,EAAEM,MAAM,CAAC;EACrD,CAAC,EAAE,CAAC6B,IAAI,CAACC,SAAS,CAACpC,MAAM,CAAC,EAAED,GAAG,EAAEO,MAAM,CAAC,CAAC;EAEzC,IAAA2B,uBAAe,EAAC,YAAM;IAClBV,QAAQ,CAACM,OAAO,CAACE,OAAO,CAACnB,IAAI,CAAC;EAClC,CAAC,EAAE,CAACA,IAAI,CAAC,CAAC;EAEV,oBACIpF,MAAA,YAAA8G,aAAA,CAAA9G,MAAA,YAAA+G,QAAA,QACKrB,SAAS,iBACN1F,MAAA,YAAA8G,aAAA,CAACtG,SAAA,WAAQ;IACL0D,KAAK,EAAE;MACH4B,GAAG,EAAHA,GAAG;MACHkB,YAAY,EAAEjB,QAAQ,CAACM;IAC3B;EAAE,GAEDf,QACK,CAEhB,CAAC;AAEX"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":["require"],"sources":["heatmap-layer/style/index.js"],"sourcesContent":["import './index.less';\
|
|
1
|
+
{"version":3,"file":"css.js","names":["require"],"sources":["heatmap-layer/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAAA,OAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["require"],"sources":["heatmap-layer/style/index.js"],"sourcesContent":["import './index.less';\
|
|
1
|
+
{"version":3,"file":"index.js","names":["require"],"sources":["heatmap-layer/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAAA,OAAA"}
|
|
@@ -11,18 +11,18 @@ var _style = require("ol/style");
|
|
|
11
11
|
var _ol = require("ol");
|
|
12
12
|
var _createFeatureCollection = require("../feature-layer/createFeatureCollection");
|
|
13
13
|
var _format = require("ol/format");
|
|
14
|
-
function _typeof(
|
|
15
|
-
function ownKeys(
|
|
16
|
-
function _objectSpread(
|
|
17
|
-
function _classCallCheck(
|
|
18
|
-
function _defineProperties(
|
|
19
|
-
function _createClass(
|
|
20
|
-
function _defineProperty(
|
|
21
|
-
function _toPropertyKey(
|
|
22
|
-
function _toPrimitive(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
var HighLayer =
|
|
14
|
+
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); }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
18
|
+
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); } }
|
|
19
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
20
|
+
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; }
|
|
21
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
22
|
+
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); } /**
|
|
23
|
+
* 图层高亮操作
|
|
24
|
+
*/
|
|
25
|
+
var HighLayer = /*#__PURE__*/function () {
|
|
26
26
|
function HighLayer(options) {
|
|
27
27
|
var _this = this;
|
|
28
28
|
_classCallCheck(this, HighLayer);
|
|
@@ -149,7 +149,7 @@ var HighLayer = exports["default"] = /*#__PURE__*/function () {
|
|
|
149
149
|
this.layer.key = _key || 'Highlight';
|
|
150
150
|
this.map.addLayer(this.layer);
|
|
151
151
|
}
|
|
152
|
-
|
|
152
|
+
_createClass(HighLayer, [{
|
|
153
153
|
key: "clearSelectFeature",
|
|
154
154
|
value: function clearSelectFeature() {
|
|
155
155
|
if (this.selectFeature) {
|
|
@@ -195,5 +195,7 @@ var HighLayer = exports["default"] = /*#__PURE__*/function () {
|
|
|
195
195
|
this.map.removeLayer(this.layer);
|
|
196
196
|
}
|
|
197
197
|
}]);
|
|
198
|
+
return HighLayer;
|
|
198
199
|
}();
|
|
200
|
+
exports["default"] = HighLayer;
|
|
199
201
|
//# sourceMappingURL=HighLayer.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HighLayer.js","names":["_antd","require","_source","_layer","_style","_ol","_createFeatureCollection","_format","_typeof","o","Symbol","iterator","constructor","prototype","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classCallCheck","a","n","TypeError","_defineProperties","configurable","writable","_toPropertyKey","key","_createClass","value","i","_toPrimitive","toPrimitive","call","String","Number","HighLayer","exports","options","_this","feature","fit","undefined","isFit","addHighlightFeature","addPointHighlight","clearSelectFeature","clearFeatures","Array","isArray","source","addFeatures","map","fitView","point_overlay","getOverlayById","removeOverlay","geometry","getGeometry","type","getType","ele","document","createElement","className","Overlay","id","element","positioning","stopEvent","addOverlay","setPosition","getFlatCoordinates","pointOverlay","field","fieldName","filterField","newFeature","features","getFeatures","find","v","get","selectFeature","setStyle","isHighLight","setSelectFeature","message","warning","data","geoJsonFormat","GeoJSON","res","createFeatureCollection","readFeatures","setHighlight","_options$isFit","_options$isHighLight","style","highStyle","Style","image","CircleStyle","radius","fill","Fill","color","stroke","Stroke","width","VectorSource","layer","VectorLayer","zIndex","parmas","params","addLayer","clear","destroy","removeLayer"],"sources":["high-layer/HighLayer.js"],"sourcesContent":["/**\r\n * 图层高亮操作\r\n */\r\nimport { message } from 'antd';\r\nimport { Vector as VectorSource } from 'ol/source';\r\nimport { Vector as VectorLayer } from 'ol/layer';\r\nimport { Style, Stroke, Fill, Circle as CircleStyle } from 'ol/style';\r\nimport { Overlay } from 'ol';\r\nimport { createFeatureCollection } from '../feature-layer/createFeatureCollection';\r\nimport { GeoJSON } from 'ol/format';\r\nexport default class HighLayer {\r\n constructor(options) {\r\n const { isFit = true, isHighLight = true, style, key } = options;\r\n this.highStyle =\r\n style ||\r\n new Style({\r\n // 高亮样式\r\n image: new CircleStyle({\r\n radius: 7,\r\n fill: new Fill({\r\n color: '#ff4d4f',\r\n }),\r\n stroke: new Stroke({\r\n color: '#FFFFFF',\r\n width: 2,\r\n }),\r\n }),\r\n fill: new Fill({\r\n color: '#ff4d4f',\r\n }),\r\n stroke: new Stroke({\r\n color: '#ff4d4f',\r\n width: 4,\r\n }),\r\n });\r\n this.isHighLight = isHighLight;\r\n this.map = options.map;\r\n this.feature = options.feature;\r\n this.selectFeature = null;\r\n this.pointOverlay = null;\r\n this.isFit = isFit;\r\n this.source = new VectorSource();\r\n this.layer = new VectorLayer({\r\n source: this.source,\r\n zIndex: 9999,\r\n style: this.highStyle,\r\n ...(options.parmas || options.params || {}),\r\n });\r\n this.layer.key = key || 'Highlight';\r\n this.map.addLayer(this.layer);\r\n }\r\n // 图层放大\r\n setHighlight = (feature, fit = true) => {\r\n this.isFit = fit;\r\n this.feature = feature;\r\n this.addHighlightFeature(feature);\r\n };\r\n // 点位加波浪\r\n setPointHighlight = feature => {\r\n this.feature = feature;\r\n this.addPointHighlight(feature);\r\n };\r\n\r\n // 高亮图层增加feature\r\n addHighlightFeature = feature => {\r\n this.clearSelectFeature();\r\n this.clearFeatures();\r\n if (feature && Array.isArray(feature) && feature?.length) {\r\n this.source.addFeatures(feature);\r\n this.isFit && this.map.fitView(this.source);\r\n }\r\n };\r\n\r\n // 点位高亮-扩散\r\n addPointHighlight = feature => {\r\n let point_overlay = this.map.getOverlayById('POINT_ANIMATION');\r\n if (point_overlay) {\r\n this.map.removeOverlay(point_overlay);\r\n }\r\n\r\n if (feature) {\r\n let geometry = feature?.getGeometry();\r\n let type = geometry?.getType();\r\n if (type === 'Point' && geometry) {\r\n let ele = document.createElement('div');\r\n ele.className = 'point_animation';\r\n\r\n if (!point_overlay) {\r\n point_overlay = new Overlay({\r\n id: 'POINT_ANIMATION',\r\n element: ele,\r\n positioning: 'center-center',\r\n stopEvent: false,\r\n });\r\n }\r\n this.map.addOverlay(point_overlay);\r\n point_overlay.setPosition(geometry.getFlatCoordinates());\r\n this.pointOverlay = point_overlay;\r\n }\r\n this.isFit && this.map.fitView(feature);\r\n }\r\n };\r\n\r\n setCenter = (field, fieldName) => {\r\n let filterField = fieldName || 'code';\r\n this.clearSelectFeature();\r\n let newFeature;\r\n let features = this.source.getFeatures();\r\n\r\n if (features?.length) {\r\n newFeature = features.find(v => {\r\n return (v.get(filterField) || v.get('CODE')) === field;\r\n });\r\n } else if (features && features.get(filterField) === field) {\r\n newFeature = features;\r\n }\r\n this.selectFeature = newFeature;\r\n\r\n if (newFeature) {\r\n newFeature.setStyle();\r\n this.isFit && this.map.fitView(newFeature);\r\n if (this.isHighLight) this.setSelectFeature(newFeature);\r\n } else {\r\n message.warning('地图上未查询到该数据,请检查是否配置坐标信息!');\r\n }\r\n };\r\n\r\n clearSelectFeature() {\r\n if (this.selectFeature) {\r\n this.selectFeature.setStyle();\r\n this.selectFeature = null;\r\n }\r\n }\r\n\r\n clearFeatures() {\r\n this.source && this.source.clear();\r\n this.pointOverlay && this.map.removeOverlay(this.pointOverlay);\r\n }\r\n\r\n setSelectFeature(feature) {\r\n if (feature) {\r\n this.selectFeature = feature;\r\n this.selectFeature.setStyle(\r\n new Style({\r\n image: new CircleStyle({\r\n radius: 7,\r\n fill: new Fill({\r\n color: '#2491fc',\r\n }),\r\n stroke: new Stroke({\r\n color: '#FFFFFF',\r\n width: 2,\r\n }),\r\n }),\r\n fill: new Fill({\r\n color: '#2491fc',\r\n }),\r\n stroke: new Stroke({\r\n color: '#2491fc',\r\n width: 4,\r\n }),\r\n }),\r\n );\r\n }\r\n }\r\n addHighlightData = (data, key, fit) => {\r\n if (data) {\r\n const geoJsonFormat = new GeoJSON();\r\n let res = createFeatureCollection(Array.isArray(data) ? data : [data]);\r\n let features = geoJsonFormat.readFeatures(res);\r\n if (features?.length) {\r\n features.map(v => {\r\n v.key = key;\r\n });\r\n this.setHighlight(features, fit);\r\n }\r\n }\r\n };\r\n destroy() {\r\n this.map.removeLayer(this.layer);\r\n }\r\n}\r\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,GAAA,GAAAJ,OAAA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;YACTC,IAAI,EAAE,IAAIC,WAAI,CAAC;cACXC,KAAK,EAAE;YACX,CAAC,CAAC;YACFC,MAAM,EAAE,IAAIC,aAAM,CAAC;cACfF,KAAK,EAAE,SAAS;cAChBG,KAAK,EAAE;YACX,CAAC;UACL,CAAC,CAAC;UACFL,IAAI,EAAE,IAAIC,WAAI,CAAC;YACXC,KAAK,EAAE;UACX,CAAC,CAAC;UACFC,MAAM,EAAE,IAAIC,aAAM,CAAC;YACfF,KAAK,EAAE,SAAS;YAChBG,KAAK,EAAE;UACX,CAAC;QACL,CAAC,CACL,CAAC;MACL;IACJ;EAAC;IAAAlF,GAAA;IAAAE,KAAA,EAcD,SAAAyF,OAAOA,CAAA,EAAG;MACN,IAAI,CAAClE,GAAG,CAACmE,WAAW,CAAC,IAAI,CAACR,KAAK,CAAC;IACpC;EAAC;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"HighLayer.js","names":["_antd","require","_source","_layer","_style","_ol","_createFeatureCollection","_format","_typeof","obj","Symbol","iterator","constructor","prototype","ownKeys","object","enumerableOnly","keys","Object","getOwnPropertySymbols","symbols","filter","sym","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","key","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classCallCheck","instance","Constructor","TypeError","_defineProperties","props","descriptor","configurable","writable","_toPropertyKey","_createClass","protoProps","staticProps","value","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","call","Number","HighLayer","options","_this","feature","fit","isFit","addHighlightFeature","addPointHighlight","clearSelectFeature","clearFeatures","Array","isArray","addFeatures","map","fitView","point_overlay","getOverlayById","removeOverlay","geometry","getGeometry","type","getType","ele","document","createElement","className","Overlay","id","element","positioning","stopEvent","addOverlay","setPosition","getFlatCoordinates","pointOverlay","field","fieldName","filterField","newFeature","features","getFeatures","find","v","get","selectFeature","setStyle","isHighLight","setSelectFeature","message","warning","data","geoJsonFormat","GeoJSON","createFeatureCollection","readFeatures","setHighlight","_options$isFit","_options$isHighLight","style","highStyle","Style","image","CircleStyle","radius","fill","Fill","color","stroke","Stroke","width","VectorSource","layer","VectorLayer","zIndex","parmas","params","addLayer","clear","destroy","removeLayer","exports"],"sources":["high-layer/HighLayer.js"],"sourcesContent":["/**\n * 图层高亮操作\n */\nimport { message } from 'antd';\nimport { Vector as VectorSource } from 'ol/source';\nimport { Vector as VectorLayer } from 'ol/layer';\nimport { Style, Stroke, Fill, Circle as CircleStyle } from 'ol/style';\nimport { Overlay } from 'ol';\nimport { createFeatureCollection } from '../feature-layer/createFeatureCollection';\nimport { GeoJSON } from 'ol/format';\nexport default class HighLayer {\n constructor(options) {\n const { isFit = true, isHighLight = true, style, key } = options;\n this.highStyle =\n style ||\n new Style({\n // 高亮样式\n image: new CircleStyle({\n radius: 7,\n fill: new Fill({\n color: '#ff4d4f',\n }),\n stroke: new Stroke({\n color: '#FFFFFF',\n width: 2,\n }),\n }),\n fill: new Fill({\n color: '#ff4d4f',\n }),\n stroke: new Stroke({\n color: '#ff4d4f',\n width: 4,\n }),\n });\n this.isHighLight = isHighLight;\n this.map = options.map;\n this.feature = options.feature;\n this.selectFeature = null;\n this.pointOverlay = null;\n this.isFit = isFit;\n this.source = new VectorSource();\n this.layer = new VectorLayer({\n source: this.source,\n zIndex: 9999,\n style: this.highStyle,\n ...(options.parmas || options.params || {}),\n });\n this.layer.key = key || 'Highlight';\n this.map.addLayer(this.layer);\n }\n // 图层放大\n setHighlight = (feature, fit = true) => {\n this.isFit = fit;\n this.feature = feature;\n this.addHighlightFeature(feature);\n };\n // 点位加波浪\n setPointHighlight = feature => {\n this.feature = feature;\n this.addPointHighlight(feature);\n };\n\n // 高亮图层增加feature\n addHighlightFeature = feature => {\n this.clearSelectFeature();\n this.clearFeatures();\n if (feature && Array.isArray(feature) && feature?.length) {\n this.source.addFeatures(feature);\n this.isFit && this.map.fitView(this.source);\n }\n };\n\n // 点位高亮-扩散\n addPointHighlight = feature => {\n let point_overlay = this.map.getOverlayById('POINT_ANIMATION');\n if (point_overlay) {\n this.map.removeOverlay(point_overlay);\n }\n\n if (feature) {\n let geometry = feature?.getGeometry();\n let type = geometry?.getType();\n if (type === 'Point' && geometry) {\n let ele = document.createElement('div');\n ele.className = 'point_animation';\n\n if (!point_overlay) {\n point_overlay = new Overlay({\n id: 'POINT_ANIMATION',\n element: ele,\n positioning: 'center-center',\n stopEvent: false,\n });\n }\n this.map.addOverlay(point_overlay);\n point_overlay.setPosition(geometry.getFlatCoordinates());\n this.pointOverlay = point_overlay;\n }\n this.isFit && this.map.fitView(feature);\n }\n };\n\n setCenter = (field, fieldName) => {\n let filterField = fieldName || 'code';\n this.clearSelectFeature();\n let newFeature;\n let features = this.source.getFeatures();\n\n if (features?.length) {\n newFeature = features.find(v => {\n return (v.get(filterField) || v.get('CODE')) === field;\n });\n } else if (features && features.get(filterField) === field) {\n newFeature = features;\n }\n this.selectFeature = newFeature;\n\n if (newFeature) {\n newFeature.setStyle();\n this.isFit && this.map.fitView(newFeature);\n if (this.isHighLight) this.setSelectFeature(newFeature);\n } else {\n message.warning('地图上未查询到该数据,请检查是否配置坐标信息!');\n }\n };\n\n clearSelectFeature() {\n if (this.selectFeature) {\n this.selectFeature.setStyle();\n this.selectFeature = null;\n }\n }\n\n clearFeatures() {\n this.source && this.source.clear();\n this.pointOverlay && this.map.removeOverlay(this.pointOverlay);\n }\n\n setSelectFeature(feature) {\n if (feature) {\n this.selectFeature = feature;\n this.selectFeature.setStyle(\n new Style({\n image: new CircleStyle({\n radius: 7,\n fill: new Fill({\n color: '#2491fc',\n }),\n stroke: new Stroke({\n color: '#FFFFFF',\n width: 2,\n }),\n }),\n fill: new Fill({\n color: '#2491fc',\n }),\n stroke: new Stroke({\n color: '#2491fc',\n width: 4,\n }),\n }),\n );\n }\n }\n addHighlightData = (data, key, fit) => {\n if (data) {\n const geoJsonFormat = new GeoJSON();\n let res = createFeatureCollection(Array.isArray(data) ? data : [data]);\n let features = geoJsonFormat.readFeatures(res);\n if (features?.length) {\n features.map(v => {\n v.key = key;\n });\n this.setHighlight(features, fit);\n }\n }\n };\n destroy() {\n this.map.removeLayer(this.layer);\n }\n}\n"],"mappings":";;;;;;AAGA,IAAAA,KAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,GAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAAoC,SAAAO,QAAAC,GAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,GAAA,kBAAAA,GAAA,gBAAAA,GAAA,WAAAA,GAAA,yBAAAC,MAAA,IAAAD,GAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,GAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,GAAA,KAAAD,OAAA,CAAAC,GAAA;AAAA,SAAAK,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OA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CAACI,aAAa,CAAC,IAAI,CAACiB,YAAY,CAAC;IAClE;EAAC;IAAAhE,GAAA;IAAAkB,KAAA,EAED,SAAA2D,iBAAiB5C,OAAO,EAAE;MACtB,IAAIA,OAAO,EAAE;QACT,IAAI,CAACyC,aAAa,GAAGzC,OAAO;QAC5B,IAAI,CAACyC,aAAa,CAACC,QAAQ,CACvB,IAAIe,YAAK,CAAC;UACNC,KAAK,EAAE,IAAIC,aAAW,CAAC;YACnBC,MAAM,EAAE,CAAC;YACTC,IAAI,EAAE,IAAIC,WAAI,CAAC;cACXC,KAAK,EAAE;YACX,CAAC,CAAC;YACFC,MAAM,EAAE,IAAIC,aAAM,CAAC;cACfF,KAAK,EAAE,SAAS;cAChBG,KAAK,EAAE;YACX,CAAC;UACL,CAAC,CAAC;UACFL,IAAI,EAAE,IAAIC,WAAI,CAAC;YACXC,KAAK,EAAE;UACX,CAAC,CAAC;UACFC,MAAM,EAAE,IAAIC,aAAM,CAAC;YACfF,KAAK,EAAE,SAAS;YAChBG,KAAK,EAAE;UACX,CAAC;QACL,CAAC,CACL,CAAC;MACL;IACJ;EAAC;IAAAnG,GAAA;IAAAkB,KAAA,EAcD,SAAA0F,QAAA,EAAU;MACN,IAAI,CAACjE,GAAG,CAACkE,WAAW,CAAC,IAAI,CAACR,KAAK,CAAC;IACpC;EAAC;EAAA,OAAAvE,SAAA;AAAA;AAAAgF,OAAA,cAAAhF,SAAA"}
|
package/lib/high-layer/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -9,17 +9,17 @@ var _react = _interopRequireWildcard(require("react"));
|
|
|
9
9
|
var _useProps2 = _interopRequireDefault(require("../use-props"));
|
|
10
10
|
var _HighLayer = _interopRequireDefault(require("./HighLayer"));
|
|
11
11
|
var _excluded = ["id", "_key"];
|
|
12
|
-
function _interopRequireDefault(
|
|
13
|
-
function _getRequireWildcardCache(
|
|
14
|
-
function _interopRequireWildcard(
|
|
15
|
-
function ownKeys(
|
|
16
|
-
function _objectSpread(
|
|
17
|
-
function _defineProperty(
|
|
18
|
-
function _toPropertyKey(
|
|
19
|
-
function _toPrimitive(
|
|
20
|
-
function _objectWithoutProperties(
|
|
21
|
-
function _objectWithoutPropertiesLoose(
|
|
22
|
-
var _default =
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
14
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
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; }
|
|
22
|
+
var _default = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
23
23
|
var key = props.id,
|
|
24
24
|
_key = props._key,
|
|
25
25
|
otherProps = _objectWithoutProperties(props, _excluded);
|
|
@@ -42,4 +42,5 @@ var _default = exports["default"] = /*#__PURE__*/(0, _react.forwardRef)(function
|
|
|
42
42
|
});
|
|
43
43
|
return null;
|
|
44
44
|
});
|
|
45
|
+
exports["default"] = _default;
|
|
45
46
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_useProps2","_interopRequireDefault","_HighLayer","_excluded","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_useProps2","_interopRequireDefault","_HighLayer","_excluded","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","_default","forwardRef","props","ref","id","_key","otherProps","_useProps","useProps","map","hightlayerRef","useRef","useEffect","current","HighLayer","isFit","isHighLight","destroy","useImperativeHandle","exports"],"sources":["high-layer/index.js"],"sourcesContent":["import React, { useRef, useEffect, forwardRef, useImperativeHandle } from 'react';\nimport useProps from '../use-props';\nimport HighLayer from './HighLayer';\n\nexport default forwardRef(function(props, ref) {\n const {id: key, _key, ...otherProps} = props;\n const { map } = useProps();\n const hightlayerRef = useRef();\n useEffect(() => {\n hightlayerRef.current = new HighLayer({\n map,\n isFit: false,\n isHighLight: false,\n key: key || _key,\n ...otherProps\n });\n return () => {\n hightlayerRef.current && hightlayerRef.current.destroy();\n };\n }, []);\n\n useImperativeHandle(ref, () => {\n return hightlayerRef.current;\n });\n\n return null;\n});\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAoC,IAAAI,SAAA;AAAA,SAAAF,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAM,GAAA,EAAAG,WAAA,SAAAA,WAAA,IAAAH,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAO,OAAA,CAAAP,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAQ,KAAA,GAAAN,wBAAA,CAAAC,WAAA,OAAAK,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAnB,GAAA,EAAAgB,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,C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AO,YAAM;MACTI,aAAa,CAACG,OAAO,IAAIH,aAAa,CAACG,OAAO,CAACI,OAAO,CAAC,CAAC;IAC5D,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAC,0BAAmB,EAACf,GAAG,EAAE,YAAM;IAC3B,OAAOO,aAAa,CAACG,OAAO;EAChC,CAAC,CAAC;EAEF,OAAO,IAAI;AACf,CAAC,CAAC;AAAAM,OAAA,cAAAnB,QAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["high-layer/style/index.js"],"sourcesContent":[""],"mappings":""
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["high-layer/style/index.js"],"sourcesContent":[""],"mappings":""}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["high-layer/style/index.js"],"sourcesContent":[""],"mappings":""
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["high-layer/style/index.js"],"sourcesContent":[""],"mappings":""}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
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); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -14,31 +14,29 @@ var _getSystemInfo = _interopRequireDefault(require("../_util/getSystemInfo"));
|
|
|
14
14
|
var _getToken = require("../_util/getToken");
|
|
15
15
|
var _http = _interopRequireDefault(require("../_util/http"));
|
|
16
16
|
var _encryptParams = _interopRequireDefault(require("../_util/encryptParams"));
|
|
17
|
-
function _interopRequireDefault(
|
|
18
|
-
function ownKeys(
|
|
19
|
-
function _objectSpread(
|
|
20
|
-
function _classCallCheck(
|
|
21
|
-
function _defineProperties(
|
|
22
|
-
function _createClass(
|
|
23
|
-
function
|
|
24
|
-
function
|
|
25
|
-
function
|
|
26
|
-
function
|
|
27
|
-
function
|
|
28
|
-
function
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
33
|
-
function
|
|
34
|
-
function
|
|
35
|
-
function
|
|
36
|
-
function
|
|
37
|
-
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
|
38
|
-
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
18
|
+
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; }
|
|
19
|
+
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; }
|
|
20
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
21
|
+
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); } }
|
|
22
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
23
|
+
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); }
|
|
24
|
+
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); }
|
|
25
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
26
|
+
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); }; }
|
|
27
|
+
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); }
|
|
28
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
29
|
+
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; } }
|
|
30
|
+
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); }
|
|
31
|
+
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; }
|
|
32
|
+
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; }
|
|
33
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
34
|
+
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); }
|
|
35
|
+
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
36
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
39
37
|
var geoJsonFormat = new _format.GeoJSON();
|
|
40
38
|
var tenantId = (0, _getUrlParam["default"])('tenantId') || (0, _getSystemInfo["default"])('tenantId') || '';
|
|
41
|
-
var getFilter =
|
|
39
|
+
var getFilter = function getFilter(group) {
|
|
42
40
|
var cql_filter = '';
|
|
43
41
|
if (group !== null && group !== void 0 && group.length) {
|
|
44
42
|
var filterGroup = group.filter(function (item) {
|
|
@@ -52,6 +50,7 @@ var getFilter = exports.getFilter = function getFilter(group) {
|
|
|
52
50
|
}
|
|
53
51
|
return cql_filter;
|
|
54
52
|
};
|
|
53
|
+
exports.getFilter = getFilter;
|
|
55
54
|
var transformWhere = function transformWhere(field, value, operation) {
|
|
56
55
|
var where = "".concat(field, " ").concat(operation, " '").concat(value, "'");
|
|
57
56
|
if (operation === '===') {
|
|
@@ -65,9 +64,11 @@ var transformWhere = function transformWhere(field, value, operation) {
|
|
|
65
64
|
}
|
|
66
65
|
return where;
|
|
67
66
|
};
|
|
68
|
-
var ImageLayer =
|
|
67
|
+
var ImageLayer = /*#__PURE__*/function (_Image) {
|
|
68
|
+
_inherits(ImageLayer, _Image);
|
|
69
|
+
var _super = _createSuper(ImageLayer);
|
|
69
70
|
function ImageLayer(options) {
|
|
70
|
-
var _this;
|
|
71
|
+
var _thisSuper, _this;
|
|
71
72
|
_classCallCheck(this, ImageLayer);
|
|
72
73
|
var url = options.url,
|
|
73
74
|
params = options.params,
|
|
@@ -108,8 +109,8 @@ var ImageLayer = exports["default"] = /*#__PURE__*/function (_Image) {
|
|
|
108
109
|
});
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
_this =
|
|
112
|
-
|
|
112
|
+
_this = _super.call(this, options);
|
|
113
|
+
_set((_thisSuper = _assertThisInitialized(_this), _getPrototypeOf(ImageLayer.prototype)), "show", show, _thisSuper, true);
|
|
113
114
|
// 图层标识
|
|
114
115
|
_this.url = url;
|
|
115
116
|
_this._params = _objectSpread({
|
|
@@ -167,11 +168,10 @@ var ImageLayer = exports["default"] = /*#__PURE__*/function (_Image) {
|
|
|
167
168
|
return _this;
|
|
168
169
|
}
|
|
169
170
|
// 重写父类的属性访问器
|
|
170
|
-
|
|
171
|
-
return _createClass(ImageLayer, [{
|
|
171
|
+
_createClass(ImageLayer, [{
|
|
172
172
|
key: "show",
|
|
173
173
|
get: function get() {
|
|
174
|
-
return
|
|
174
|
+
return _get(_getPrototypeOf(ImageLayer.prototype), "show", this);
|
|
175
175
|
},
|
|
176
176
|
set: function set(value) {
|
|
177
177
|
this.setVisible(value);
|
|
@@ -322,5 +322,7 @@ var ImageLayer = exports["default"] = /*#__PURE__*/function (_Image) {
|
|
|
322
322
|
return (0, _layer2.getWFSFeatureInfoByLayer)(layer, cql_filter);
|
|
323
323
|
}
|
|
324
324
|
}]);
|
|
325
|
+
return ImageLayer;
|
|
325
326
|
}(_layer.Image);
|
|
327
|
+
exports["default"] = ImageLayer;
|
|
326
328
|
//# sourceMappingURL=ImageLayer.js.map
|