@vtx/ol-map 1.0.144 → 1.0.146
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/README.md +205 -205
- package/lib/_util/EventEmitter.js +80 -0
- package/lib/_util/EventEmitter.js.map +1 -0
- package/lib/_util/StyleCache.js +48 -0
- package/lib/_util/StyleCache.js.map +1 -0
- package/lib/_util/encryptParams.js +65 -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 +25 -0
- package/lib/_util/getCookie.js.map +1 -0
- package/lib/_util/getDefaultMapInfo.js +51 -0
- package/lib/_util/getDefaultMapInfo.js.map +1 -0
- package/lib/_util/getSystemInfo.js +27 -0
- package/lib/_util/getSystemInfo.js.map +1 -0
- package/lib/_util/getToken.js +29 -0
- package/lib/_util/getToken.js.map +1 -0
- package/lib/_util/getUrlParam.js +16 -0
- package/lib/_util/getUrlParam.js.map +1 -0
- package/lib/_util/http.js +178 -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 +156 -0
- package/lib/_util/layer.js.map +1 -0
- package/lib/_util/mapTool.js +189 -0
- package/lib/_util/mapTool.js.map +1 -0
- package/lib/_util/projzh/datum/bd-09.js +45 -0
- package/lib/_util/projzh/datum/bd-09.js.map +1 -0
- package/lib/_util/projzh/datum/gcj-02.js +73 -0
- package/lib/_util/projzh/datum/gcj-02.js.map +1 -0
- package/lib/_util/projzh/datum/index.js +15 -0
- package/lib/_util/projzh/datum/index.js.map +1 -0
- package/lib/_util/projzh/index.js +41 -0
- package/lib/_util/projzh/index.js.map +1 -0
- package/lib/_util/projzh/projection/baidu-mercator.js +75 -0
- package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -0
- package/lib/_util/projzh/projection/index.js +15 -0
- package/lib/_util/projzh/projection/index.js.map +1 -0
- package/lib/_util/projzh/projection/spherical-mercator.js +26 -0
- package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -0
- package/lib/_util/projzh/util.js +28 -0
- package/lib/_util/projzh/util.js.map +1 -0
- package/lib/_util/search.js +133 -0
- package/lib/_util/search.js.map +1 -0
- package/lib/_util/setCookie.js +16 -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 +170 -0
- package/lib/_util/transform.js.map +1 -0
- package/lib/_util/useColSize.js +29 -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 +45 -0
- package/lib/_util/useSet.js.map +1 -0
- package/lib/analysis-layer/index.js +455 -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/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 +400 -0
- package/lib/buffer-draw/BufferDraw.js.map +1 -0
- package/lib/buffer-draw/index.js +57 -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 +53 -0
- package/lib/circle/Circle.js.map +1 -0
- package/lib/circle/index.js +65 -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 +13 -0
- package/lib/config.js.map +1 -0
- package/lib/convertCamelToCSS.js +24 -0
- package/lib/convertCamelToCSS.js.map +1 -0
- package/lib/dom/Dom.js +41 -0
- package/lib/dom/Dom.js.map +1 -0
- package/lib/dom/index.js +62 -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/events/index.js +27 -0
- package/lib/events/index.js.map +1 -0
- package/lib/feature-draw/FeatureDraw.js +236 -0
- package/lib/feature-draw/FeatureDraw.js.map +1 -0
- package/lib/feature-draw/index.js +73 -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 +1040 -0
- package/lib/feature-layer/FeatureLayer.js.map +1 -0
- package/lib/feature-layer/MyCluster.js +153 -0
- package/lib/feature-layer/MyCluster.js.map +1 -0
- package/lib/feature-layer/createFeatureCollection.js +175 -0
- package/lib/feature-layer/createFeatureCollection.js.map +1 -0
- package/lib/feature-layer/index.js +155 -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 +200 -0
- package/lib/flow-line-layer/FlowLineLayer.js.map +1 -0
- package/lib/flow-line-layer/index.js +127 -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 +220 -0
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -0
- package/lib/fly-line-layer/index.js +110 -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 +74 -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 +192 -0
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -0
- package/lib/heatmap-layer/index.js +94 -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 +332 -0
- package/lib/image-layer/ImageLayer.js.map +1 -0
- package/lib/image-layer/ImageTileLayer.js +334 -0
- package/lib/image-layer/ImageTileLayer.js.map +1 -0
- package/lib/image-layer/index.js +101 -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 +201 -0
- package/lib/index.js.map +1 -0
- package/lib/legend/index.js +255 -0
- package/lib/legend/index.js.map +1 -0
- package/lib/legend/style/css.js +8 -0
- package/lib/legend/style/css.js.map +1 -0
- package/lib/legend/style/index.css +109 -0
- package/lib/legend/style/index.js +8 -0
- package/lib/legend/style/index.js.map +1 -0
- package/lib/legend/style/index.less +100 -0
- package/lib/map/Analysis.js +151 -0
- package/lib/map/Analysis.js.map +1 -0
- package/lib/map/Layers.js +341 -0
- package/lib/map/Layers.js.map +1 -0
- package/lib/map/Popup.js +372 -0
- package/lib/map/Popup.js.map +1 -0
- package/lib/map/ScaleDenominator.js +70 -0
- package/lib/map/ScaleDenominator.js.map +1 -0
- package/lib/map/Test.js +146 -0
- package/lib/map/Test.js.map +1 -0
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +164 -0
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -0
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +85 -0
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -0
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js +67 -0
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +1 -0
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +86 -0
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -0
- package/lib/map/getBaseLayers/index.js +48 -0
- package/lib/map/getBaseLayers/index.js.map +1 -0
- package/lib/map/index.js +823 -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 +82 -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 +108 -0
- package/lib/marker/Marker.js.map +1 -0
- package/lib/marker/index.js +62 -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 +47 -0
- package/lib/path-line-layer/PathLineLayer.js.map +1 -0
- package/lib/path-line-layer/getPathLineStyles.js +72 -0
- package/lib/path-line-layer/getPathLineStyles.js.map +1 -0
- package/lib/path-line-layer/index.js +152 -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 +677 -0
- package/lib/path-play-back/PathPlayBack.js.map +1 -0
- package/lib/path-play-back/index.js +76 -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 +63 -0
- package/lib/poi-search/Location.js.map +1 -0
- package/lib/poi-search/PoiList.js +116 -0
- package/lib/poi-search/PoiList.js.map +1 -0
- package/lib/poi-search/Search.js +208 -0
- package/lib/poi-search/Search.js.map +1 -0
- package/lib/poi-search/index.js +174 -0
- package/lib/poi-search/index.js.map +1 -0
- package/lib/poi-search/style/css.js +8 -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 +8 -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 +59 -0
- package/lib/point/Point.js.map +1 -0
- package/lib/point/index.js +62 -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 +53 -0
- package/lib/polygon/Polygon.js.map +1 -0
- package/lib/polygon/index.js +62 -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 +53 -0
- package/lib/polyline/Polyline.js.map +1 -0
- package/lib/polyline/index.js +62 -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 +204 -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 +14 -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 +39 -0
- package/lib/renderer/Fill.js.map +1 -0
- package/lib/renderer/Stroke.js +41 -0
- package/lib/renderer/Stroke.js.map +1 -0
- package/lib/renderer/index.js +140 -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 +34 -0
- package/lib/renderer/transformRgb.js.map +1 -0
- package/lib/search-map/VtxModal.js +205 -0
- package/lib/search-map/VtxModal.js.map +1 -0
- package/lib/search-map/index.js +418 -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 +73 -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 +83 -0
- package/lib/search-map/style/modal.css +54 -0
- package/lib/search-map/style/modal.less +58 -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 +9 -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 +88 -0
- package/lib/tile-layer/TileLayer.js.map +1 -0
- package/lib/tile-layer/index.js +53 -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 +183 -0
- package/lib/tools/Layer/LayerService.js.map +1 -0
- package/lib/tools/Layer/LayersCheckService.js +195 -0
- package/lib/tools/Layer/LayersCheckService.js.map +1 -0
- package/lib/tools/Layer/index.css +50 -0
- package/lib/tools/Layer/index.js +226 -0
- package/lib/tools/Layer/index.js.map +1 -0
- package/lib/tools/Layer/index.less +43 -0
- package/lib/tools/Search/index.js +298 -0
- package/lib/tools/Search/index.js.map +1 -0
- package/lib/tools/Toolbox/BoxSelect/index.js +20 -0
- package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -0
- package/lib/tools/Toolbox/CircleSelect/index.js +20 -0
- package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -0
- package/lib/tools/Toolbox/EagleEye/index.js +57 -0
- package/lib/tools/Toolbox/EagleEye/index.js.map +1 -0
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +153 -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 +430 -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 +234 -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 +17 -0
- package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -0
- package/lib/tools/Toolbox/Measure/Distance/index.js +17 -0
- package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -0
- package/lib/tools/Toolbox/Measure/Measure.js +229 -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 +20 -0
- package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -0
- package/lib/tools/Toolbox/ScaleLine/index.js +59 -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 +779 -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 +593 -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/index.css +0 -0
- package/lib/tools/Toolbox/index.js +172 -0
- package/lib/tools/Toolbox/index.js.map +1 -0
- package/lib/tools/Toolbox/index.less +2 -0
- package/lib/tools/Utils/CreateOverlay.js +47 -0
- package/lib/tools/Utils/CreateOverlay.js.map +1 -0
- package/lib/tools/Utils/Draw.js +130 -0
- package/lib/tools/Utils/Draw.js.map +1 -0
- package/lib/tools/Utils/HighLayer.js +213 -0
- package/lib/tools/Utils/HighLayer.js.map +1 -0
- package/lib/tools/Utils/measure.js +247 -0
- package/lib/tools/Utils/measure.js.map +1 -0
- package/lib/tools/Utils/utils.js +272 -0
- package/lib/tools/Utils/utils.js.map +1 -0
- package/lib/tools/View/index.css +35 -0
- package/lib/tools/View/index.js +166 -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 +113 -0
- package/lib/tools/analysis-tool/index.js.map +1 -0
- package/lib/tools/base-map-switch/index.js +150 -0
- package/lib/tools/base-map-switch/index.js.map +1 -0
- package/lib/tools/components/Chart/index.js +828 -0
- package/lib/tools/components/Chart/index.js.map +1 -0
- package/lib/tools/components/Icon/index.js +32 -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 +35 -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 +48 -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 +46 -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 +33 -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 +91 -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 +29 -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 +45 -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 +47 -0
- package/lib/tools/full-screen/index.js.map +1 -0
- package/lib/tools/index.js +151 -0
- package/lib/tools/index.js.map +1 -0
- package/lib/tools/layer-control/index.js +173 -0
- package/lib/tools/layer-control/index.js.map +1 -0
- package/lib/tools/refresh/index.js +41 -0
- package/lib/tools/refresh/index.js.map +1 -0
- package/lib/tools/style/css.js +22 -0
- package/lib/tools/style/css.js.map +1 -0
- package/lib/tools/style/index.css +136 -0
- package/lib/tools/style/index.js +22 -0
- package/lib/tools/style/index.js.map +1 -0
- package/lib/tools/style/index.less +154 -0
- package/lib/tools-item/index.js +67 -0
- package/lib/tools-item/index.js.map +1 -0
- package/lib/use-props/index.js +15 -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 +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
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,400 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
7
|
+
var _style2 = require("ol/style");
|
|
8
|
+
var _interaction = require("ol/interaction");
|
|
9
|
+
var _geom = require("ol/geom");
|
|
10
|
+
var _source = require("ol/source");
|
|
11
|
+
var _layer = require("ol/layer");
|
|
12
|
+
var _format = require("ol/format");
|
|
13
|
+
var _ol = require("ol");
|
|
14
|
+
var _condition = require("ol/events/condition");
|
|
15
|
+
var _turf = require("@turf/turf");
|
|
16
|
+
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); }
|
|
17
|
+
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; }
|
|
18
|
+
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; }
|
|
19
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
20
|
+
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); } }
|
|
21
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
22
|
+
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; }
|
|
23
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
24
|
+
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); }
|
|
25
|
+
var createBox = _interaction.Draw.createBox;
|
|
26
|
+
var format = new _format.GeoJSON();
|
|
27
|
+
var getCoordinateAndType = function getCoordinateAndType(geometry) {
|
|
28
|
+
var coordinates, type;
|
|
29
|
+
if (geometry instanceof _geom.Point) {
|
|
30
|
+
coordinates = [geometry.getCoordinates()];
|
|
31
|
+
} else if (geometry instanceof _geom.Polygon) {
|
|
32
|
+
coordinates = geometry.getCoordinates()[0];
|
|
33
|
+
} else if (geometry instanceof _geom.LineString) {
|
|
34
|
+
coordinates = geometry.getCoordinates();
|
|
35
|
+
} else if (geometry instanceof _geom.Circle) {
|
|
36
|
+
coordinates = geometry.flatCoordinates;
|
|
37
|
+
type = 'circle';
|
|
38
|
+
}
|
|
39
|
+
return {
|
|
40
|
+
coordinates: coordinates,
|
|
41
|
+
type: type
|
|
42
|
+
};
|
|
43
|
+
};
|
|
44
|
+
var getTopRightCorner = function getTopRightCorner(coordinates, type) {
|
|
45
|
+
var topRightCorner = [0, 0];
|
|
46
|
+
if (type === 'circle') {
|
|
47
|
+
topRightCorner = [coordinates === null || coordinates === void 0 ? void 0 : coordinates[0], coordinates === null || coordinates === void 0 ? void 0 : coordinates[1]];
|
|
48
|
+
} else {
|
|
49
|
+
for (var i = 0; i < coordinates.length; i++) {
|
|
50
|
+
var coordinate = coordinates[i];
|
|
51
|
+
if (coordinate[0] > topRightCorner[0] || coordinate[0] === topRightCorner[0] && coordinate[1] < topRightCorner[1]) {
|
|
52
|
+
topRightCorner = coordinate;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
return topRightCorner;
|
|
57
|
+
};
|
|
58
|
+
var CANCEL_TEXT_FEATURE_ID = 'cancelTextFeatureKey';
|
|
59
|
+
var _default = /*#__PURE__*/function () {
|
|
60
|
+
function _default(options, callback) {
|
|
61
|
+
var _this = this;
|
|
62
|
+
_classCallCheck(this, _default);
|
|
63
|
+
_defineProperty(this, "drawInit", function () {
|
|
64
|
+
_this.map.removeInteraction(_this.drawTool);
|
|
65
|
+
_this.addInteractions();
|
|
66
|
+
});
|
|
67
|
+
_defineProperty(this, "modifyInit", function () {
|
|
68
|
+
var t = _this;
|
|
69
|
+
var source = new _source.Vector();
|
|
70
|
+
_this.modifySource = source;
|
|
71
|
+
|
|
72
|
+
// 绘制完成的样式
|
|
73
|
+
var _style = new _style2.Style({
|
|
74
|
+
geometry: function geometry(feature) {
|
|
75
|
+
var modifyGeometry = feature.get('modifyGeometry');
|
|
76
|
+
return modifyGeometry ? modifyGeometry.geometry : feature.getGeometry();
|
|
77
|
+
},
|
|
78
|
+
fill: new _style2.Fill({
|
|
79
|
+
color: 'rgba(0,128,255, 0.3)'
|
|
80
|
+
}),
|
|
81
|
+
stroke: new _style2.Stroke({
|
|
82
|
+
color: 'rgba(0,128,255, 0.3)',
|
|
83
|
+
width: 2
|
|
84
|
+
})
|
|
85
|
+
});
|
|
86
|
+
var vector = new _layer.Vector({
|
|
87
|
+
source: _this.modifySource,
|
|
88
|
+
zIndex: 3,
|
|
89
|
+
style: function style(feature) {
|
|
90
|
+
var styles = [_style];
|
|
91
|
+
var modifyGeometry = feature.get('modifyGeometry');
|
|
92
|
+
var geometry = modifyGeometry ? modifyGeometry.geometry : feature.getGeometry();
|
|
93
|
+
var topRightCorner = getTopRightCorner(geometry.getCoordinates()[0]);
|
|
94
|
+
if (topRightCorner) {
|
|
95
|
+
t.addCancelTextLayer(topRightCorner);
|
|
96
|
+
var distance = feature.get('distance');
|
|
97
|
+
t.distance = distance;
|
|
98
|
+
var text = Number(distance) < 1 ? Number(distance * 1000).toFixed(0) + '米' : Number(distance).toFixed(2) + '公里';
|
|
99
|
+
var drawFeature = t.source.getFeatures()[0].getGeometry();
|
|
100
|
+
var _getCoordinateAndType = getCoordinateAndType(drawFeature),
|
|
101
|
+
coordinates = _getCoordinateAndType.coordinates,
|
|
102
|
+
type = _getCoordinateAndType.type;
|
|
103
|
+
var topRightCorner_modify = getTopRightCorner(coordinates, type);
|
|
104
|
+
// 待带修改的样式
|
|
105
|
+
styles.push(new _style2.Style({
|
|
106
|
+
geometry: new _geom.LineString([topRightCorner, topRightCorner_modify]),
|
|
107
|
+
stroke: new _style2.Stroke({
|
|
108
|
+
color: '#0084FF',
|
|
109
|
+
width: 2
|
|
110
|
+
})
|
|
111
|
+
}));
|
|
112
|
+
styles.push(new _style2.Style({
|
|
113
|
+
geometry: new _geom.Point(topRightCorner),
|
|
114
|
+
// 修改了点位的样式
|
|
115
|
+
image: new _style2.Icon({
|
|
116
|
+
src: require('../assets/kz.png')
|
|
117
|
+
}),
|
|
118
|
+
// image: new CircleStyle({
|
|
119
|
+
// radius: 6,
|
|
120
|
+
// fill: new Fill({
|
|
121
|
+
// color: '#0080FF',
|
|
122
|
+
// }),
|
|
123
|
+
// stroke: new Stroke({
|
|
124
|
+
// color: '#FFF',
|
|
125
|
+
// width: 2,
|
|
126
|
+
// }),
|
|
127
|
+
// }),
|
|
128
|
+
text: new _style2.Text({
|
|
129
|
+
text: text,
|
|
130
|
+
font: '12px Calibri,sans-serif',
|
|
131
|
+
fill: new _style2.Fill({
|
|
132
|
+
color: '#FFF'
|
|
133
|
+
}),
|
|
134
|
+
backgroundFill: new _style2.Fill({
|
|
135
|
+
color: '#0080FF'
|
|
136
|
+
}),
|
|
137
|
+
backgroundStroke: new _style2.Stroke({
|
|
138
|
+
color: '#0080FF',
|
|
139
|
+
width: 1
|
|
140
|
+
}),
|
|
141
|
+
padding: [3, 2, 2, 4],
|
|
142
|
+
justify: 'right',
|
|
143
|
+
textBaseline: 'middle',
|
|
144
|
+
offsetX: 40
|
|
145
|
+
})
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
return styles;
|
|
149
|
+
}
|
|
150
|
+
});
|
|
151
|
+
_this.modifyLayer = vector;
|
|
152
|
+
_this.map.addLayer(vector);
|
|
153
|
+
var defaultStyle = new _interaction.Modify({
|
|
154
|
+
source: _this.modifySource
|
|
155
|
+
}).getOverlay().getStyleFunction();
|
|
156
|
+
var modify = new _interaction.Modify({
|
|
157
|
+
source: _this.modifySource,
|
|
158
|
+
maxDistance: _this.maxDistance,
|
|
159
|
+
condition: function condition(event) {
|
|
160
|
+
return (0, _condition.primaryAction)(event) && !(0, _condition.platformModifierKeyOnly)(event);
|
|
161
|
+
},
|
|
162
|
+
deleteCondition: _condition.never,
|
|
163
|
+
insertVertexCondition: _condition.never,
|
|
164
|
+
style: function style(feature) {
|
|
165
|
+
feature.get('features').forEach(function (modifyFeature) {
|
|
166
|
+
var modifyGeometry = modifyFeature.get('modifyGeometry');
|
|
167
|
+
if (modifyGeometry) {
|
|
168
|
+
var point = feature.getGeometry().getCoordinates();
|
|
169
|
+
var geometry = t.source.getFeatures()[0].getGeometry();
|
|
170
|
+
var _getCoordinateAndType2 = getCoordinateAndType(geometry),
|
|
171
|
+
coordinates = _getCoordinateAndType2.coordinates,
|
|
172
|
+
type = _getCoordinateAndType2.type;
|
|
173
|
+
var topRightCorner = getTopRightCorner(coordinates, type);
|
|
174
|
+
var from = (0, _turf.point)(point);
|
|
175
|
+
var to = (0, _turf.point)(topRightCorner);
|
|
176
|
+
var distance = (0, _turf.distance)(from, to, {
|
|
177
|
+
units: 'kilometers'
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// 限制拖动长度
|
|
181
|
+
if (t.maxDistance && distance && distance * 1000 > t.maxDistance) {
|
|
182
|
+
modifyFeature.setProperties({
|
|
183
|
+
distance: t.maxDistance / 1000
|
|
184
|
+
});
|
|
185
|
+
return defaultStyle(feature);
|
|
186
|
+
}
|
|
187
|
+
modifyFeature.setProperties({
|
|
188
|
+
distance: distance
|
|
189
|
+
});
|
|
190
|
+
var bufferFeature = t.getBufferFeature(t.source.getFeatures()[0], distance);
|
|
191
|
+
modifyGeometry.geometry = bufferFeature.getGeometry();
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
return defaultStyle(feature);
|
|
195
|
+
}
|
|
196
|
+
});
|
|
197
|
+
modify.on('modifystart', function (event) {
|
|
198
|
+
event.features.forEach(function (feature) {
|
|
199
|
+
feature.set('modifyGeometry', {
|
|
200
|
+
geometry: feature.getGeometry().clone()
|
|
201
|
+
}, true);
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
modify.on('modifyend', function (event) {
|
|
205
|
+
event.features.forEach(function (feature) {
|
|
206
|
+
var modifyGeometry = feature.get('modifyGeometry');
|
|
207
|
+
if (modifyGeometry) {
|
|
208
|
+
feature.setGeometry(modifyGeometry.geometry);
|
|
209
|
+
feature.unset('modifyGeometry', true);
|
|
210
|
+
t.drawFeature = feature;
|
|
211
|
+
var _feature = feature === null || feature === void 0 ? void 0 : feature.clone();
|
|
212
|
+
t.callback(_feature, t.distance * 1000);
|
|
213
|
+
}
|
|
214
|
+
t.isFit && t.fitView(feature);
|
|
215
|
+
});
|
|
216
|
+
});
|
|
217
|
+
_this.map.addInteraction(modify);
|
|
218
|
+
_this.modifyTool = modify;
|
|
219
|
+
});
|
|
220
|
+
_defineProperty(this, "addInteractions", function () {
|
|
221
|
+
var t = _this;
|
|
222
|
+
var draw = new _interaction.Draw(_objectSpread({
|
|
223
|
+
source: _this.source,
|
|
224
|
+
type: _this.drawType
|
|
225
|
+
}, _this.drawType === 'DragBox' ? {
|
|
226
|
+
type: 'Circle',
|
|
227
|
+
// 用于在绘制过程中创建或修改几何对象。这个函数允许开发者自定义绘制逻辑,以满足特定的需求。如果未提供此函数,则使用默认的几何创建逻辑
|
|
228
|
+
geometryFunction: createBox()
|
|
229
|
+
} : {}));
|
|
230
|
+
draw.on('drawstart', function () {
|
|
231
|
+
t.onClear();
|
|
232
|
+
});
|
|
233
|
+
draw.on('drawend', function (event) {
|
|
234
|
+
var distance = 500 / 1000;
|
|
235
|
+
var feature = t.getBufferFeature(event.feature, distance);
|
|
236
|
+
feature.setProperties({
|
|
237
|
+
distance: distance
|
|
238
|
+
});
|
|
239
|
+
t.modifySource.addFeature(feature);
|
|
240
|
+
t.drawFeature = feature;
|
|
241
|
+
var _feature = feature === null || feature === void 0 ? void 0 : feature.clone();
|
|
242
|
+
t.callback(_feature, distance * 1000);
|
|
243
|
+
t.isFit && t.fitView(feature);
|
|
244
|
+
});
|
|
245
|
+
_this.map.addInteraction(draw);
|
|
246
|
+
_this.drawTool = draw;
|
|
247
|
+
});
|
|
248
|
+
_defineProperty(this, "getBufferFeature", function (feature, distance) {
|
|
249
|
+
var coordinates = feature.getGeometry().getCoordinates();
|
|
250
|
+
var g = feature.getGeometry();
|
|
251
|
+
var geometry;
|
|
252
|
+
if (g instanceof _geom.Point) {
|
|
253
|
+
geometry = (0, _turf.point)(coordinates);
|
|
254
|
+
} else if (g instanceof _geom.Polygon) {
|
|
255
|
+
geometry = (0, _turf.polygon)(coordinates);
|
|
256
|
+
} else if (g instanceof _geom.LineString) {
|
|
257
|
+
geometry = (0, _turf.lineString)(coordinates);
|
|
258
|
+
} else if (g instanceof _geom.Circle) {
|
|
259
|
+
var center = g === null || g === void 0 ? void 0 : g.getCenter();
|
|
260
|
+
var radius = g === null || g === void 0 ? void 0 : g.getRadius();
|
|
261
|
+
_this.distance = radius;
|
|
262
|
+
geometry = (0, _turf.circle)(center, radius);
|
|
263
|
+
}
|
|
264
|
+
var buffered = (0, _turf.buffer)(geometry, distance, {
|
|
265
|
+
units: 'kilometers'
|
|
266
|
+
});
|
|
267
|
+
return format.readFeature(buffered);
|
|
268
|
+
});
|
|
269
|
+
_defineProperty(this, "fitView", function (feature) {
|
|
270
|
+
_this.map.getView().fit(feature.getGeometry().getExtent(), {
|
|
271
|
+
padding: [100, 400, 100, 400],
|
|
272
|
+
maxZoom: 18,
|
|
273
|
+
duration: 500
|
|
274
|
+
});
|
|
275
|
+
});
|
|
276
|
+
_defineProperty(this, "onClear", function () {
|
|
277
|
+
_this.source.clear();
|
|
278
|
+
_this.modifySource.clear();
|
|
279
|
+
});
|
|
280
|
+
var _options$isFit = options.isFit,
|
|
281
|
+
isFit = _options$isFit === void 0 ? true : _options$isFit;
|
|
282
|
+
this.map = options.map;
|
|
283
|
+
this.cancelTextLayer = null;
|
|
284
|
+
this.drawTool = null;
|
|
285
|
+
this.modifyTool = null;
|
|
286
|
+
this.drawFeature = null;
|
|
287
|
+
this.distance = 500;
|
|
288
|
+
this.showCancel = options.showCancel;
|
|
289
|
+
this.maxDistance = options.maxDistance;
|
|
290
|
+
this.drawType = options.drawType;
|
|
291
|
+
this.callback = callback;
|
|
292
|
+
this.isFit = isFit;
|
|
293
|
+
this.source = new _source.Vector();
|
|
294
|
+
this.layer = new _layer.Vector({
|
|
295
|
+
source: this.source,
|
|
296
|
+
zIndex: 4,
|
|
297
|
+
style: new _style2.Style({
|
|
298
|
+
fill: new _style2.Fill({
|
|
299
|
+
color: 'rgba(0,128,255, 0.7)'
|
|
300
|
+
}),
|
|
301
|
+
stroke: new _style2.Stroke({
|
|
302
|
+
color: 'rgba(0,128,255, 0.7)',
|
|
303
|
+
width: 2
|
|
304
|
+
}),
|
|
305
|
+
image: new _style2.Circle({
|
|
306
|
+
radius: 6,
|
|
307
|
+
fill: new _style2.Fill({
|
|
308
|
+
// color: '#ffcc33',
|
|
309
|
+
color: '#1890FF'
|
|
310
|
+
}),
|
|
311
|
+
stroke: new _style2.Stroke({
|
|
312
|
+
color: '#FFF',
|
|
313
|
+
width: 2
|
|
314
|
+
})
|
|
315
|
+
})
|
|
316
|
+
})
|
|
317
|
+
});
|
|
318
|
+
this.map.addLayer(this.layer);
|
|
319
|
+
this.modifySource = null;
|
|
320
|
+
this.modifyLayer = null;
|
|
321
|
+
this.modifyInit();
|
|
322
|
+
}
|
|
323
|
+
_createClass(_default, [{
|
|
324
|
+
key: "removeCancelTextLayer",
|
|
325
|
+
value: function removeCancelTextLayer() {
|
|
326
|
+
if (this.cancelTextLayer) {
|
|
327
|
+
this.map.removeLayer(this.cancelTextLayer);
|
|
328
|
+
this.cancelTextLayer = null;
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
}, {
|
|
332
|
+
key: "addCancelTextLayer",
|
|
333
|
+
value: function addCancelTextLayer(topRightCorner) {
|
|
334
|
+
var _this2 = this;
|
|
335
|
+
if (!this.showCancel) {
|
|
336
|
+
return;
|
|
337
|
+
}
|
|
338
|
+
this.removeCancelTextLayer();
|
|
339
|
+
|
|
340
|
+
// 创建文本 Feature
|
|
341
|
+
var cancelTextFeature = new _ol.Feature({
|
|
342
|
+
geometry: new _geom.Point(topRightCorner),
|
|
343
|
+
name: '取消框选'
|
|
344
|
+
});
|
|
345
|
+
cancelTextFeature.setId(CANCEL_TEXT_FEATURE_ID);
|
|
346
|
+
cancelTextFeature.onClick = function () {
|
|
347
|
+
_this2.onClear();
|
|
348
|
+
_this2.drawInit();
|
|
349
|
+
_this2.removeCancelTextLayer();
|
|
350
|
+
};
|
|
351
|
+
var style = new _style2.Style({
|
|
352
|
+
geometry: new _geom.Point(topRightCorner),
|
|
353
|
+
text: new _style2.Text({
|
|
354
|
+
text: '取消框选',
|
|
355
|
+
font: '12px Calibri,sans-serif',
|
|
356
|
+
fill: new _style2.Fill({
|
|
357
|
+
color: '#0080FF'
|
|
358
|
+
}),
|
|
359
|
+
backgroundFill: new _style2.Fill({
|
|
360
|
+
color: '#FFF'
|
|
361
|
+
}),
|
|
362
|
+
backgroundStroke: new _style2.Stroke({
|
|
363
|
+
color: '#FFF',
|
|
364
|
+
width: 1
|
|
365
|
+
}),
|
|
366
|
+
padding: [3, 2, 2, 4],
|
|
367
|
+
justify: 'right',
|
|
368
|
+
offsetX: 40,
|
|
369
|
+
offsetY: 24
|
|
370
|
+
})
|
|
371
|
+
});
|
|
372
|
+
cancelTextFeature.setStyle(style);
|
|
373
|
+
this.cancelTextLayer = new _layer.Vector({
|
|
374
|
+
source: new _source.Vector({
|
|
375
|
+
features: [cancelTextFeature]
|
|
376
|
+
})
|
|
377
|
+
});
|
|
378
|
+
this.map.addLayer(this.cancelTextLayer);
|
|
379
|
+
}
|
|
380
|
+
}, {
|
|
381
|
+
key: "removeDrawTool",
|
|
382
|
+
value: function removeDrawTool() {
|
|
383
|
+
this.map.removeInteraction(this.drawTool);
|
|
384
|
+
this.map.removeInteraction(this.modifyTool);
|
|
385
|
+
}
|
|
386
|
+
}, {
|
|
387
|
+
key: "destroy",
|
|
388
|
+
value: function destroy() {
|
|
389
|
+
this.map.removeLayer(this.layer);
|
|
390
|
+
this.map.removeLayer(this.modifyLayer);
|
|
391
|
+
this.removeCancelTextLayer();
|
|
392
|
+
this.removeDrawTool();
|
|
393
|
+
this.drawTool && this.drawTool.setActive(false);
|
|
394
|
+
this.map.hideTip();
|
|
395
|
+
}
|
|
396
|
+
}]);
|
|
397
|
+
return _default;
|
|
398
|
+
}();
|
|
399
|
+
exports["default"] = _default;
|
|
400
|
+
//# sourceMappingURL=BufferDraw.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BufferDraw.js","names":["_style2","require","_interaction","_geom","_source","_layer","_format","_ol","_condition","_turf","_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","createBox","Draw","format","GeoJSON","getCoordinateAndType","geometry","coordinates","type","Point","getCoordinates","Polygon","LineString","Circle","flatCoordinates","getTopRightCorner","topRightCorner","coordinate","CANCEL_TEXT_FEATURE_ID","_default","options","callback","_this","map","removeInteraction","drawTool","addInteractions","t","VectorSource","modifySource","style","Style","feature","modifyGeometry","get","getGeometry","fill","Fill","color","stroke","Stroke","width","vector","VectorLayer","zIndex","styles","addCancelTextLayer","distance","text","toFixed","drawFeature","getFeatures","_getCoordinateAndType","topRightCorner_modify","image","Icon","src","Text","font","backgroundFill","backgroundStroke","padding","justify","textBaseline","offsetX","modifyLayer","addLayer","defaultStyle","Modify","getOverlay","getStyleFunction","modify","maxDistance","condition","event","primaryAction","platformModifierKeyOnly","deleteCondition","never","insertVertexCondition","modifyFeature","point","_getCoordinateAndType2","from","TurfPoint","to","TurfDistance","units","setProperties","bufferFeature","getBufferFeature","on","features","set","clone","setGeometry","unset","_feature","isFit","fitView","addInteraction","modifyTool","draw","drawType","geometryFunction","onClear","addFeature","g","TurfPolygon","TurfLineString","center","getCenter","radius","getRadius","TurfCircle","buffered","TurfBuffer","readFeature","getView","fit","getExtent","maxZoom","duration","clear","_options$isFit","cancelTextLayer","showCancel","layer","CircleStyle","modifyInit","removeCancelTextLayer","removeLayer","_this2","cancelTextFeature","Feature","name","setId","onClick","drawInit","offsetY","setStyle","removeDrawTool","destroy","setActive","hideTip","exports"],"sources":["buffer-draw/BufferDraw.js"],"sourcesContent":["import { Circle as CircleStyle, Fill, Stroke, Style, Text, Icon } from 'ol/style';\nimport { Draw, Modify } from 'ol/interaction';\nimport { Point, Polygon, LineString, Circle } from 'ol/geom';\nimport { Vector as VectorSource } from 'ol/source';\nimport { Vector as VectorLayer } from 'ol/layer';\nimport { GeoJSON } from 'ol/format';\nimport { Feature } from 'ol';\nimport { never, platformModifierKeyOnly, primaryAction } from 'ol/events/condition';\nimport {\n point as TurfPoint,\n distance as TurfDistance,\n polygon as TurfPolygon,\n lineString as TurfLineString,\n circle as TurfCircle,\n buffer as TurfBuffer,\n} from '@turf/turf';\n\nconst { createBox } = Draw;\nlet format = new GeoJSON();\n\nconst getCoordinateAndType = geometry => {\n let coordinates, type;\n if (geometry instanceof Point) {\n coordinates = [geometry.getCoordinates()];\n } else if (geometry instanceof Polygon) {\n coordinates = geometry.getCoordinates()[0];\n } else if (geometry instanceof LineString) {\n coordinates = geometry.getCoordinates();\n } else if (geometry instanceof Circle) {\n coordinates = geometry.flatCoordinates;\n type = 'circle';\n }\n return { coordinates, type };\n};\n\nconst getTopRightCorner = (coordinates, type) => {\n let topRightCorner = [0, 0];\n\n if (type === 'circle') {\n topRightCorner = [coordinates?.[0], coordinates?.[1]];\n } else {\n for (let i = 0; i < coordinates.length; i++) {\n let coordinate = coordinates[i];\n if (\n coordinate[0] > topRightCorner[0] ||\n (coordinate[0] === topRightCorner[0] && coordinate[1] < topRightCorner[1])\n ) {\n topRightCorner = coordinate;\n }\n }\n }\n\n return topRightCorner;\n};\n\nconst CANCEL_TEXT_FEATURE_ID = 'cancelTextFeatureKey';\n\nexport default class {\n constructor(options, callback) {\n const { isFit = true } = options;\n this.map = options.map;\n this.cancelTextLayer = null;\n this.drawTool = null;\n this.modifyTool = null;\n this.drawFeature = null;\n this.distance = 500;\n this.showCancel = options.showCancel;\n this.maxDistance = options.maxDistance;\n this.drawType = options.drawType;\n this.callback = callback;\n this.isFit = isFit;\n this.source = new VectorSource();\n this.layer = new VectorLayer({\n source: this.source,\n zIndex: 4,\n style: new Style({\n fill: new Fill({\n color: 'rgba(0,128,255, 0.7)',\n }),\n stroke: new Stroke({\n color: 'rgba(0,128,255, 0.7)',\n width: 2,\n }),\n image: new CircleStyle({\n radius: 6,\n fill: new Fill({\n // color: '#ffcc33',\n color: '#1890FF',\n }),\n stroke: new Stroke({\n color: '#FFF',\n width: 2,\n }),\n }),\n }),\n });\n this.map.addLayer(this.layer);\n\n this.modifySource = null;\n this.modifyLayer = null;\n\n this.modifyInit();\n }\n\n drawInit = () => {\n this.map.removeInteraction(this.drawTool);\n this.addInteractions();\n };\n\n removeCancelTextLayer() {\n if (this.cancelTextLayer) {\n this.map.removeLayer(this.cancelTextLayer);\n this.cancelTextLayer = null;\n }\n }\n\n addCancelTextLayer(topRightCorner) {\n if (!this.showCancel) {\n return;\n }\n\n this.removeCancelTextLayer();\n\n // 创建文本 Feature\n const cancelTextFeature = new Feature({\n geometry: new Point(topRightCorner),\n name: '取消框选',\n });\n\n cancelTextFeature.setId(CANCEL_TEXT_FEATURE_ID);\n\n cancelTextFeature.onClick = () => {\n this.onClear();\n this.drawInit();\n this.removeCancelTextLayer();\n };\n\n const style = new Style({\n geometry: new Point(topRightCorner),\n text: new Text({\n text: '取消框选',\n font: '12px Calibri,sans-serif',\n fill: new Fill({\n color: '#0080FF',\n }),\n backgroundFill: new Fill({\n color: '#FFF',\n }),\n backgroundStroke: new Stroke({\n color: '#FFF',\n width: 1,\n }),\n padding: [3, 2, 2, 4],\n justify: 'right',\n offsetX: 40,\n offsetY: 24,\n }),\n });\n cancelTextFeature.setStyle(style);\n\n this.cancelTextLayer = new VectorLayer({\n source: new VectorSource({\n features: [cancelTextFeature],\n }),\n });\n\n this.map.addLayer(this.cancelTextLayer);\n }\n\n modifyInit = () => {\n const t = this;\n const source = new VectorSource();\n this.modifySource = source;\n\n // 绘制完成的样式\n const style = new Style({\n geometry: function(feature) {\n const modifyGeometry = feature.get('modifyGeometry');\n return modifyGeometry ? modifyGeometry.geometry : feature.getGeometry();\n },\n fill: new Fill({\n color: 'rgba(0,128,255, 0.3)',\n }),\n stroke: new Stroke({\n color: 'rgba(0,128,255, 0.3)',\n width: 2,\n }),\n });\n\n const vector = new VectorLayer({\n source: this.modifySource,\n zIndex: 3,\n style: function(feature) {\n const styles = [style];\n const modifyGeometry = feature.get('modifyGeometry');\n const geometry = modifyGeometry ? modifyGeometry.geometry : feature.getGeometry();\n let topRightCorner = getTopRightCorner(geometry.getCoordinates()[0]);\n\n if (topRightCorner) {\n t.addCancelTextLayer(topRightCorner);\n let distance = feature.get('distance');\n t.distance = distance;\n let text =\n Number(distance) < 1\n ? Number(distance * 1000).toFixed(0) + '米'\n : Number(distance).toFixed(2) + '公里';\n\n let drawFeature = t.source.getFeatures()[0].getGeometry();\n let { coordinates, type } = getCoordinateAndType(drawFeature);\n let topRightCorner_modify = getTopRightCorner(coordinates, type);\n // 待带修改的样式\n styles.push(\n new Style({\n geometry: new LineString([topRightCorner, topRightCorner_modify]),\n stroke: new Stroke({\n color: '#0084FF',\n width: 2,\n }),\n }),\n );\n\n styles.push(\n new Style({\n geometry: new Point(topRightCorner),\n // 修改了点位的样式\n image: new Icon({\n src: require('../assets/kz.png'),\n }),\n // image: new CircleStyle({\n // radius: 6,\n // fill: new Fill({\n // color: '#0080FF',\n // }),\n // stroke: new Stroke({\n // color: '#FFF',\n // width: 2,\n // }),\n // }),\n text: new Text({\n text: text,\n font: '12px Calibri,sans-serif',\n fill: new Fill({\n color: '#FFF',\n }),\n backgroundFill: new Fill({\n color: '#0080FF',\n }),\n backgroundStroke: new Stroke({\n color: '#0080FF',\n width: 1,\n }),\n padding: [3, 2, 2, 4],\n justify: 'right',\n textBaseline: 'middle',\n offsetX: 40,\n }),\n }),\n );\n }\n\n return styles;\n },\n });\n this.modifyLayer = vector;\n this.map.addLayer(vector);\n\n const defaultStyle = new Modify({ source: this.modifySource })\n .getOverlay()\n .getStyleFunction();\n\n const modify = new Modify({\n source: this.modifySource,\n maxDistance: this.maxDistance,\n condition: function(event) {\n return primaryAction(event) && !platformModifierKeyOnly(event);\n },\n deleteCondition: never,\n insertVertexCondition: never,\n style: function(feature) {\n feature.get('features').forEach(function(modifyFeature) {\n const modifyGeometry = modifyFeature.get('modifyGeometry');\n if (modifyGeometry) {\n const point = feature.getGeometry().getCoordinates();\n\n const geometry = t.source.getFeatures()[0].getGeometry();\n let { coordinates, type } = getCoordinateAndType(geometry);\n let topRightCorner = getTopRightCorner(coordinates, type);\n\n let from = TurfPoint(point);\n let to = TurfPoint(topRightCorner);\n let distance = TurfDistance(from, to, { units: 'kilometers' });\n\n // 限制拖动长度\n if (t.maxDistance && distance && distance * 1000 > t.maxDistance) {\n modifyFeature.setProperties({ distance: t.maxDistance / 1000 });\n\n return defaultStyle(feature);\n }\n\n modifyFeature.setProperties({ distance: distance });\n\n let bufferFeature = t.getBufferFeature(t.source.getFeatures()[0], distance);\n modifyGeometry.geometry = bufferFeature.getGeometry();\n }\n });\n return defaultStyle(feature);\n },\n });\n\n modify.on('modifystart', function(event) {\n event.features.forEach(function(feature) {\n feature.set('modifyGeometry', { geometry: feature.getGeometry().clone() }, true);\n });\n });\n\n modify.on('modifyend', function(event) {\n event.features.forEach(function(feature) {\n const modifyGeometry = feature.get('modifyGeometry');\n if (modifyGeometry) {\n feature.setGeometry(modifyGeometry.geometry);\n feature.unset('modifyGeometry', true);\n t.drawFeature = feature;\n let _feature = feature?.clone();\n t.callback(_feature, t.distance * 1000);\n }\n t.isFit && t.fitView(feature);\n });\n });\n this.map.addInteraction(modify);\n this.modifyTool = modify;\n };\n\n addInteractions = () => {\n let t = this;\n const draw = new Draw({\n source: this.source,\n type: this.drawType,\n ...(this.drawType === 'DragBox'\n ? {\n type: 'Circle',\n // 用于在绘制过程中创建或修改几何对象。这个函数允许开发者自定义绘制逻辑,以满足特定的需求。如果未提供此函数,则使用默认的几何创建逻辑\n geometryFunction: createBox(),\n }\n : {}),\n });\n\n draw.on('drawstart', function() {\n t.onClear();\n });\n\n draw.on('drawend', function(event) {\n const distance = 500 / 1000;\n const feature = t.getBufferFeature(event.feature, distance);\n feature.setProperties({ distance: distance });\n t.modifySource.addFeature(feature);\n t.drawFeature = feature;\n let _feature = feature?.clone();\n t.callback(_feature, distance * 1000);\n t.isFit && t.fitView(feature);\n });\n\n this.map.addInteraction(draw);\n this.drawTool = draw;\n };\n\n getBufferFeature = (feature, distance) => {\n let coordinates = feature.getGeometry().getCoordinates();\n const g = feature.getGeometry();\n\n let geometry;\n if (g instanceof Point) {\n geometry = TurfPoint(coordinates);\n } else if (g instanceof Polygon) {\n geometry = TurfPolygon(coordinates);\n } else if (g instanceof LineString) {\n geometry = TurfLineString(coordinates);\n } else if (g instanceof Circle) {\n let center = g?.getCenter();\n let radius = g?.getRadius();\n this.distance = radius;\n geometry = TurfCircle(center, radius);\n }\n\n let buffered = TurfBuffer(geometry, distance, { units: 'kilometers' });\n\n return format.readFeature(buffered);\n };\n\n fitView = feature => {\n this.map.getView().fit(feature.getGeometry().getExtent(), {\n padding: [100, 400, 100, 400],\n maxZoom: 18,\n duration: 500,\n });\n };\n\n onClear = () => {\n this.source.clear();\n this.modifySource.clear();\n };\n\n removeDrawTool() {\n this.map.removeInteraction(this.drawTool);\n this.map.removeInteraction(this.modifyTool);\n }\n\n destroy() {\n this.map.removeLayer(this.layer);\n this.map.removeLayer(this.modifyLayer);\n this.removeCancelTextLayer();\n this.removeDrawTool();\n this.drawTool && this.drawTool.setActive(false);\n this.map.hideTip();\n }\n}\n"],"mappings":";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CAAC4G,WAAW,CAAC,IAAI,CAACJ,KAAK,CAAC;MAChC,IAAI,CAACxG,GAAG,CAAC4G,WAAW,CAAC,IAAI,CAAClE,WAAW,CAAC;MACtC,IAAI,CAACiE,qBAAqB,CAAC,CAAC;MAC5B,IAAI,CAACW,cAAc,CAAC,CAAC;MACrB,IAAI,CAACpH,QAAQ,IAAI,IAAI,CAACA,QAAQ,CAACsH,SAAS,CAAC,KAAK,CAAC;MAC/C,IAAI,CAACxH,GAAG,CAACyH,OAAO,CAAC,CAAC;IACtB;EAAC;EAAA,OAAA7H,QAAA;AAAA;AAAA8H,OAAA,cAAA9H,QAAA"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
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
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports["default"] = _default;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _useProps2 = _interopRequireDefault(require("../use-props"));
|
|
10
|
+
var _BufferDraw = _interopRequireDefault(require("./BufferDraw"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
12
|
+
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); }
|
|
13
|
+
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; }
|
|
14
|
+
function _default(props) {
|
|
15
|
+
var _useProps = (0, _useProps2["default"])(),
|
|
16
|
+
map = _useProps.map;
|
|
17
|
+
var bufferDraw = (0, _react.useRef)();
|
|
18
|
+
var _props$drawType = props.drawType,
|
|
19
|
+
drawType = _props$drawType === void 0 ? '' : _props$drawType,
|
|
20
|
+
_props$onDrawEnd = props.onDrawEnd,
|
|
21
|
+
onDrawEnd = _props$onDrawEnd === void 0 ? function () {} : _props$onDrawEnd,
|
|
22
|
+
maxDistance = props.maxDistance,
|
|
23
|
+
showCancel = props.showCancel;
|
|
24
|
+
(0, _react.useEffect)(function () {
|
|
25
|
+
bufferDraw.current = new _BufferDraw["default"]({
|
|
26
|
+
map: map,
|
|
27
|
+
drawType: '',
|
|
28
|
+
maxDistance: maxDistance,
|
|
29
|
+
showCancel: showCancel
|
|
30
|
+
}, function (feature, distance) {
|
|
31
|
+
var _bufferDraw$current, _bufferDraw$current$d;
|
|
32
|
+
onDrawEnd(feature, distance);
|
|
33
|
+
(_bufferDraw$current = bufferDraw.current) === null || _bufferDraw$current === void 0 ? void 0 : (_bufferDraw$current$d = _bufferDraw$current.drawTool) === null || _bufferDraw$current$d === void 0 ? void 0 : _bufferDraw$current$d.setActive(false);
|
|
34
|
+
});
|
|
35
|
+
return function () {
|
|
36
|
+
bufferDraw.current.destroy();
|
|
37
|
+
};
|
|
38
|
+
}, []);
|
|
39
|
+
(0, _react.useEffect)(function () {
|
|
40
|
+
if (bufferDraw.current) {
|
|
41
|
+
var _bufferDraw$current4;
|
|
42
|
+
if (drawType) {
|
|
43
|
+
var _bufferDraw$current2;
|
|
44
|
+
(_bufferDraw$current2 = bufferDraw.current) === null || _bufferDraw$current2 === void 0 ? void 0 : _bufferDraw$current2.onClear();
|
|
45
|
+
bufferDraw.current.drawType = drawType;
|
|
46
|
+
bufferDraw.current.drawInit();
|
|
47
|
+
} else {
|
|
48
|
+
var _bufferDraw$current3, _bufferDraw$current3$;
|
|
49
|
+
bufferDraw.current.drawType = '';
|
|
50
|
+
(_bufferDraw$current3 = bufferDraw.current) === null || _bufferDraw$current3 === void 0 ? void 0 : (_bufferDraw$current3$ = _bufferDraw$current3.drawTool) === null || _bufferDraw$current3$ === void 0 ? void 0 : _bufferDraw$current3$.setActive(false);
|
|
51
|
+
}
|
|
52
|
+
(_bufferDraw$current4 = bufferDraw.current) === null || _bufferDraw$current4 === void 0 ? void 0 : _bufferDraw$current4.removeCancelTextLayer();
|
|
53
|
+
}
|
|
54
|
+
}, [drawType]);
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_useProps2","_interopRequireDefault","_BufferDraw","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_default","props","_useProps","useProps","map","bufferDraw","useRef","_props$drawType","drawType","_props$onDrawEnd","onDrawEnd","maxDistance","showCancel","useEffect","current","BufferDraw","feature","distance","_bufferDraw$current","_bufferDraw$current$d","drawTool","setActive","destroy","_bufferDraw$current4","_bufferDraw$current2","onClear","drawInit","_bufferDraw$current3","_bufferDraw$current3$","removeCancelTextLayer"],"sources":["buffer-draw/index.js"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\nimport useProps from '../use-props';\nimport BufferDraw from './BufferDraw';\n\nexport default function(props) {\n const { map } = useProps();\n const bufferDraw = useRef();\n const { drawType = '', onDrawEnd = () => {}, maxDistance, showCancel } = props;\n\n useEffect(() => {\n bufferDraw.current = new BufferDraw(\n { map, drawType: '', maxDistance, showCancel },\n (feature, distance) => {\n onDrawEnd(feature, distance);\n bufferDraw.current?.drawTool?.setActive(false);\n },\n );\n return () => {\n bufferDraw.current.destroy();\n };\n }, []);\n\n useEffect(() => {\n if (bufferDraw.current) {\n if (drawType) {\n bufferDraw.current?.onClear();\n bufferDraw.current.drawType = drawType;\n bufferDraw.current.drawInit();\n } else {\n bufferDraw.current.drawType = '';\n bufferDraw.current?.drawTool?.setActive(false);\n }\n\n bufferDraw.current?.removeCancelTextLayer();\n }\n }, [drawType]);\n\n return null;\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,WAAA,GAAAD,sBAAA,CAAAF,OAAA;AAAsC,SAAAE,uBAAAE,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,SAAAR,wBAAAK,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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,CAAC,CAAC;IAC/C;EACJ,CAAC,EAAE,CAACrB,QAAQ,CAAC,CAAC;EAEd,OAAO,IAAI;AACf"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["buffer-draw/style/index.js"],"sourcesContent":[""],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["buffer-draw/style/index.js"],"sourcesContent":[""],"mappings":""}
|