@vtx/ol-map 2.0.0-beta.1 → 2.0.0-beta.11
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 +124 -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 +26 -16
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_ArrowFlowLayer","_interopRequireDefault","_ahooks","_events","_useProps2","_provider","_excluded","e","__esModule","t","WeakMap","r","n","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","_slicedToArray","_arrayWithHoles","_iterableToArrayLimit","_unsupportedIterableToArray","_nonIterableRest","TypeError","a","_arrayLikeToArray","toString","slice","constructor","name","Array","from","test","length","l","Symbol","iterator","u","next","done","push","value","isArray","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","apply","_objectSpread","arguments","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","configurable","writable","_toPrimitive","toPrimitive","String","Number","_objectWithoutProperties","_objectWithoutPropertiesLoose","indexOf","propertyIsEnumerable","ArrowFlowLayerComponent","props","data","features","zIndex","key","id","_key","_props$show","show","legend","_props$lineStyle","lineStyle","_props$arrowStyle","arrowStyle","flowSpeed","flowCycleSeconds","minZoomForFlow","maxArrowsPerLine","_props$layerControl","layerControl","children","rest","mergedArrowStyle","_useState","useState","_useState2","layerLoad","setLayerLoad","_useProps","useProps","map","groupLayer","layerRef","useRef","useEffect","layer","ArrowFlowLayer","registerEventLayer","addLayer","layers","current","destroy","removeLayer","useUpdateEffect","loadData","loadFeatures","setShow","setLineStyle","JSON","stringify","setArrowStyle","createElement","Fragment","featureLayer","vectorLayer"],"sources":["arrow-flow-layer/index.js"],"sourcesContent":["/* eslint-disable react/prop-types */\nimport React, { useState, useRef, useEffect } from 'react';\nimport ArrowFlowLayer from './ArrowFlowLayer';\nimport { useUpdateEffect } from 'ahooks';\nimport { registerEventLayer } from '../events';\nimport useProps from '../use-props';\nimport Provider from '../provider';\n\nexport default function ArrowFlowLayerComponent(props) {\n const {\n data,\n features,\n zIndex,\n id: key,\n _key,\n name,\n show = true,\n legend,\n lineStyle = {},\n arrowStyle = {},\n flowSpeed,\n flowCycleSeconds,\n minZoomForFlow,\n maxArrowsPerLine,\n layerControl = true,\n children,\n ...rest\n } = props;\n\n const mergedArrowStyle = {\n ...arrowStyle,\n ...(flowSpeed != null && arrowStyle.flowSpeed == null ? { flowSpeed } : {}),\n ...(flowCycleSeconds != null && arrowStyle.flowCycleSeconds == null\n ? { flowCycleSeconds }\n : {}),\n ...(minZoomForFlow != null && arrowStyle.minZoomForFlow == null\n ? { minZoomForFlow }\n : {}),\n };\n const [layerLoad, setLayerLoad] = useState(false);\n const { map, groupLayer } = useProps();\n const layerRef = useRef();\n\n useEffect(() => {\n const layer = new ArrowFlowLayer({\n data,\n features,\n zIndex,\n key: key || _key,\n name,\n show,\n legend,\n map,\n lineStyle,\n arrowStyle: mergedArrowStyle,\n flowSpeed,\n flowCycleSeconds,\n minZoomForFlow,\n maxArrowsPerLine,\n layerControl,\n ...rest,\n });\n\n registerEventLayer(layer, props);\n\n setLayerLoad(true);\n\n if (groupLayer) {\n groupLayer.addLayer(layer);\n } else {\n map.layers.addLayer(layer);\n }\n\n layerRef.current = layer;\n\n return () => {\n layer.destroy();\n if (groupLayer) {\n groupLayer.removeLayer(layer);\n } else {\n map.layers.removeLayer(layer);\n }\n };\n }, []);\n\n useUpdateEffect(() => {\n if (layerRef.current && data) {\n layerRef.current.loadData(data);\n }\n }, [data]);\n\n useUpdateEffect(() => {\n if (layerRef.current && features) {\n layerRef.current.loadFeatures(features);\n }\n }, [features]);\n\n useUpdateEffect(() => {\n if (layerRef.current) {\n layerRef.current.setShow(show);\n }\n }, [show]);\n\n useUpdateEffect(() => {\n if (layerRef.current && lineStyle) {\n layerRef.current.setLineStyle(lineStyle);\n }\n }, [JSON.stringify(lineStyle)]);\n\n useUpdateEffect(() => {\n if (layerRef.current) {\n layerRef.current.setArrowStyle(mergedArrowStyle);\n }\n }, [JSON.stringify(mergedArrowStyle)]);\n\n useUpdateEffect(() => {\n if (layerRef.current && maxArrowsPerLine != null) {\n layerRef.current.maxArrowsPerLine = maxArrowsPerLine;\n }\n }, [maxArrowsPerLine]);\n\n return (\n <>\n {layerLoad && (\n <Provider\n value={{\n map,\n featureLayer: layerRef.current.vectorLayer,\n }}\n >\n {children}\n </Provider>\n )}\n </>\n );\n}\n"],"mappings":";;;;;;;AACA,IAAAA,MAAA,GAAAC,uBAAA,CAAA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K1B,SAAS,iBACNzG,MAAA,YAAAkI,aAAA,CAAC1H,SAAA,WAAQ;IACL6C,KAAK,EAAE;MACHwD,GAAG,EAAHA,GAAG;MACHuB,YAAY,EAAErB,QAAQ,CAACQ,OAAO,CAACc;IACnC;EAAE,GAEDlC,QACK,CAEhB,CAAC;AAEX","ignoreList":[]}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.flattenLineStrings = flattenLineStrings;
|
|
7
|
+
exports.getPixelAngle = getPixelAngle;
|
|
8
|
+
exports.sampleArrowsForLineString = sampleArrowsForLineString;
|
|
9
|
+
var _transform = require("ol/transform");
|
|
10
|
+
/**
|
|
11
|
+
* 将线几何拆成若干 LineString(MultiLineString 按段独立采样,避免跨段插值)。
|
|
12
|
+
* @param {import('ol/geom').Geometry} geometry
|
|
13
|
+
* @returns {import('ol/geom/LineString').default[]}
|
|
14
|
+
*/
|
|
15
|
+
function flattenLineStrings(geometry) {
|
|
16
|
+
if (!geometry) return [];
|
|
17
|
+
var t = geometry.getType();
|
|
18
|
+
if (t === 'LineString') {
|
|
19
|
+
return [geometry];
|
|
20
|
+
}
|
|
21
|
+
if (t === 'MultiLineString') {
|
|
22
|
+
return geometry.getLineStrings();
|
|
23
|
+
}
|
|
24
|
+
return [];
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 沿一条 LineString 按弧长等距采样箭头位置;step 可被 maxArrows 放大以控性能。
|
|
29
|
+
* @param {import('ol/geom/LineString').default} lineString
|
|
30
|
+
* @param {import('ol/extent').Extent} extent 当前帧范围,用于裁剪
|
|
31
|
+
* @param {{ stepWorld: number, phase: number, maxArrows: number }} opts
|
|
32
|
+
* @returns {Array<{ coord: number[], frac: number }>}
|
|
33
|
+
*/
|
|
34
|
+
function sampleArrowsForLineString(lineString, extent, opts) {
|
|
35
|
+
var stepWorld = opts.stepWorld,
|
|
36
|
+
phase = opts.phase,
|
|
37
|
+
maxArrows = opts.maxArrows;
|
|
38
|
+
if (!lineString.intersectsExtent(extent)) {
|
|
39
|
+
return [];
|
|
40
|
+
}
|
|
41
|
+
var len = lineString.getLength();
|
|
42
|
+
if (len <= 0) {
|
|
43
|
+
return [];
|
|
44
|
+
}
|
|
45
|
+
var step = stepWorld;
|
|
46
|
+
var count = Math.ceil(len / step);
|
|
47
|
+
if (count > maxArrows) {
|
|
48
|
+
step = len / maxArrows;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// 流动相位:短线(弧长 < 一个屏幕间距)时把相位映射到 [0,len),否则 phaseMod 常 ≥ len 导致无采样
|
|
52
|
+
var phaseNorm = (phase % stepWorld + stepWorld) % stepWorld;
|
|
53
|
+
var phaseMod = len > 0 && len < stepWorld ? phaseNorm / stepWorld * len : phaseNorm;
|
|
54
|
+
var samples = [];
|
|
55
|
+
var eps = 1e-6;
|
|
56
|
+
for (var d = phaseMod; d < len; d += step) {
|
|
57
|
+
var frac = d / len;
|
|
58
|
+
var coord = lineString.getCoordinateAt(frac);
|
|
59
|
+
var f0 = Math.max(0, frac - eps);
|
|
60
|
+
var f1 = Math.min(1, frac + eps);
|
|
61
|
+
var c0 = lineString.getCoordinateAt(f0);
|
|
62
|
+
var c1 = lineString.getCoordinateAt(f1);
|
|
63
|
+
samples.push({
|
|
64
|
+
coord: coord.slice(),
|
|
65
|
+
frac: frac,
|
|
66
|
+
c0: c0.slice(),
|
|
67
|
+
c1: c1.slice()
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
return samples;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 在像素空间计算箭头朝向(与地图旋转一致)。
|
|
75
|
+
* @param {import('ol/transform').Transform} transform inversePixel * coordinateToPixel
|
|
76
|
+
* @param {number[]} c0 地图坐标
|
|
77
|
+
* @param {number[]} c1 地图坐标
|
|
78
|
+
* @returns {number}
|
|
79
|
+
*/
|
|
80
|
+
function getPixelAngle(transform, c0, c1) {
|
|
81
|
+
var p0 = [c0[0], c0[1]];
|
|
82
|
+
var p1 = [c1[0], c1[1]];
|
|
83
|
+
(0, _transform.apply)(transform, p0);
|
|
84
|
+
(0, _transform.apply)(transform, p1);
|
|
85
|
+
return Math.atan2(p1[1] - p0[1], p1[0] - p0[0]);
|
|
86
|
+
}
|
|
87
|
+
//# sourceMappingURL=sampleArrowsAlongLine.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sampleArrowsAlongLine.js","names":["_transform","require","flattenLineStrings","geometry","t","getType","getLineStrings","sampleArrowsForLineString","lineString","extent","opts","stepWorld","phase","maxArrows","intersectsExtent","len","getLength","step","count","Math","ceil","phaseNorm","phaseMod","samples","eps","d","frac","coord","getCoordinateAt","f0","max","f1","min","c0","c1","push","slice","getPixelAngle","transform","p0","p1","apply","atan2"],"sources":["arrow-flow-layer/sampleArrowsAlongLine.js"],"sourcesContent":["import { apply } from 'ol/transform';\n\n/**\n * 将线几何拆成若干 LineString(MultiLineString 按段独立采样,避免跨段插值)。\n * @param {import('ol/geom').Geometry} geometry\n * @returns {import('ol/geom/LineString').default[]}\n */\nexport function flattenLineStrings(geometry) {\n if (!geometry) return [];\n const t = geometry.getType();\n if (t === 'LineString') {\n return [geometry];\n }\n if (t === 'MultiLineString') {\n return geometry.getLineStrings();\n }\n return [];\n}\n\n/**\n * 沿一条 LineString 按弧长等距采样箭头位置;step 可被 maxArrows 放大以控性能。\n * @param {import('ol/geom/LineString').default} lineString\n * @param {import('ol/extent').Extent} extent 当前帧范围,用于裁剪\n * @param {{ stepWorld: number, phase: number, maxArrows: number }} opts\n * @returns {Array<{ coord: number[], frac: number }>}\n */\nexport function sampleArrowsForLineString(lineString, extent, opts) {\n const { stepWorld, phase, maxArrows } = opts;\n if (!lineString.intersectsExtent(extent)) {\n return [];\n }\n const len = lineString.getLength();\n if (len <= 0) {\n return [];\n }\n\n let step = stepWorld;\n const count = Math.ceil(len / step);\n if (count > maxArrows) {\n step = len / maxArrows;\n }\n\n // 流动相位:短线(弧长 < 一个屏幕间距)时把相位映射到 [0,len),否则 phaseMod 常 ≥ len 导致无采样\n const phaseNorm = ((phase % stepWorld) + stepWorld) % stepWorld;\n const phaseMod =\n len > 0 && len < stepWorld ? (phaseNorm / stepWorld) * len : phaseNorm;\n const samples = [];\n const eps = 1e-6;\n\n for (let d = phaseMod; d < len; d += step) {\n const frac = d / len;\n const coord = lineString.getCoordinateAt(frac);\n const f0 = Math.max(0, frac - eps);\n const f1 = Math.min(1, frac + eps);\n const c0 = lineString.getCoordinateAt(f0);\n const c1 = lineString.getCoordinateAt(f1);\n samples.push({\n coord: coord.slice(),\n frac,\n c0: c0.slice(),\n c1: c1.slice(),\n });\n }\n\n return samples;\n}\n\n/**\n * 在像素空间计算箭头朝向(与地图旋转一致)。\n * @param {import('ol/transform').Transform} transform inversePixel * coordinateToPixel\n * @param {number[]} c0 地图坐标\n * @param {number[]} c1 地图坐标\n * @returns {number}\n */\nexport function getPixelAngle(transform, c0, c1) {\n const p0 = [c0[0], c0[1]];\n const p1 = [c1[0], c1[1]];\n apply(transform, p0);\n apply(transform, p1);\n return Math.atan2(p1[1] - p0[1], p1[0] - p0[0]);\n}\n"],"mappings":";;;;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAACC,QAAQ,EAAE;EACzC,IAAI,CAACA,QAAQ,EAAE,OAAO,EAAE;EACxB,IAAMC,CAAC,GAAGD,QAAQ,CAACE,OAAO,CAAC,CAAC;EAC5B,IAAID,CAAC,KAAK,YAAY,EAAE;IACpB,OAAO,CAACD,QAAQ,CAAC;EACrB;EACA,IAAIC,CAAC,KAAK,iBAAiB,EAAE;IACzB,OAAOD,QAAQ,CAACG,cAAc,CAAC,CAAC;EACpC;EACA,OAAO,EAAE;AACb;;AAEA;AACA;AACA;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,CAAC,EAAEN,IAAI,GAAGF,GAAG,CAAC;IAClC,IAAMS,EAAE,GAAGzB,UAAU,CAACoB,eAAe,CAACC,EAAE,CAAC;IACzC,IAAMK,EAAE,GAAG1B,UAAU,CAACoB,eAAe,CAACG,EAAE,CAAC;IACzCR,OAAO,CAACY,IAAI,CAAC;MACTR,KAAK,EAAEA,KAAK,CAACS,KAAK,CAAC,CAAC;MACpBV,IAAI,EAAJA,IAAI;MACJO,EAAE,EAAEA,EAAE,CAACG,KAAK,CAAC,CAAC;MACdF,EAAE,EAAEA,EAAE,CAACE,KAAK,CAAC;IACjB,CAAC,CAAC;EACN;EAEA,OAAOb,OAAO;AAClB;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASc,aAAaA,CAACC,SAAS,EAAEL,EAAE,EAAEC,EAAE,EAAE;EAC7C,IAAMK,EAAE,GAAG,CAACN,EAAE,CAAC,CAAC,CAAC,EAAEA,EAAE,CAAC,CAAC,CAAC,CAAC;EACzB,IAAMO,EAAE,GAAG,CAACN,EAAE,CAAC,CAAC,CAAC,EAAEA,EAAE,CAAC,CAAC,CAAC,CAAC;EACzB,IAAAO,gBAAK,EAACH,SAAS,EAAEC,EAAE,CAAC;EACpB,IAAAE,gBAAK,EAACH,SAAS,EAAEE,EAAE,CAAC;EACpB,OAAOrB,IAAI,CAACuB,KAAK,CAACF,EAAE,CAAC,CAAC,CAAC,GAAGD,EAAE,CAAC,CAAC,CAAC,EAAEC,EAAE,CAAC,CAAC,CAAC,GAAGD,EAAE,CAAC,CAAC,CAAC,CAAC;AACnD","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"css.js","names":["require"],"sources":["arrow-flow-layer/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAAA,OAAA","ignoreList":[]}
|
|
File without changes
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["require"],"sources":["arrow-flow-layer/style/index.js"],"sourcesContent":["import './index.less';\n"],"mappings":";;AAAAA,OAAA","ignoreList":[]}
|
|
File without changes
|
|
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
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,399 @@
|
|
|
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(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); }
|
|
17
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
20
|
+
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); } }
|
|
21
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
22
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
23
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
24
|
+
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); }
|
|
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 = exports["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) + _this.TextEnum.meter : Number(distance).toFixed(2) + _this.TextEnum.kilometer;
|
|
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.TextEnum = options.TextEnum;
|
|
284
|
+
this.cancelTextLayer = null;
|
|
285
|
+
this.drawTool = null;
|
|
286
|
+
this.modifyTool = null;
|
|
287
|
+
this.drawFeature = null;
|
|
288
|
+
this.distance = 500;
|
|
289
|
+
this.showCancel = options.showCancel;
|
|
290
|
+
this.maxDistance = options.maxDistance;
|
|
291
|
+
this.drawType = options.drawType;
|
|
292
|
+
this.callback = callback;
|
|
293
|
+
this.isFit = isFit;
|
|
294
|
+
this.source = new _source.Vector();
|
|
295
|
+
this.layer = new _layer.Vector({
|
|
296
|
+
source: this.source,
|
|
297
|
+
zIndex: 4,
|
|
298
|
+
style: new _style2.Style({
|
|
299
|
+
fill: new _style2.Fill({
|
|
300
|
+
color: 'rgba(0,128,255, 0.7)'
|
|
301
|
+
}),
|
|
302
|
+
stroke: new _style2.Stroke({
|
|
303
|
+
color: 'rgba(0,128,255, 0.7)',
|
|
304
|
+
width: 2
|
|
305
|
+
}),
|
|
306
|
+
image: new _style2.Circle({
|
|
307
|
+
radius: 6,
|
|
308
|
+
fill: new _style2.Fill({
|
|
309
|
+
// color: '#ffcc33',
|
|
310
|
+
color: '#1890FF'
|
|
311
|
+
}),
|
|
312
|
+
stroke: new _style2.Stroke({
|
|
313
|
+
color: '#FFF',
|
|
314
|
+
width: 2
|
|
315
|
+
})
|
|
316
|
+
})
|
|
317
|
+
})
|
|
318
|
+
});
|
|
319
|
+
this.map.addLayer(this.layer);
|
|
320
|
+
this.modifySource = null;
|
|
321
|
+
this.modifyLayer = null;
|
|
322
|
+
this.modifyInit();
|
|
323
|
+
}
|
|
324
|
+
return _createClass(_default, [{
|
|
325
|
+
key: "removeCancelTextLayer",
|
|
326
|
+
value: function removeCancelTextLayer() {
|
|
327
|
+
if (this.cancelTextLayer) {
|
|
328
|
+
this.map.removeLayer(this.cancelTextLayer);
|
|
329
|
+
this.cancelTextLayer = null;
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
}, {
|
|
333
|
+
key: "addCancelTextLayer",
|
|
334
|
+
value: function addCancelTextLayer(topRightCorner) {
|
|
335
|
+
var _this2 = this;
|
|
336
|
+
if (!this.showCancel) {
|
|
337
|
+
return;
|
|
338
|
+
}
|
|
339
|
+
this.removeCancelTextLayer();
|
|
340
|
+
|
|
341
|
+
// 创建文本 Feature
|
|
342
|
+
var cancelTextFeature = new _ol.Feature({
|
|
343
|
+
geometry: new _geom.Point(topRightCorner),
|
|
344
|
+
name: this.TextEnum.cancelBoxSelect
|
|
345
|
+
});
|
|
346
|
+
cancelTextFeature.setId(CANCEL_TEXT_FEATURE_ID);
|
|
347
|
+
cancelTextFeature.onClick = function () {
|
|
348
|
+
_this2.onClear();
|
|
349
|
+
_this2.drawInit();
|
|
350
|
+
_this2.removeCancelTextLayer();
|
|
351
|
+
};
|
|
352
|
+
var style = new _style2.Style({
|
|
353
|
+
geometry: new _geom.Point(topRightCorner),
|
|
354
|
+
text: new _style2.Text({
|
|
355
|
+
text: this.TextEnum.cancelBoxSelect,
|
|
356
|
+
font: '12px Calibri,sans-serif',
|
|
357
|
+
fill: new _style2.Fill({
|
|
358
|
+
color: '#0080FF'
|
|
359
|
+
}),
|
|
360
|
+
backgroundFill: new _style2.Fill({
|
|
361
|
+
color: '#FFF'
|
|
362
|
+
}),
|
|
363
|
+
backgroundStroke: new _style2.Stroke({
|
|
364
|
+
color: '#FFF',
|
|
365
|
+
width: 1
|
|
366
|
+
}),
|
|
367
|
+
padding: [3, 2, 2, 4],
|
|
368
|
+
justify: 'right',
|
|
369
|
+
offsetX: 40,
|
|
370
|
+
offsetY: 24
|
|
371
|
+
})
|
|
372
|
+
});
|
|
373
|
+
cancelTextFeature.setStyle(style);
|
|
374
|
+
this.cancelTextLayer = new _layer.Vector({
|
|
375
|
+
source: new _source.Vector({
|
|
376
|
+
features: [cancelTextFeature]
|
|
377
|
+
})
|
|
378
|
+
});
|
|
379
|
+
this.map.addLayer(this.cancelTextLayer);
|
|
380
|
+
}
|
|
381
|
+
}, {
|
|
382
|
+
key: "removeDrawTool",
|
|
383
|
+
value: function removeDrawTool() {
|
|
384
|
+
this.map.removeInteraction(this.drawTool);
|
|
385
|
+
this.map.removeInteraction(this.modifyTool);
|
|
386
|
+
}
|
|
387
|
+
}, {
|
|
388
|
+
key: "destroy",
|
|
389
|
+
value: function destroy() {
|
|
390
|
+
this.map.removeLayer(this.layer);
|
|
391
|
+
this.map.removeLayer(this.modifyLayer);
|
|
392
|
+
this.removeCancelTextLayer();
|
|
393
|
+
this.removeDrawTool();
|
|
394
|
+
this.drawTool && this.drawTool.setActive(false);
|
|
395
|
+
this.map.hideTip();
|
|
396
|
+
}
|
|
397
|
+
}]);
|
|
398
|
+
}();
|
|
399
|
+
//# sourceMappingURL=BufferDraw.js.map
|