@vtx/ol-map 2.0.0-beta.1 → 2.0.0-beta.10
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/lib/_util/EventEmitter.js +78 -0
- package/lib/_util/EventEmitter.js.map +1 -0
- package/lib/_util/StyleCache.js +46 -0
- package/lib/_util/StyleCache.js.map +1 -0
- package/lib/_util/encryptParams.js +60 -0
- package/lib/_util/encryptParams.js.map +1 -0
- package/lib/_util/filterSpecialCharacters.js +90 -0
- package/lib/_util/filterSpecialCharacters.js.map +1 -0
- package/lib/_util/getComponentProps.js +14 -0
- package/lib/_util/getComponentProps.js.map +1 -0
- package/lib/_util/getCookie.js +24 -0
- package/lib/_util/getCookie.js.map +1 -0
- package/lib/_util/getDefaultMapInfo.js +50 -0
- package/lib/_util/getDefaultMapInfo.js.map +1 -0
- package/lib/_util/getSystemInfo.js +26 -0
- package/lib/_util/getSystemInfo.js.map +1 -0
- package/lib/_util/getToken.js +27 -0
- package/lib/_util/getToken.js.map +1 -0
- package/lib/_util/http.js +176 -0
- package/lib/_util/http.js.map +1 -0
- package/lib/_util/isFunction.js +10 -0
- package/lib/_util/isFunction.js.map +1 -0
- package/lib/_util/isObject.js +10 -0
- package/lib/_util/isObject.js.map +1 -0
- package/lib/_util/layer.js +152 -0
- package/lib/_util/layer.js.map +1 -0
- package/lib/_util/mapTool.js +188 -0
- package/lib/_util/mapTool.js.map +1 -0
- package/lib/_util/projection.js +44 -0
- package/lib/_util/projection.js.map +1 -0
- package/lib/_util/projzh/datum/bd-09.js +44 -0
- package/lib/_util/projzh/datum/bd-09.js.map +1 -0
- package/lib/_util/projzh/datum/gcj-02.js +72 -0
- package/lib/_util/projzh/datum/gcj-02.js.map +1 -0
- package/lib/_util/projzh/datum/index.js +14 -0
- package/lib/_util/projzh/datum/index.js.map +1 -0
- package/lib/_util/projzh/index.js +40 -0
- package/lib/_util/projzh/index.js.map +1 -0
- package/lib/_util/projzh/projection/baidu-mercator.js +74 -0
- package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -0
- package/lib/_util/projzh/projection/index.js +14 -0
- package/lib/_util/projzh/projection/index.js.map +1 -0
- package/lib/_util/projzh/projection/spherical-mercator.js +25 -0
- package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -0
- package/lib/_util/projzh/util.js +27 -0
- package/lib/_util/projzh/util.js.map +1 -0
- package/lib/_util/search.js +117 -0
- package/lib/_util/search.js.map +1 -0
- package/lib/_util/setCookie.js +15 -0
- package/lib/_util/setCookie.js.map +1 -0
- package/lib/_util/stringToFun.js +25 -0
- package/lib/_util/stringToFun.js.map +1 -0
- package/lib/_util/transform.js +169 -0
- package/lib/_util/transform.js.map +1 -0
- package/lib/_util/useColSize.js +28 -0
- package/lib/_util/useColSize.js.map +1 -0
- package/lib/_util/useInterval.js +19 -0
- package/lib/_util/useInterval.js.map +1 -0
- package/lib/_util/useSet.js +44 -0
- package/lib/_util/useSet.js.map +1 -0
- package/lib/analysis-layer/index.js +461 -0
- package/lib/analysis-layer/index.js.map +1 -0
- package/lib/analysis-layer/style/css.js +2 -0
- package/lib/analysis-layer/style/css.js.map +1 -0
- package/lib/analysis-layer/style/index.js +2 -0
- package/lib/analysis-layer/style/index.js.map +1 -0
- package/lib/arrow-flow-layer/ArrowFlowLayer.js +438 -0
- package/lib/arrow-flow-layer/ArrowFlowLayer.js.map +1 -0
- package/lib/arrow-flow-layer/index.js +140 -0
- package/lib/arrow-flow-layer/index.js.map +1 -0
- package/lib/arrow-flow-layer/sampleArrowsAlongLine.js +87 -0
- package/lib/arrow-flow-layer/sampleArrowsAlongLine.js.map +1 -0
- package/lib/arrow-flow-layer/style/css.js +4 -0
- package/lib/arrow-flow-layer/style/css.js.map +1 -0
- package/lib/arrow-flow-layer/style/index.css +0 -0
- package/lib/arrow-flow-layer/style/index.js +4 -0
- package/lib/arrow-flow-layer/style/index.js.map +1 -0
- package/lib/arrow-flow-layer/style/index.less +0 -0
- package/lib/assets/arrow.png +0 -0
- package/lib/assets/base-img-1.png +0 -0
- package/lib/assets/base-img-2.png +0 -0
- package/lib/assets/base-img-3.png +0 -0
- package/lib/assets/base-img-4.png +0 -0
- package/lib/assets/base-img-5.png +0 -0
- package/lib/assets/base-img-6.png +0 -0
- package/lib/assets/base-img.png +0 -0
- package/lib/assets/bz.png +0 -0
- package/lib/assets/img.png +0 -0
- package/lib/assets/kz.png +0 -0
- package/lib/assets/ll.png +0 -0
- package/lib/assets/location.png +0 -0
- package/lib/assets/noLocation.png +0 -0
- package/lib/assets/people.png +0 -0
- package/lib/assets/qd.png +0 -0
- package/lib/assets/sw.png +0 -0
- package/lib/assets/yl.png +0 -0
- package/lib/assets/zd.png +0 -0
- package/lib/buffer-draw/BufferDraw.js +399 -0
- package/lib/buffer-draw/BufferDraw.js.map +1 -0
- package/lib/buffer-draw/index.js +58 -0
- package/lib/buffer-draw/index.js.map +1 -0
- package/lib/buffer-draw/style/css.js +2 -0
- package/lib/buffer-draw/style/css.js.map +1 -0
- package/lib/buffer-draw/style/index.js +2 -0
- package/lib/buffer-draw/style/index.js.map +1 -0
- package/lib/circle/Circle.js +51 -0
- package/lib/circle/Circle.js.map +1 -0
- package/lib/circle/index.js +64 -0
- package/lib/circle/index.js.map +1 -0
- package/lib/circle/style/css.js +2 -0
- package/lib/circle/style/css.js.map +1 -0
- package/lib/circle/style/index.js +2 -0
- package/lib/circle/style/index.js.map +1 -0
- package/lib/config.js +12 -0
- package/lib/config.js.map +1 -0
- package/lib/convertCamelToCSS.js +23 -0
- package/lib/convertCamelToCSS.js.map +1 -0
- package/lib/dom/Dom.js +39 -0
- package/lib/dom/Dom.js.map +1 -0
- package/lib/dom/index.js +82 -0
- package/lib/dom/index.js.map +1 -0
- package/lib/dom/style/css.js +2 -0
- package/lib/dom/style/css.js.map +1 -0
- package/lib/dom/style/index.js +2 -0
- package/lib/dom/style/index.js.map +1 -0
- package/lib/dom-layer/index.js +249 -0
- package/lib/dom-layer/index.js.map +1 -0
- package/lib/dom-layer/style/css.js +4 -0
- package/lib/dom-layer/style/css.js.map +1 -0
- package/lib/dom-layer/style/index.css +3 -0
- package/lib/dom-layer/style/index.js +4 -0
- package/lib/dom-layer/style/index.js.map +1 -0
- package/lib/dom-layer/style/index.less +3 -0
- package/lib/events/index.js +25 -0
- package/lib/events/index.js.map +1 -0
- package/lib/feature-draw/FeatureDraw.js +231 -0
- package/lib/feature-draw/FeatureDraw.js.map +1 -0
- package/lib/feature-draw/index.js +76 -0
- package/lib/feature-draw/index.js.map +1 -0
- package/lib/feature-draw/style/css.js +2 -0
- package/lib/feature-draw/style/css.js.map +1 -0
- package/lib/feature-draw/style/index.js +2 -0
- package/lib/feature-draw/style/index.js.map +1 -0
- package/lib/feature-layer/FeatureLayer.js +1093 -0
- package/lib/feature-layer/FeatureLayer.js.map +1 -0
- package/lib/feature-layer/MyCluster.js +150 -0
- package/lib/feature-layer/MyCluster.js.map +1 -0
- package/lib/feature-layer/createFeatureCollection.js +167 -0
- package/lib/feature-layer/createFeatureCollection.js.map +1 -0
- package/lib/feature-layer/index.js +154 -0
- package/lib/feature-layer/index.js.map +1 -0
- package/lib/feature-layer/style/css.js +4 -0
- package/lib/feature-layer/style/css.js.map +1 -0
- package/lib/feature-layer/style/index.css +0 -0
- package/lib/feature-layer/style/index.js +4 -0
- package/lib/feature-layer/style/index.js.map +1 -0
- package/lib/feature-layer/style/index.less +0 -0
- package/lib/flow-line-layer/FlowLineLayer.js +197 -0
- package/lib/flow-line-layer/FlowLineLayer.js.map +1 -0
- package/lib/flow-line-layer/index.js +126 -0
- package/lib/flow-line-layer/index.js.map +1 -0
- package/lib/flow-line-layer/style/css.js +4 -0
- package/lib/flow-line-layer/style/css.js.map +1 -0
- package/lib/flow-line-layer/style/index.css +0 -0
- package/lib/flow-line-layer/style/index.js +4 -0
- package/lib/flow-line-layer/style/index.js.map +1 -0
- package/lib/flow-line-layer/style/index.less +0 -0
- package/lib/fly-line-layer/FlyLineLayer.js +218 -0
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -0
- package/lib/fly-line-layer/index.js +109 -0
- package/lib/fly-line-layer/index.js.map +1 -0
- package/lib/fly-line-layer/style/css.js +4 -0
- package/lib/fly-line-layer/style/css.js.map +1 -0
- package/lib/fly-line-layer/style/index.css +0 -0
- package/lib/fly-line-layer/style/index.js +4 -0
- package/lib/fly-line-layer/style/index.js.map +1 -0
- package/lib/fly-line-layer/style/index.less +0 -0
- package/lib/group-layer/GroupLayer.js +134 -0
- package/lib/group-layer/GroupLayer.js.map +1 -0
- package/lib/group-layer/index.js +73 -0
- package/lib/group-layer/index.js.map +1 -0
- package/lib/group-layer/style/css.js +4 -0
- package/lib/group-layer/style/css.js.map +1 -0
- package/lib/group-layer/style/index.css +0 -0
- package/lib/group-layer/style/index.js +4 -0
- package/lib/group-layer/style/index.js.map +1 -0
- package/lib/group-layer/style/index.less +0 -0
- package/lib/heatmap-layer/HeatmapLayer.js +191 -0
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -0
- package/lib/heatmap-layer/index.js +102 -0
- package/lib/heatmap-layer/index.js.map +1 -0
- package/lib/heatmap-layer/style/css.js +4 -0
- package/lib/heatmap-layer/style/css.js.map +1 -0
- package/lib/heatmap-layer/style/index.css +0 -0
- package/lib/heatmap-layer/style/index.js +4 -0
- package/lib/heatmap-layer/style/index.js.map +1 -0
- package/lib/heatmap-layer/style/index.less +0 -0
- package/lib/high-layer/HighLayer.js +201 -0
- package/lib/high-layer/HighLayer.js.map +1 -0
- package/lib/high-layer/index.js +46 -0
- package/lib/high-layer/index.js.map +1 -0
- package/lib/high-layer/style/css.js +2 -0
- package/lib/high-layer/style/css.js.map +1 -0
- package/lib/high-layer/style/index.js +2 -0
- package/lib/high-layer/style/index.js.map +1 -0
- package/lib/image-layer/ImageLayer.js +330 -0
- package/lib/image-layer/ImageLayer.js.map +1 -0
- package/lib/image-layer/ImageTileLayer.js +332 -0
- package/lib/image-layer/ImageTileLayer.js.map +1 -0
- package/lib/image-layer/index.js +100 -0
- package/lib/image-layer/index.js.map +1 -0
- package/lib/image-layer/style/css.js +4 -0
- package/lib/image-layer/style/css.js.map +1 -0
- package/lib/image-layer/style/index.css +0 -0
- package/lib/image-layer/style/index.js +4 -0
- package/lib/image-layer/style/index.js.map +1 -0
- package/lib/image-layer/style/index.less +0 -0
- package/lib/index.js +215 -0
- package/lib/index.js.map +1 -0
- package/lib/legend/index.js +254 -0
- package/lib/legend/index.js.map +1 -0
- package/lib/legend/style/css.js +4 -0
- package/lib/legend/style/css.js.map +1 -0
- package/lib/legend/style/index.css +109 -0
- package/lib/legend/style/index.js +4 -0
- package/lib/legend/style/index.js.map +1 -0
- package/lib/legend/style/index.less +100 -0
- package/lib/map/Analysis.js +148 -0
- package/lib/map/Analysis.js.map +1 -0
- package/lib/map/Layers.js +338 -0
- package/lib/map/Layers.js.map +1 -0
- package/lib/map/Popup.js +386 -0
- package/lib/map/Popup.js.map +1 -0
- package/lib/map/ScaleDenominator.js +68 -0
- package/lib/map/ScaleDenominator.js.map +1 -0
- package/lib/map/Test.js +144 -0
- package/lib/map/Test.js.map +1 -0
- package/lib/map/defaultTextEnum.js +165 -0
- package/lib/map/defaultTextEnum.js.map +1 -0
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +163 -0
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -0
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +84 -0
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -0
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js +65 -0
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +1 -0
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +84 -0
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -0
- package/lib/map/getBaseLayers/index.js +46 -0
- package/lib/map/getBaseLayers/index.js.map +1 -0
- package/lib/map/index.js +841 -0
- package/lib/map/index.js.map +1 -0
- package/lib/map/style/css.js +5 -0
- package/lib/map/style/css.js.map +1 -0
- package/lib/map/style/index.css +171 -0
- package/lib/map/style/index.js +5 -0
- package/lib/map/style/index.js.map +1 -0
- package/lib/map/style/index.less +152 -0
- package/lib/map-icon/svg/index.js +81 -0
- package/lib/map-icon/svg/index.js.map +1 -0
- package/lib/map-icon/svg/tuceng.svg.js +2 -0
- package/lib/map-icon/svg/tuceng.svg.js.map +1 -0
- package/lib/marker/Marker.js +105 -0
- package/lib/marker/Marker.js.map +1 -0
- package/lib/marker/index.js +61 -0
- package/lib/marker/index.js.map +1 -0
- package/lib/marker/style/css.js +2 -0
- package/lib/marker/style/css.js.map +1 -0
- package/lib/marker/style/index.js +2 -0
- package/lib/marker/style/index.js.map +1 -0
- package/lib/path-line-layer/PathLineLayer.js +45 -0
- package/lib/path-line-layer/PathLineLayer.js.map +1 -0
- package/lib/path-line-layer/getPathLineStyles.js +71 -0
- package/lib/path-line-layer/getPathLineStyles.js.map +1 -0
- package/lib/path-line-layer/index.js +151 -0
- package/lib/path-line-layer/index.js.map +1 -0
- package/lib/path-line-layer/style/css.js +4 -0
- package/lib/path-line-layer/style/css.js.map +1 -0
- package/lib/path-line-layer/style/index.css +0 -0
- package/lib/path-line-layer/style/index.js +4 -0
- package/lib/path-line-layer/style/index.js.map +1 -0
- package/lib/path-line-layer/style/index.less +0 -0
- package/lib/path-play-back/PathPlayBack.js +700 -0
- package/lib/path-play-back/PathPlayBack.js.map +1 -0
- package/lib/path-play-back/index.js +83 -0
- package/lib/path-play-back/index.js.map +1 -0
- package/lib/path-play-back/style/css.js +2 -0
- package/lib/path-play-back/style/css.js.map +1 -0
- package/lib/path-play-back/style/index.js +2 -0
- package/lib/path-play-back/style/index.js.map +1 -0
- package/lib/poi-search/Location.js +62 -0
- package/lib/poi-search/Location.js.map +1 -0
- package/lib/poi-search/PoiList.js +123 -0
- package/lib/poi-search/PoiList.js.map +1 -0
- package/lib/poi-search/Search.js +213 -0
- package/lib/poi-search/Search.js.map +1 -0
- package/lib/poi-search/index.js +178 -0
- package/lib/poi-search/index.js.map +1 -0
- package/lib/poi-search/style/css.js +4 -0
- package/lib/poi-search/style/css.js.map +1 -0
- package/lib/poi-search/style/index.css +96 -0
- package/lib/poi-search/style/index.js +4 -0
- package/lib/poi-search/style/index.js.map +1 -0
- package/lib/poi-search/style/index.less +97 -0
- package/lib/point/Point.js +57 -0
- package/lib/point/Point.js.map +1 -0
- package/lib/point/index.js +61 -0
- package/lib/point/index.js.map +1 -0
- package/lib/point/style/css.js +2 -0
- package/lib/point/style/css.js.map +1 -0
- package/lib/point/style/index.js +2 -0
- package/lib/point/style/index.js.map +1 -0
- package/lib/polygon/Polygon.js +51 -0
- package/lib/polygon/Polygon.js.map +1 -0
- package/lib/polygon/index.js +61 -0
- package/lib/polygon/index.js.map +1 -0
- package/lib/polygon/style/css.js +2 -0
- package/lib/polygon/style/css.js.map +1 -0
- package/lib/polygon/style/index.js +2 -0
- package/lib/polygon/style/index.js.map +1 -0
- package/lib/polyline/Polyline.js +51 -0
- package/lib/polyline/Polyline.js.map +1 -0
- package/lib/polyline/index.js +61 -0
- package/lib/polyline/index.js.map +1 -0
- package/lib/polyline/style/css.js +2 -0
- package/lib/polyline/style/css.js.map +1 -0
- package/lib/polyline/style/index.js +2 -0
- package/lib/polyline/style/index.js.map +1 -0
- package/lib/popup/index.js +202 -0
- package/lib/popup/index.js.map +1 -0
- package/lib/popup/style/css.js +4 -0
- package/lib/popup/style/css.js.map +1 -0
- package/lib/popup/style/index.css +131 -0
- package/lib/popup/style/index.js +4 -0
- package/lib/popup/style/index.js.map +1 -0
- package/lib/popup/style/index.less +129 -0
- package/lib/provider/index.js +12 -0
- package/lib/provider/index.js.map +1 -0
- package/lib/provider/style/css.js +2 -0
- package/lib/provider/style/css.js.map +1 -0
- package/lib/provider/style/index.js +2 -0
- package/lib/provider/style/index.js.map +1 -0
- package/lib/renderer/Fill.js +37 -0
- package/lib/renderer/Fill.js.map +1 -0
- package/lib/renderer/Stroke.js +39 -0
- package/lib/renderer/Stroke.js.map +1 -0
- package/lib/renderer/index.js +137 -0
- package/lib/renderer/index.js.map +1 -0
- package/lib/renderer/style/css.js +4 -0
- package/lib/renderer/style/css.js.map +1 -0
- package/lib/renderer/style/index.css +0 -0
- package/lib/renderer/style/index.js +4 -0
- package/lib/renderer/style/index.js.map +1 -0
- package/lib/renderer/style/index.less +0 -0
- package/lib/renderer/transformRgb.js +33 -0
- package/lib/renderer/transformRgb.js.map +1 -0
- package/lib/search-map/VtxModal.js +209 -0
- package/lib/search-map/VtxModal.js.map +1 -0
- package/lib/search-map/index.js +542 -0
- package/lib/search-map/index.js.map +1 -0
- package/lib/search-map/style/css.js +6 -0
- package/lib/search-map/style/css.js.map +1 -0
- package/lib/search-map/style/index.css +86 -0
- package/lib/search-map/style/index.js +6 -0
- package/lib/search-map/style/index.js.map +1 -0
- package/lib/search-map/style/index.less +97 -0
- package/lib/search-map/style/modal.css +56 -0
- package/lib/search-map/style/modal.less +66 -0
- package/lib/style/index.css +0 -0
- package/lib/style/index.less +2 -0
- package/lib/style/themes/compact.css +0 -0
- package/lib/style/themes/compact.less +1 -0
- package/lib/style/themes/dark.css +0 -0
- package/lib/style/themes/dark.less +7 -0
- package/lib/style/themes/default.css +0 -0
- package/lib/style/themes/default.less +7 -0
- package/lib/style/themes/index.css +0 -0
- package/lib/style/themes/index.less +1 -0
- package/lib/style/themes/variable.css +0 -0
- package/lib/style/themes/variable.less +5 -0
- package/lib/tile-layer/TileLayer.js +85 -0
- package/lib/tile-layer/TileLayer.js.map +1 -0
- package/lib/tile-layer/index.js +54 -0
- package/lib/tile-layer/index.js.map +1 -0
- package/lib/tile-layer/style/css.js +4 -0
- package/lib/tile-layer/style/css.js.map +1 -0
- package/lib/tile-layer/style/index.css +0 -0
- package/lib/tile-layer/style/index.js +4 -0
- package/lib/tile-layer/style/index.js.map +1 -0
- package/lib/tile-layer/style/index.less +0 -0
- package/lib/tools/Layer/LayerService.js +182 -0
- package/lib/tools/Layer/LayerService.js.map +1 -0
- package/lib/tools/Layer/LayersCheckService.js +188 -0
- package/lib/tools/Layer/LayersCheckService.js.map +1 -0
- package/lib/tools/Layer/index.css +50 -0
- package/lib/tools/Layer/index.js +225 -0
- package/lib/tools/Layer/index.js.map +1 -0
- package/lib/tools/Layer/index.less +43 -0
- package/lib/tools/Search/index.js +305 -0
- package/lib/tools/Search/index.js.map +1 -0
- package/lib/tools/Toolbox/BoxSelect/index.js +22 -0
- package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -0
- package/lib/tools/Toolbox/CircleSelect/index.js +22 -0
- package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -0
- package/lib/tools/Toolbox/EagleEye/index.js +56 -0
- package/lib/tools/Toolbox/EagleEye/index.js.map +1 -0
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +147 -0
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +1 -0
- package/lib/tools/Toolbox/MapBookmark/index.css +18 -0
- package/lib/tools/Toolbox/MapBookmark/index.js +429 -0
- package/lib/tools/Toolbox/MapBookmark/index.js.map +1 -0
- package/lib/tools/Toolbox/MapBookmark/index.less +20 -0
- package/lib/tools/Toolbox/MapDownload/index.js +16 -0
- package/lib/tools/Toolbox/MapDownload/index.js.map +1 -0
- package/lib/tools/Toolbox/MapPrint/index.css +4 -0
- package/lib/tools/Toolbox/MapPrint/index.js +233 -0
- package/lib/tools/Toolbox/MapPrint/index.js.map +1 -0
- package/lib/tools/Toolbox/MapPrint/index.less +4 -0
- package/lib/tools/Toolbox/Measure/Area/index.js +16 -0
- package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -0
- package/lib/tools/Toolbox/Measure/Distance/index.js +16 -0
- package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -0
- package/lib/tools/Toolbox/Measure/Measure.js +236 -0
- package/lib/tools/Toolbox/Measure/Measure.js.map +1 -0
- package/lib/tools/Toolbox/Measure/index.js +77 -0
- package/lib/tools/Toolbox/Measure/index.js.map +1 -0
- package/lib/tools/Toolbox/PolygonSelect/index.js +19 -0
- package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -0
- package/lib/tools/Toolbox/ScaleLine/index.js +58 -0
- package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -0
- package/lib/tools/Toolbox/SelectTools/index.css +103 -0
- package/lib/tools/Toolbox/SelectTools/index.js +788 -0
- package/lib/tools/Toolbox/SelectTools/index.js.map +1 -0
- package/lib/tools/Toolbox/SelectTools/index.less +87 -0
- package/lib/tools/Toolbox/SpaceQuery/index.css +19 -0
- package/lib/tools/Toolbox/SpaceQuery/index.js +597 -0
- package/lib/tools/Toolbox/SpaceQuery/index.js.map +1 -0
- package/lib/tools/Toolbox/SpaceQuery/index.less +16 -0
- package/lib/tools/Toolbox/ZoomInput/index.css +6 -0
- package/lib/tools/Toolbox/ZoomInput/index.js +50 -0
- package/lib/tools/Toolbox/ZoomInput/index.js.map +1 -0
- package/lib/tools/Toolbox/ZoomInput/index.less +6 -0
- package/lib/tools/Toolbox/draftingPrint/index.css +26 -0
- package/lib/tools/Toolbox/draftingPrint/index.js +365 -0
- package/lib/tools/Toolbox/draftingPrint/index.js.map +1 -0
- package/lib/tools/Toolbox/draftingPrint/index.less +34 -0
- package/lib/tools/Toolbox/index.css +0 -0
- package/lib/tools/Toolbox/index.js +206 -0
- package/lib/tools/Toolbox/index.js.map +1 -0
- package/lib/tools/Toolbox/index.less +2 -0
- package/lib/tools/Utils/CreateOverlay.js +46 -0
- package/lib/tools/Utils/CreateOverlay.js.map +1 -0
- package/lib/tools/Utils/Draw.js +127 -0
- package/lib/tools/Utils/Draw.js.map +1 -0
- package/lib/tools/Utils/HighLayer.js +212 -0
- package/lib/tools/Utils/HighLayer.js.map +1 -0
- package/lib/tools/Utils/measure.js +246 -0
- package/lib/tools/Utils/measure.js.map +1 -0
- package/lib/tools/Utils/utils.js +263 -0
- package/lib/tools/Utils/utils.js.map +1 -0
- package/lib/tools/View/index.css +35 -0
- package/lib/tools/View/index.js +179 -0
- package/lib/tools/View/index.js.map +1 -0
- package/lib/tools/View/index.less +28 -0
- package/lib/tools/analysis-tool/index.js +111 -0
- package/lib/tools/analysis-tool/index.js.map +1 -0
- package/lib/tools/base-map-switch/index.js +168 -0
- package/lib/tools/base-map-switch/index.js.map +1 -0
- package/lib/tools/components/Chart/index.js +821 -0
- package/lib/tools/components/Chart/index.js.map +1 -0
- package/lib/tools/components/Icon/index.js +31 -0
- package/lib/tools/components/Icon/index.js.map +1 -0
- package/lib/tools/components/Info/index.css +39 -0
- package/lib/tools/components/Info/index.js +34 -0
- package/lib/tools/components/Info/index.js.map +1 -0
- package/lib/tools/components/Info/index.less +26 -0
- package/lib/tools/components/ItemWrap/index.css +43 -0
- package/lib/tools/components/ItemWrap/index.js +46 -0
- package/lib/tools/components/ItemWrap/index.js.map +1 -0
- package/lib/tools/components/ItemWrap/index.less +41 -0
- package/lib/tools/components/Modal/index.css +42 -0
- package/lib/tools/components/Modal/index.js +45 -0
- package/lib/tools/components/Modal/index.js.map +1 -0
- package/lib/tools/components/Modal/index.less +33 -0
- package/lib/tools/components/MyTabs/index.js +22 -0
- package/lib/tools/components/MyTabs/index.js.map +1 -0
- package/lib/tools/components/RequiredLabel/index.css +5 -0
- package/lib/tools/components/RequiredLabel/index.js +32 -0
- package/lib/tools/components/RequiredLabel/index.js.map +1 -0
- package/lib/tools/components/RequiredLabel/index.less +5 -0
- package/lib/tools/components/Select/index.js +32 -0
- package/lib/tools/components/Select/index.js.map +1 -0
- package/lib/tools/components/Table/assets/tableIcon.png +0 -0
- package/lib/tools/components/Table/index.css +10 -0
- package/lib/tools/components/Table/index.js +92 -0
- package/lib/tools/components/Table/index.js.map +1 -0
- package/lib/tools/components/Table/index.less +13 -0
- package/lib/tools/components/ToolItem/index.css +30 -0
- package/lib/tools/components/ToolItem/index.js +28 -0
- package/lib/tools/components/ToolItem/index.js.map +1 -0
- package/lib/tools/components/ToolItem/index.less +27 -0
- package/lib/tools/components/ToolsSelect/index.css +15 -0
- package/lib/tools/components/ToolsSelect/index.js +44 -0
- package/lib/tools/components/ToolsSelect/index.js.map +1 -0
- package/lib/tools/components/ToolsSelect/index.less +10 -0
- package/lib/tools/full-screen/index.js +45 -0
- package/lib/tools/full-screen/index.js.map +1 -0
- package/lib/tools/index.js +161 -0
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/layer-control/index.js +170 -0
- package/lib/tools/layer-control/index.js.map +1 -0
- package/lib/tools/refresh/index.js +39 -0
- package/lib/tools/refresh/index.js.map +1 -0
- package/lib/tools/style/css.js +13 -0
- package/lib/tools/style/css.js.map +1 -0
- package/lib/tools/style/index.css +136 -0
- package/lib/tools/style/index.js +13 -0
- package/lib/tools/style/index.js.map +1 -0
- package/lib/tools/style/index.less +154 -0
- package/lib/tools-item/index.js +65 -0
- package/lib/tools-item/index.js.map +1 -0
- package/lib/use-props/index.js +14 -0
- package/lib/use-props/index.js.map +1 -0
- package/lib/use-props/style/css.js +2 -0
- package/lib/use-props/style/css.js.map +1 -0
- package/lib/use-props/style/index.js +2 -0
- package/lib/use-props/style/index.js.map +1 -0
- package/lib/wms-layer/WmsLayer.js +313 -0
- package/lib/wms-layer/WmsLayer.js.map +1 -0
- package/lib/wms-layer/index.js +97 -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 +24 -15
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
.ol-tools-legend {
|
|
2
|
+
position: absolute;
|
|
3
|
+
bottom: 10px;
|
|
4
|
+
left: 10px;
|
|
5
|
+
|
|
6
|
+
padding: 6px 10px;
|
|
7
|
+
|
|
8
|
+
background: #fff;
|
|
9
|
+
border-radius: 8px;
|
|
10
|
+
|
|
11
|
+
user-select: none;
|
|
12
|
+
|
|
13
|
+
width: max-content;
|
|
14
|
+
|
|
15
|
+
.ol-tools-legend-title {
|
|
16
|
+
font-size: 16px;
|
|
17
|
+
letter-spacing: 2px;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.ol-tools-legend-content {
|
|
21
|
+
cursor: pointer;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.ol-tools-legend-list-wrap {
|
|
25
|
+
min-width: 60px;
|
|
26
|
+
display: none;
|
|
27
|
+
.ol-tools-legend-list-column {
|
|
28
|
+
display: flex;
|
|
29
|
+
}
|
|
30
|
+
.ol-tools-legend-list {
|
|
31
|
+
display: flex;
|
|
32
|
+
flex-direction: column;
|
|
33
|
+
max-width: none;
|
|
34
|
+
max-height: none;
|
|
35
|
+
overflow-y: auto;
|
|
36
|
+
|
|
37
|
+
.ol-tools-legend-item {
|
|
38
|
+
text-align: center;
|
|
39
|
+
padding: 4px;
|
|
40
|
+
min-width: 50px;
|
|
41
|
+
display: flex;
|
|
42
|
+
align-items: center;
|
|
43
|
+
|
|
44
|
+
.ol-tools-legend-item-img {
|
|
45
|
+
max-height: 28px;
|
|
46
|
+
margin-right: 5px;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
.ol-tools-legend-item-title {
|
|
50
|
+
font-size: 12px;
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:hover {
|
|
57
|
+
.ol-tools-legend-list-wrap {
|
|
58
|
+
display: block;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.ol-tools-legend-list {
|
|
63
|
+
max-width: 270px;
|
|
64
|
+
max-height: 270px;
|
|
65
|
+
overflow-y: scroll;
|
|
66
|
+
|
|
67
|
+
.ol-tools-legend-item {
|
|
68
|
+
text-align: center;
|
|
69
|
+
padding: 4px;
|
|
70
|
+
min-width: 50px;
|
|
71
|
+
display: flex;
|
|
72
|
+
align-items: center;
|
|
73
|
+
.ol-tools-legend-item-img-wrap {
|
|
74
|
+
margin-right: 5px;
|
|
75
|
+
display: flex;
|
|
76
|
+
align-items: center;
|
|
77
|
+
justify-content: center;
|
|
78
|
+
width: 32px;
|
|
79
|
+
height: 32px;
|
|
80
|
+
}
|
|
81
|
+
.ol-tools-legend-item-img {
|
|
82
|
+
max-width: 32px;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.ol-tools-legend-item-title {
|
|
86
|
+
font-size: 14px;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.ol-tools-legend-close-btn {
|
|
93
|
+
position: absolute;
|
|
94
|
+
top: 10px;
|
|
95
|
+
right: 10px;
|
|
96
|
+
z-index: 999;
|
|
97
|
+
font-size: 18px;
|
|
98
|
+
font-weight: bold;
|
|
99
|
+
cursor: pointer;
|
|
100
|
+
}
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _EventEmitter2 = _interopRequireDefault(require("../_util/EventEmitter"));
|
|
9
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
10
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
11
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
12
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
13
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
14
|
+
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); }
|
|
15
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
16
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
17
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
18
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
19
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
20
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
21
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
22
|
+
var Analysis = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
23
|
+
function Analysis(options) {
|
|
24
|
+
var _this;
|
|
25
|
+
_classCallCheck(this, Analysis);
|
|
26
|
+
_this = _callSuper(this, Analysis);
|
|
27
|
+
_this.map = options.map;
|
|
28
|
+
_this.analysis = [];
|
|
29
|
+
_this.activeKey = null;
|
|
30
|
+
_this.map.addAnalysis = function (analysis, group) {
|
|
31
|
+
_this.addAnalysis(analysis, group);
|
|
32
|
+
};
|
|
33
|
+
_this.map.removeAnalysis = function (analysis, group) {
|
|
34
|
+
_this.removeAnalysis(analysis, group);
|
|
35
|
+
};
|
|
36
|
+
_this.map.clearAnalysis = function () {
|
|
37
|
+
_this.clearAnalysis();
|
|
38
|
+
};
|
|
39
|
+
_this.map.getAnalysis = function () {
|
|
40
|
+
return _this.getAnalysis();
|
|
41
|
+
};
|
|
42
|
+
_this.map.setAnalysisActiveKey = function (key) {
|
|
43
|
+
_this.setActiveKey(key);
|
|
44
|
+
};
|
|
45
|
+
_this.map.getAnalysisActiveKey = function () {
|
|
46
|
+
return _this.getActiveKey();
|
|
47
|
+
};
|
|
48
|
+
return _this;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// 图层改变的时候
|
|
52
|
+
_inherits(Analysis, _EventEmitter);
|
|
53
|
+
return _createClass(Analysis, [{
|
|
54
|
+
key: "onChange",
|
|
55
|
+
value: function onChange() {
|
|
56
|
+
this.emit('change', this.analysis);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
// 图层改变的时候
|
|
60
|
+
}, {
|
|
61
|
+
key: "onActiveChange",
|
|
62
|
+
value: function onActiveChange() {
|
|
63
|
+
this.emit('activeChange', this.activeKey);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// 添加分析
|
|
67
|
+
}, {
|
|
68
|
+
key: "addAnalysis",
|
|
69
|
+
value: function addAnalysis(analysis, group) {
|
|
70
|
+
if (analysis.name) {
|
|
71
|
+
if (group) {
|
|
72
|
+
var _loop = function loop(data) {
|
|
73
|
+
data.map(function (d) {
|
|
74
|
+
var _d$analysis;
|
|
75
|
+
if (d.key === group.key) {
|
|
76
|
+
d.analysis.push(analysis);
|
|
77
|
+
}
|
|
78
|
+
if ((_d$analysis = d.analysis) !== null && _d$analysis !== void 0 && _d$analysis.length) {
|
|
79
|
+
_loop(d.analysis);
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
_loop(this.analysis);
|
|
84
|
+
} else {
|
|
85
|
+
this.analysis.push(analysis);
|
|
86
|
+
}
|
|
87
|
+
this.onChange();
|
|
88
|
+
this.emit('add', analysis);
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
// 移除分析
|
|
93
|
+
}, {
|
|
94
|
+
key: "removeAnalysis",
|
|
95
|
+
value: function removeAnalysis(analysis, group) {
|
|
96
|
+
if (analysis.name) {
|
|
97
|
+
this.analysis = this.analysis.filter(function (v) {
|
|
98
|
+
return v.key !== analysis.key;
|
|
99
|
+
});
|
|
100
|
+
if (group) {
|
|
101
|
+
var _loop2 = function loop(data) {
|
|
102
|
+
data.map(function (d) {
|
|
103
|
+
var _d$analysis2;
|
|
104
|
+
if (d.key === group.key) {
|
|
105
|
+
d.analysis = d.analysis.filter(function (v) {
|
|
106
|
+
return v.key !== analysis.key;
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
if ((_d$analysis2 = d.analysis) !== null && _d$analysis2 !== void 0 && _d$analysis2.length) {
|
|
110
|
+
_loop2(d.analysis);
|
|
111
|
+
}
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
_loop2(this.analysis);
|
|
115
|
+
}
|
|
116
|
+
this.emit('remove', analysis);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
// 获取分析
|
|
121
|
+
}, {
|
|
122
|
+
key: "getAnalysis",
|
|
123
|
+
value: function getAnalysis() {
|
|
124
|
+
return this.analysis;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// 清空分析
|
|
128
|
+
}, {
|
|
129
|
+
key: "clearAnalysis",
|
|
130
|
+
value: function clearAnalysis() {
|
|
131
|
+
this.analysis = [];
|
|
132
|
+
this.emit('clear');
|
|
133
|
+
this.onChange();
|
|
134
|
+
}
|
|
135
|
+
}, {
|
|
136
|
+
key: "setActiveKey",
|
|
137
|
+
value: function setActiveKey(key) {
|
|
138
|
+
this.activeKey = key;
|
|
139
|
+
this.onActiveChange();
|
|
140
|
+
}
|
|
141
|
+
}, {
|
|
142
|
+
key: "getActiveKey",
|
|
143
|
+
value: function getActiveKey() {
|
|
144
|
+
return this.activeKey;
|
|
145
|
+
}
|
|
146
|
+
}]);
|
|
147
|
+
}(_EventEmitter2["default"]);
|
|
148
|
+
//# sourceMappingURL=Analysis.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Analysis.js","names":["_EventEmitter2","_interopRequireDefault","require","e","__esModule","_classCallCheck","a","n","TypeError","_defineProperties","r","t","length","o","enumerable","configurable","writable","Object","defineProperty","_toPropertyKey","key","_createClass","prototype","i","_toPrimitive","_typeof","Symbol","toPrimitive","call","String","Number","_callSuper","_getPrototypeOf","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","constructor","apply","_assertThisInitialized","ReferenceError","Boolean","valueOf","setPrototypeOf","getPrototypeOf","bind","__proto__","_inherits","create","value","_setPrototypeOf","Analysis","exports","_EventEmitter","options","_this","map","analysis","activeKey","addAnalysis","group","removeAnalysis","clearAnalysis","getAnalysis","setAnalysisActiveKey","setActiveKey","getAnalysisActiveKey","getActiveKey","onChange","emit","onActiveChange","name","loop","data","d","_d$analysis","push","filter","v","_d$analysis2","EventEmitter"],"sources":["map/Analysis.js"],"sourcesContent":["import EventEmitter from '../_util/EventEmitter';\n\nexport default class Analysis extends EventEmitter {\n constructor(options) {\n super();\n\n this.map = options.map;\n\n this.analysis = [];\n\n this.activeKey = null;\n\n this.map.addAnalysis = (analysis, group) => {\n this.addAnalysis(analysis, group);\n };\n\n this.map.removeAnalysis = (analysis, group) => {\n this.removeAnalysis(analysis, group);\n };\n\n this.map.clearAnalysis = () => {\n this.clearAnalysis();\n };\n\n this.map.getAnalysis = () => {\n return this.getAnalysis();\n };\n\n this.map.setAnalysisActiveKey = key => {\n this.setActiveKey(key);\n };\n\n this.map.getAnalysisActiveKey = () => {\n return this.getActiveKey();\n };\n }\n\n // 图层改变的时候\n onChange() {\n this.emit('change', this.analysis);\n }\n\n // 图层改变的时候\n onActiveChange() {\n this.emit('activeChange', this.activeKey);\n }\n\n // 添加分析\n addAnalysis(analysis, group) {\n if (analysis.name) {\n if (group) {\n const loop = (data) => {\n data.map(d => {\n if (d.key === group.key) {\n d.analysis.push(analysis);\n }\n\n if (d.analysis?.length) {\n loop(d.analysis)\n }\n })\n }\n\n loop(this.analysis);\n } else {\n this.analysis.push(analysis);\n }\n\n this.onChange();\n this.emit('add', analysis);\n }\n }\n\n // 移除分析\n removeAnalysis(analysis, group) {\n if (analysis.name) {\n this.analysis = this.analysis.filter(v => v.key !== analysis.key);\n if (group) {\n const loop = (data) => {\n data.map(d => {\n if (d.key === group.key) {\n d.analysis = d.analysis.filter(v => v.key !== analysis.key);\n }\n\n if (d.analysis?.length) {\n loop(d.analysis)\n }\n })\n }\n\n loop(this.analysis);\n }\n\n this.emit('remove', analysis);\n }\n }\n\n // 获取分析\n getAnalysis() {\n return this.analysis;\n }\n\n // 清空分析\n clearAnalysis() {\n this.analysis = [];\n this.emit('clear');\n this.onChange();\n }\n\n setActiveKey(key) {\n this.activeKey = key;\n this.onActiveChange();\n }\n\n getActiveKey() {\n return this.activeKey;\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,cAAA,GAAAC,sBAAA,CAAAC,OAAA;AAAiD,SAAAD,uBAAAE,CAAA,WAAAA,C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;IAEA;EAAA;IAAArC,GAAA;IAAA6B,KAAA,EACA,SAAAa,aAAaA,CAAA,EAAG;MACZ,IAAI,CAACL,QAAQ,GAAG,EAAE;MAClB,IAAI,CAACY,IAAI,CAAC,OAAO,CAAC;MAClB,IAAI,CAACD,QAAQ,CAAC,CAAC;IACnB;EAAC;IAAAhD,GAAA;IAAA6B,KAAA,EAED,SAAAgB,YAAYA,CAAC7C,GAAG,EAAE;MACd,IAAI,CAACsC,SAAS,GAAGtC,GAAG;MACpB,IAAI,CAACkD,cAAc,CAAC,CAAC;IACzB;EAAC;IAAAlD,GAAA;IAAA6B,KAAA,EAED,SAAAkB,YAAYA,CAAA,EAAG;MACX,OAAO,IAAI,CAACT,SAAS;IACzB;EAAC;AAAA,EAlHiCsB,yBAAY","ignoreList":[]}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = void 0;
|
|
8
|
+
var _EventEmitter2 = _interopRequireDefault(require("../_util/EventEmitter"));
|
|
9
|
+
var _GroupLayer = _interopRequireDefault(require("../group-layer/GroupLayer"));
|
|
10
|
+
var _ImageLayer = _interopRequireDefault(require("../image-layer/ImageLayer"));
|
|
11
|
+
var _ImageTileLayer = _interopRequireDefault(require("../image-layer/ImageTileLayer"));
|
|
12
|
+
var _FeatureLayer = _interopRequireDefault(require("../feature-layer/FeatureLayer"));
|
|
13
|
+
var _WmsLayer = _interopRequireDefault(require("../wms-layer/WmsLayer"));
|
|
14
|
+
var _lodashEs = require("lodash-es");
|
|
15
|
+
var _FlowLineLayer = _interopRequireDefault(require("../flow-line-layer/FlowLineLayer"));
|
|
16
|
+
var _ArrowFlowLayer = _interopRequireDefault(require("../arrow-flow-layer/ArrowFlowLayer"));
|
|
17
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
18
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
19
|
+
function _defineProperties(e, r) { for (var t = 0; t < r.length; t++) { var o = r[t]; o.enumerable = o.enumerable || !1, o.configurable = !0, "value" in o && (o.writable = !0), Object.defineProperty(e, _toPropertyKey(o.key), o); } }
|
|
20
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
21
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
22
|
+
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); }
|
|
23
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
24
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
25
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
26
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
27
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
28
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
29
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
30
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
31
|
+
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."); }
|
|
32
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
33
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
34
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
35
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
36
|
+
// 获取显示或隐藏的keys
|
|
37
|
+
var getLayersVisibleKeys = function getLayersVisibleKeys(data, map) {
|
|
38
|
+
var visible = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
39
|
+
var keys = [];
|
|
40
|
+
function loop(data, map, visible) {
|
|
41
|
+
data.map(function (v) {
|
|
42
|
+
var _v$layers;
|
|
43
|
+
if (v.key) {
|
|
44
|
+
var layer = map.layers.getLayerByKey(v.key);
|
|
45
|
+
if (layer && !(layer instanceof _GroupLayer["default"])) {
|
|
46
|
+
var _layer$group;
|
|
47
|
+
if ((_layer$group = layer.group) !== null && _layer$group !== void 0 && _layer$group.length) {
|
|
48
|
+
if (visible) {
|
|
49
|
+
layer.group.map(function (f) {
|
|
50
|
+
if (!f.hasOwnProperty('show') || f.show) {
|
|
51
|
+
keys.push(f.key);
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
} else {
|
|
55
|
+
layer.group.map(function (f) {
|
|
56
|
+
if (!f.show) {
|
|
57
|
+
keys.push(f.key);
|
|
58
|
+
}
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
} else if (layer.show === visible) {
|
|
62
|
+
keys.push(v.key);
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
// 如果group的显示的长度和layer的不一致 则不显示
|
|
66
|
+
// if (
|
|
67
|
+
// layer.show === visible &&
|
|
68
|
+
// layer.group?.filter(v => v.show)?.length == layer.group?.length
|
|
69
|
+
// ) {
|
|
70
|
+
// keys.push(v.key);
|
|
71
|
+
// }
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if ((_v$layers = v.layers) !== null && _v$layers !== void 0 && _v$layers.length) {
|
|
75
|
+
loop(v.layers, map, visible);
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
loop(data, map, visible);
|
|
80
|
+
return keys;
|
|
81
|
+
};
|
|
82
|
+
// 获取所有keys
|
|
83
|
+
var _getAllKeys = function getAllKeys(data) {
|
|
84
|
+
var keys = [];
|
|
85
|
+
data.map(function (v) {
|
|
86
|
+
var _v$layers2;
|
|
87
|
+
if ((_v$layers2 = v.layers) !== null && _v$layers2 !== void 0 && _v$layers2.length) {
|
|
88
|
+
keys.push.apply(keys, _toConsumableArray(_getAllKeys(v.layers)));
|
|
89
|
+
}
|
|
90
|
+
keys.push(v.key);
|
|
91
|
+
});
|
|
92
|
+
return keys;
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
// 获取所有keys(包含group)
|
|
96
|
+
var _getAllLayersKeys = function getAllLayersKeys(data) {
|
|
97
|
+
var keys = [];
|
|
98
|
+
data.map(function (v) {
|
|
99
|
+
var _v$layers3, _v$group;
|
|
100
|
+
if ((_v$layers3 = v.layers) !== null && _v$layers3 !== void 0 && _v$layers3.length) {
|
|
101
|
+
keys.push.apply(keys, _toConsumableArray(_getAllLayersKeys(v.layers)));
|
|
102
|
+
}
|
|
103
|
+
keys.push(v.key);
|
|
104
|
+
if (v !== null && v !== void 0 && (_v$group = v.group) !== null && _v$group !== void 0 && _v$group.length) {
|
|
105
|
+
v.group.map(function (f) {
|
|
106
|
+
if (f.key) {
|
|
107
|
+
keys.push(f.key);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
});
|
|
112
|
+
return keys;
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
// 获取图层
|
|
116
|
+
var getLayers = function getLayers(data, layer, _keys, visible) {
|
|
117
|
+
var layers = [];
|
|
118
|
+
// 判断查询 全部的 or 隐藏的 or 显示的
|
|
119
|
+
function loop(data, layer, _keys, visible) {
|
|
120
|
+
data.map(function (v) {
|
|
121
|
+
var _v$layers4;
|
|
122
|
+
var isVisible = typeof visible !== 'boolean' ? true : v.displayName !== 'GroupLayer' ? (v === null || v === void 0 ? void 0 : v.getVisible()) === visible : false;
|
|
123
|
+
if (v.key && v instanceof layer && isVisible) {
|
|
124
|
+
if (_keys) {
|
|
125
|
+
var keys = Array.isArray(_keys) ? _keys : [_keys];
|
|
126
|
+
if (keys.includes(v.key)) {
|
|
127
|
+
layers.push(v);
|
|
128
|
+
}
|
|
129
|
+
} else {
|
|
130
|
+
layers.push(v);
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if ((_v$layers4 = v.layers) !== null && _v$layers4 !== void 0 && _v$layers4.length) {
|
|
134
|
+
var newLayer = loop(v.layers, layer, _keys, visible);
|
|
135
|
+
if (newLayer !== null && newLayer !== void 0 && newLayer.length) {
|
|
136
|
+
layers.push(newLayer);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
loop(data, layer, _keys, visible);
|
|
142
|
+
return layers;
|
|
143
|
+
};
|
|
144
|
+
var Layers = exports["default"] = /*#__PURE__*/function (_EventEmitter) {
|
|
145
|
+
function Layers(options) {
|
|
146
|
+
var _this;
|
|
147
|
+
_classCallCheck(this, Layers);
|
|
148
|
+
_this = _callSuper(this, Layers);
|
|
149
|
+
_this.map = options.map;
|
|
150
|
+
_this.layers = [];
|
|
151
|
+
return _this;
|
|
152
|
+
}
|
|
153
|
+
// 图层改变的时候
|
|
154
|
+
_inherits(Layers, _EventEmitter);
|
|
155
|
+
return _createClass(Layers, [{
|
|
156
|
+
key: "onChange",
|
|
157
|
+
value: function onChange() {
|
|
158
|
+
this.emit('change', this.layers);
|
|
159
|
+
}
|
|
160
|
+
}, {
|
|
161
|
+
key: "addLayer",
|
|
162
|
+
value: function addLayer(layer) {
|
|
163
|
+
var map = this.map;
|
|
164
|
+
if (layer instanceof _FeatureLayer["default"] || layer instanceof _ImageTileLayer["default"] || layer instanceof _ImageLayer["default"] || layer instanceof _FlowLineLayer["default"] || layer instanceof _ArrowFlowLayer["default"]) {
|
|
165
|
+
map.addLayer(layer instanceof _ArrowFlowLayer["default"] ? layer.vectorLayer : layer);
|
|
166
|
+
}
|
|
167
|
+
if (layer.name && layer.layerControl) {
|
|
168
|
+
this.layers.push(layer);
|
|
169
|
+
this.emit('add', layer);
|
|
170
|
+
this.onChange();
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}, {
|
|
174
|
+
key: "removeLayer",
|
|
175
|
+
value: function removeLayer(layer) {
|
|
176
|
+
var map = this.map;
|
|
177
|
+
if (layer instanceof _FeatureLayer["default"] || layer instanceof _ImageTileLayer["default"] || layer instanceof _ImageLayer["default"] || layer instanceof _WmsLayer["default"] || layer instanceof _FlowLineLayer["default"] || layer instanceof _ArrowFlowLayer["default"]) {
|
|
178
|
+
map.removeLayer(layer instanceof _ArrowFlowLayer["default"] ? layer.vectorLayer : layer);
|
|
179
|
+
}
|
|
180
|
+
if (layer.name && layer.layerControl) {
|
|
181
|
+
this.layers = this.layers.filter(function (v) {
|
|
182
|
+
return v !== layer;
|
|
183
|
+
});
|
|
184
|
+
this.emit('remove', layer);
|
|
185
|
+
this.onChange();
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
// 图层清空
|
|
189
|
+
}, {
|
|
190
|
+
key: "clearLayers",
|
|
191
|
+
value: function clearLayers() {
|
|
192
|
+
var _this$layers;
|
|
193
|
+
var map = this.map;
|
|
194
|
+
(_this$layers = this.layers) === null || _this$layers === void 0 || _this$layers.map(function (layer) {
|
|
195
|
+
if (layer instanceof _FeatureLayer["default"] || layer instanceof _ImageTileLayer["default"] || layer instanceof _ImageLayer["default"] || layer instanceof _FlowLineLayer["default"] || layer instanceof _ArrowFlowLayer["default"] || layer instanceof _WmsLayer["default"]) {
|
|
196
|
+
map.removeLayer(layer instanceof _ArrowFlowLayer["default"] ? layer.vectorLayer : layer);
|
|
197
|
+
}
|
|
198
|
+
});
|
|
199
|
+
this.layers = [];
|
|
200
|
+
this.emit('clear');
|
|
201
|
+
this.onChange();
|
|
202
|
+
}
|
|
203
|
+
}, {
|
|
204
|
+
key: "getLayerByKey",
|
|
205
|
+
value: function getLayerByKey(_keys) {
|
|
206
|
+
var _this$getAllLayers;
|
|
207
|
+
return (_this$getAllLayers = this.getAllLayers()) === null || _this$getAllLayers === void 0 ? void 0 : _this$getAllLayers.find(function (layer) {
|
|
208
|
+
return _keys && layer.key && layer.key === _keys;
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}, {
|
|
212
|
+
key: "getAllLayers",
|
|
213
|
+
value: function getAllLayers() {
|
|
214
|
+
var layers = [];
|
|
215
|
+
function loop(data) {
|
|
216
|
+
data.map(function (item) {
|
|
217
|
+
var _item$layers;
|
|
218
|
+
layers.push(item);
|
|
219
|
+
if (item !== null && item !== void 0 && (_item$layers = item.layers) !== null && _item$layers !== void 0 && _item$layers.length) {
|
|
220
|
+
loop(item.layers);
|
|
221
|
+
}
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
loop(this.layers);
|
|
225
|
+
return layers;
|
|
226
|
+
}
|
|
227
|
+
// 获取 layers 里面的 key 集合
|
|
228
|
+
}, {
|
|
229
|
+
key: "getAllKeys",
|
|
230
|
+
value: function getAllKeys() {
|
|
231
|
+
return _getAllKeys(this.layers);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
// 获取 layers 里面的 key 集合
|
|
235
|
+
}, {
|
|
236
|
+
key: "getAllLayersKeys",
|
|
237
|
+
value: function getAllLayersKeys() {
|
|
238
|
+
return _getAllLayersKeys(this.layers);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// 获取当前展示的 keys
|
|
242
|
+
}, {
|
|
243
|
+
key: "getShowKeys",
|
|
244
|
+
value: function getShowKeys() {
|
|
245
|
+
return getLayersVisibleKeys(this.layers, this.map, true);
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
// 获取当前隐藏的 keys
|
|
249
|
+
}, {
|
|
250
|
+
key: "getHiddenKeys",
|
|
251
|
+
value: function getHiddenKeys() {
|
|
252
|
+
return getLayersVisibleKeys(this.layers, this.map, false);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
// 获取 ImageLayer 图层
|
|
256
|
+
}, {
|
|
257
|
+
key: "getImageLayers",
|
|
258
|
+
value: function getImageLayers(_keys, visible) {
|
|
259
|
+
var imageLayer = getLayers(this.layers, _ImageLayer["default"], _keys, visible);
|
|
260
|
+
var imageTileLayer = getLayers(this.layers, _ImageTileLayer["default"], _keys, visible);
|
|
261
|
+
return [].concat(_toConsumableArray(imageLayer), _toConsumableArray(imageTileLayer));
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
// 获取 FeatureLayer 图层
|
|
265
|
+
}, {
|
|
266
|
+
key: "getFeatureLayers",
|
|
267
|
+
value: function getFeatureLayers(_keys, visible) {
|
|
268
|
+
return getLayers(this.layers, _FeatureLayer["default"], _keys, visible);
|
|
269
|
+
}
|
|
270
|
+
|
|
271
|
+
// 根据 keys 设置图层的显示,其他的隐藏
|
|
272
|
+
}, {
|
|
273
|
+
key: "setShowByKeys",
|
|
274
|
+
value: function setShowByKeys(_keys) {
|
|
275
|
+
var map = this.map;
|
|
276
|
+
var keys = Array.isArray(_keys) ? _keys : [_keys];
|
|
277
|
+
this.getAllKeys().map(function (a) {
|
|
278
|
+
var layer = map.layers.getLayerByKey(a);
|
|
279
|
+
if (layer && !(layer instanceof _GroupLayer["default"])) {
|
|
280
|
+
var _layer$group2;
|
|
281
|
+
if ((_layer$group2 = layer.group) !== null && _layer$group2 !== void 0 && _layer$group2.length) {
|
|
282
|
+
var group = (0, _lodashEs.cloneDeep)(layer.group);
|
|
283
|
+
var show = false;
|
|
284
|
+
group.forEach(function (v) {
|
|
285
|
+
v.show = _keys.includes(v.key);
|
|
286
|
+
if (_keys.includes(v.key)) {
|
|
287
|
+
show = true;
|
|
288
|
+
}
|
|
289
|
+
});
|
|
290
|
+
if (JSON.stringify(group) !== JSON.stringify(layer.group)) {
|
|
291
|
+
layer.setGroup(group);
|
|
292
|
+
}
|
|
293
|
+
layer.show = show;
|
|
294
|
+
layer.setVisible(show);
|
|
295
|
+
} else {
|
|
296
|
+
var _show = keys.includes(a);
|
|
297
|
+
if (_show !== layer.show) {
|
|
298
|
+
layer.show = _show;
|
|
299
|
+
layer.setVisible(_show);
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
});
|
|
304
|
+
map.layers.onChange();
|
|
305
|
+
}
|
|
306
|
+
|
|
307
|
+
// 根据 keys 设置图层的隐藏,其他的显示
|
|
308
|
+
}, {
|
|
309
|
+
key: "setHideByKeys",
|
|
310
|
+
value: function setHideByKeys(_keys) {
|
|
311
|
+
var map = this.map;
|
|
312
|
+
var keys = Array.isArray(_keys) ? _keys : [_keys];
|
|
313
|
+
this.getAllKeys().map(function (a) {
|
|
314
|
+
var layer = map.layers.getLayerByKey(a);
|
|
315
|
+
if (layer) {
|
|
316
|
+
var _layer$group3;
|
|
317
|
+
if ((_layer$group3 = layer.group) !== null && _layer$group3 !== void 0 && _layer$group3.length) {
|
|
318
|
+
var group = (0, _lodashEs.cloneDeep)(layer.group);
|
|
319
|
+
group.forEach(function (v) {
|
|
320
|
+
v.show = !_keys.includes(v.key);
|
|
321
|
+
});
|
|
322
|
+
if (!(0, _lodashEs.isEqual)(group, layer.group)) {
|
|
323
|
+
layer.setGroup(group);
|
|
324
|
+
}
|
|
325
|
+
} else {
|
|
326
|
+
var show = !keys.includes(a);
|
|
327
|
+
if (show !== layer.show) {
|
|
328
|
+
layer.show = show;
|
|
329
|
+
layer.setVisible(show);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
});
|
|
334
|
+
map.layers.onChange();
|
|
335
|
+
}
|
|
336
|
+
}]);
|
|
337
|
+
}(_EventEmitter2["default"]);
|
|
338
|
+
//# sourceMappingURL=Layers.js.map
|