@vtx/ol-map 1.0.143 → 1.0.144
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/package.json +3 -2
- package/CHANGELOG.md +0 -217
- package/lib/_util/EventEmitter.js +0 -80
- package/lib/_util/EventEmitter.js.map +0 -1
- package/lib/_util/StyleCache.js +0 -48
- package/lib/_util/StyleCache.js.map +0 -1
- package/lib/_util/encryptParams.js +0 -65
- package/lib/_util/encryptParams.js.map +0 -1
- package/lib/_util/filterSpecialCharacters.js +0 -90
- package/lib/_util/filterSpecialCharacters.js.map +0 -1
- package/lib/_util/getComponentProps.js +0 -14
- package/lib/_util/getComponentProps.js.map +0 -1
- package/lib/_util/getCookie.js +0 -25
- package/lib/_util/getCookie.js.map +0 -1
- package/lib/_util/getDefaultMapInfo.js +0 -51
- package/lib/_util/getDefaultMapInfo.js.map +0 -1
- package/lib/_util/getSystemInfo.js +0 -27
- package/lib/_util/getSystemInfo.js.map +0 -1
- package/lib/_util/getToken.js +0 -29
- package/lib/_util/getToken.js.map +0 -1
- package/lib/_util/getUrlParam.js +0 -16
- package/lib/_util/getUrlParam.js.map +0 -1
- package/lib/_util/http.js +0 -178
- package/lib/_util/http.js.map +0 -1
- package/lib/_util/isFunction.js +0 -10
- package/lib/_util/isFunction.js.map +0 -1
- package/lib/_util/isObject.js +0 -10
- package/lib/_util/isObject.js.map +0 -1
- package/lib/_util/layer.js +0 -156
- package/lib/_util/layer.js.map +0 -1
- package/lib/_util/mapTool.js +0 -189
- package/lib/_util/mapTool.js.map +0 -1
- package/lib/_util/projzh/datum/bd-09.js +0 -45
- package/lib/_util/projzh/datum/bd-09.js.map +0 -1
- package/lib/_util/projzh/datum/gcj-02.js +0 -73
- package/lib/_util/projzh/datum/gcj-02.js.map +0 -1
- package/lib/_util/projzh/datum/index.js +0 -15
- package/lib/_util/projzh/datum/index.js.map +0 -1
- package/lib/_util/projzh/index.js +0 -41
- package/lib/_util/projzh/index.js.map +0 -1
- package/lib/_util/projzh/projection/baidu-mercator.js +0 -75
- package/lib/_util/projzh/projection/baidu-mercator.js.map +0 -1
- package/lib/_util/projzh/projection/index.js +0 -15
- package/lib/_util/projzh/projection/index.js.map +0 -1
- package/lib/_util/projzh/projection/spherical-mercator.js +0 -26
- package/lib/_util/projzh/projection/spherical-mercator.js.map +0 -1
- package/lib/_util/projzh/util.js +0 -28
- package/lib/_util/projzh/util.js.map +0 -1
- package/lib/_util/search.js +0 -133
- package/lib/_util/search.js.map +0 -1
- package/lib/_util/setCookie.js +0 -16
- package/lib/_util/setCookie.js.map +0 -1
- package/lib/_util/stringToFun.js +0 -25
- package/lib/_util/stringToFun.js.map +0 -1
- package/lib/_util/transform.js +0 -170
- package/lib/_util/transform.js.map +0 -1
- package/lib/_util/useColSize.js +0 -29
- package/lib/_util/useColSize.js.map +0 -1
- package/lib/_util/useInterval.js +0 -19
- package/lib/_util/useInterval.js.map +0 -1
- package/lib/_util/useSet.js +0 -45
- package/lib/_util/useSet.js.map +0 -1
- package/lib/analysis-layer/index.js +0 -455
- package/lib/analysis-layer/index.js.map +0 -1
- package/lib/analysis-layer/style/css.js +0 -2
- package/lib/analysis-layer/style/css.js.map +0 -1
- package/lib/analysis-layer/style/index.js +0 -2
- package/lib/analysis-layer/style/index.js.map +0 -1
- 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 +0 -400
- package/lib/buffer-draw/BufferDraw.js.map +0 -1
- package/lib/buffer-draw/index.js +0 -57
- package/lib/buffer-draw/index.js.map +0 -1
- package/lib/buffer-draw/style/css.js +0 -2
- package/lib/buffer-draw/style/css.js.map +0 -1
- package/lib/buffer-draw/style/index.js +0 -2
- package/lib/buffer-draw/style/index.js.map +0 -1
- package/lib/circle/Circle.js +0 -53
- package/lib/circle/Circle.js.map +0 -1
- package/lib/circle/index.js +0 -65
- package/lib/circle/index.js.map +0 -1
- package/lib/circle/style/css.js +0 -2
- package/lib/circle/style/css.js.map +0 -1
- package/lib/circle/style/index.js +0 -2
- package/lib/circle/style/index.js.map +0 -1
- package/lib/config.js +0 -13
- package/lib/config.js.map +0 -1
- package/lib/convertCamelToCSS.js +0 -24
- package/lib/convertCamelToCSS.js.map +0 -1
- package/lib/dom/Dom.js +0 -41
- package/lib/dom/Dom.js.map +0 -1
- package/lib/dom/index.js +0 -62
- package/lib/dom/index.js.map +0 -1
- package/lib/dom/style/css.js +0 -2
- package/lib/dom/style/css.js.map +0 -1
- package/lib/dom/style/index.js +0 -2
- package/lib/dom/style/index.js.map +0 -1
- package/lib/events/index.js +0 -27
- package/lib/events/index.js.map +0 -1
- package/lib/feature-draw/FeatureDraw.js +0 -236
- package/lib/feature-draw/FeatureDraw.js.map +0 -1
- package/lib/feature-draw/index.js +0 -73
- package/lib/feature-draw/index.js.map +0 -1
- package/lib/feature-draw/style/css.js +0 -2
- package/lib/feature-draw/style/css.js.map +0 -1
- package/lib/feature-draw/style/index.js +0 -2
- package/lib/feature-draw/style/index.js.map +0 -1
- package/lib/feature-layer/FeatureLayer.js +0 -1040
- package/lib/feature-layer/FeatureLayer.js.map +0 -1
- package/lib/feature-layer/MyCluster.js +0 -153
- package/lib/feature-layer/MyCluster.js.map +0 -1
- package/lib/feature-layer/createFeatureCollection.js +0 -175
- package/lib/feature-layer/createFeatureCollection.js.map +0 -1
- package/lib/feature-layer/index.js +0 -155
- package/lib/feature-layer/index.js.map +0 -1
- package/lib/feature-layer/style/css.js +0 -4
- package/lib/feature-layer/style/css.js.map +0 -1
- package/lib/feature-layer/style/index.css +0 -0
- package/lib/feature-layer/style/index.js +0 -4
- package/lib/feature-layer/style/index.js.map +0 -1
- package/lib/feature-layer/style/index.less +0 -0
- package/lib/flow-line-layer/FlowLineLayer.js +0 -200
- package/lib/flow-line-layer/FlowLineLayer.js.map +0 -1
- package/lib/flow-line-layer/index.js +0 -127
- package/lib/flow-line-layer/index.js.map +0 -1
- package/lib/flow-line-layer/style/css.js +0 -4
- package/lib/flow-line-layer/style/css.js.map +0 -1
- package/lib/flow-line-layer/style/index.css +0 -0
- package/lib/flow-line-layer/style/index.js +0 -4
- package/lib/flow-line-layer/style/index.js.map +0 -1
- package/lib/flow-line-layer/style/index.less +0 -0
- package/lib/fly-line-layer/FlyLineLayer.js +0 -219
- package/lib/fly-line-layer/FlyLineLayer.js.map +0 -1
- package/lib/fly-line-layer/index.js +0 -109
- package/lib/fly-line-layer/index.js.map +0 -1
- package/lib/fly-line-layer/style/css.js +0 -4
- package/lib/fly-line-layer/style/css.js.map +0 -1
- package/lib/fly-line-layer/style/index.css +0 -0
- package/lib/fly-line-layer/style/index.js +0 -4
- package/lib/fly-line-layer/style/index.js.map +0 -1
- package/lib/fly-line-layer/style/index.less +0 -0
- package/lib/group-layer/GroupLayer.js +0 -133
- package/lib/group-layer/GroupLayer.js.map +0 -1
- package/lib/group-layer/index.js +0 -74
- package/lib/group-layer/index.js.map +0 -1
- package/lib/group-layer/style/css.js +0 -4
- package/lib/group-layer/style/css.js.map +0 -1
- package/lib/group-layer/style/index.css +0 -0
- package/lib/group-layer/style/index.js +0 -4
- package/lib/group-layer/style/index.js.map +0 -1
- package/lib/group-layer/style/index.less +0 -0
- package/lib/heatmap-layer/HeatmapLayer.js +0 -192
- package/lib/heatmap-layer/HeatmapLayer.js.map +0 -1
- package/lib/heatmap-layer/index.js +0 -94
- package/lib/heatmap-layer/index.js.map +0 -1
- package/lib/heatmap-layer/style/css.js +0 -4
- package/lib/heatmap-layer/style/css.js.map +0 -1
- package/lib/heatmap-layer/style/index.css +0 -0
- package/lib/heatmap-layer/style/index.js +0 -4
- package/lib/heatmap-layer/style/index.js.map +0 -1
- package/lib/heatmap-layer/style/index.less +0 -0
- package/lib/high-layer/HighLayer.js +0 -201
- package/lib/high-layer/HighLayer.js.map +0 -1
- package/lib/high-layer/index.js +0 -46
- package/lib/high-layer/index.js.map +0 -1
- package/lib/high-layer/style/css.js +0 -2
- package/lib/high-layer/style/css.js.map +0 -1
- package/lib/high-layer/style/index.js +0 -2
- package/lib/high-layer/style/index.js.map +0 -1
- package/lib/image-layer/ImageLayer.js +0 -332
- package/lib/image-layer/ImageLayer.js.map +0 -1
- package/lib/image-layer/ImageTileLayer.js +0 -334
- package/lib/image-layer/ImageTileLayer.js.map +0 -1
- package/lib/image-layer/index.js +0 -101
- package/lib/image-layer/index.js.map +0 -1
- package/lib/image-layer/style/css.js +0 -4
- package/lib/image-layer/style/css.js.map +0 -1
- package/lib/image-layer/style/index.css +0 -0
- package/lib/image-layer/style/index.js +0 -4
- package/lib/image-layer/style/index.js.map +0 -1
- package/lib/image-layer/style/index.less +0 -0
- package/lib/index.js +0 -201
- package/lib/index.js.map +0 -1
- package/lib/legend/index.js +0 -223
- package/lib/legend/index.js.map +0 -1
- package/lib/legend/style/css.js +0 -8
- package/lib/legend/style/css.js.map +0 -1
- package/lib/legend/style/index.css +0 -74
- package/lib/legend/style/index.js +0 -8
- package/lib/legend/style/index.js.map +0 -1
- package/lib/legend/style/index.less +0 -73
- package/lib/map/Analysis.js +0 -151
- package/lib/map/Analysis.js.map +0 -1
- package/lib/map/Layers.js +0 -341
- package/lib/map/Layers.js.map +0 -1
- package/lib/map/Popup.js +0 -372
- package/lib/map/Popup.js.map +0 -1
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +0 -164
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +0 -1
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +0 -85
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +0 -1
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js +0 -67
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +0 -1
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +0 -86
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +0 -1
- package/lib/map/getBaseLayers/index.js +0 -48
- package/lib/map/getBaseLayers/index.js.map +0 -1
- package/lib/map/index.js +0 -823
- package/lib/map/index.js.map +0 -1
- package/lib/map/style/css.js +0 -5
- package/lib/map/style/css.js.map +0 -1
- package/lib/map/style/index.css +0 -171
- package/lib/map/style/index.js +0 -5
- package/lib/map/style/index.js.map +0 -1
- package/lib/map/style/index.less +0 -152
- package/lib/map-icon/svg/index.js +0 -82
- package/lib/map-icon/svg/index.js.map +0 -1
- package/lib/map-icon/svg/tuceng.svg.js +0 -2
- package/lib/map-icon/svg/tuceng.svg.js.map +0 -1
- package/lib/marker/Marker.js +0 -108
- package/lib/marker/Marker.js.map +0 -1
- package/lib/marker/index.js +0 -62
- package/lib/marker/index.js.map +0 -1
- package/lib/marker/style/css.js +0 -2
- package/lib/marker/style/css.js.map +0 -1
- package/lib/marker/style/index.js +0 -2
- package/lib/marker/style/index.js.map +0 -1
- package/lib/path-line-layer/PathLineLayer.js +0 -47
- package/lib/path-line-layer/PathLineLayer.js.map +0 -1
- package/lib/path-line-layer/getPathLineStyles.js +0 -72
- package/lib/path-line-layer/getPathLineStyles.js.map +0 -1
- package/lib/path-line-layer/index.js +0 -152
- package/lib/path-line-layer/index.js.map +0 -1
- package/lib/path-line-layer/style/css.js +0 -4
- package/lib/path-line-layer/style/css.js.map +0 -1
- package/lib/path-line-layer/style/index.css +0 -0
- package/lib/path-line-layer/style/index.js +0 -4
- package/lib/path-line-layer/style/index.js.map +0 -1
- package/lib/path-line-layer/style/index.less +0 -0
- package/lib/path-play-back/PathPlayBack.js +0 -670
- package/lib/path-play-back/PathPlayBack.js.map +0 -1
- package/lib/path-play-back/index.js +0 -76
- package/lib/path-play-back/index.js.map +0 -1
- package/lib/path-play-back/style/css.js +0 -2
- package/lib/path-play-back/style/css.js.map +0 -1
- package/lib/path-play-back/style/index.js +0 -2
- package/lib/path-play-back/style/index.js.map +0 -1
- package/lib/poi-search/Location.js +0 -63
- package/lib/poi-search/Location.js.map +0 -1
- package/lib/poi-search/PoiList.js +0 -116
- package/lib/poi-search/PoiList.js.map +0 -1
- package/lib/poi-search/Search.js +0 -208
- package/lib/poi-search/Search.js.map +0 -1
- package/lib/poi-search/index.js +0 -174
- package/lib/poi-search/index.js.map +0 -1
- package/lib/poi-search/style/css.js +0 -8
- package/lib/poi-search/style/css.js.map +0 -1
- package/lib/poi-search/style/index.css +0 -96
- package/lib/poi-search/style/index.js +0 -8
- package/lib/poi-search/style/index.js.map +0 -1
- package/lib/poi-search/style/index.less +0 -97
- package/lib/point/Point.js +0 -59
- package/lib/point/Point.js.map +0 -1
- package/lib/point/index.js +0 -62
- package/lib/point/index.js.map +0 -1
- package/lib/point/style/css.js +0 -2
- package/lib/point/style/css.js.map +0 -1
- package/lib/point/style/index.js +0 -2
- package/lib/point/style/index.js.map +0 -1
- package/lib/polygon/Polygon.js +0 -53
- package/lib/polygon/Polygon.js.map +0 -1
- package/lib/polygon/index.js +0 -62
- package/lib/polygon/index.js.map +0 -1
- package/lib/polygon/style/css.js +0 -2
- package/lib/polygon/style/css.js.map +0 -1
- package/lib/polygon/style/index.js +0 -2
- package/lib/polygon/style/index.js.map +0 -1
- package/lib/polyline/Polyline.js +0 -53
- package/lib/polyline/Polyline.js.map +0 -1
- package/lib/polyline/index.js +0 -62
- package/lib/polyline/index.js.map +0 -1
- package/lib/polyline/style/css.js +0 -2
- package/lib/polyline/style/css.js.map +0 -1
- package/lib/polyline/style/index.js +0 -2
- package/lib/polyline/style/index.js.map +0 -1
- package/lib/popup/index.js +0 -204
- package/lib/popup/index.js.map +0 -1
- package/lib/popup/style/css.js +0 -4
- package/lib/popup/style/css.js.map +0 -1
- package/lib/popup/style/index.css +0 -131
- package/lib/popup/style/index.js +0 -4
- package/lib/popup/style/index.js.map +0 -1
- package/lib/popup/style/index.less +0 -129
- package/lib/provider/index.js +0 -14
- package/lib/provider/index.js.map +0 -1
- package/lib/provider/style/css.js +0 -2
- package/lib/provider/style/css.js.map +0 -1
- package/lib/provider/style/index.js +0 -2
- package/lib/provider/style/index.js.map +0 -1
- package/lib/renderer/Fill.js +0 -39
- package/lib/renderer/Fill.js.map +0 -1
- package/lib/renderer/Stroke.js +0 -41
- package/lib/renderer/Stroke.js.map +0 -1
- package/lib/renderer/index.js +0 -140
- package/lib/renderer/index.js.map +0 -1
- package/lib/renderer/style/css.js +0 -4
- package/lib/renderer/style/css.js.map +0 -1
- package/lib/renderer/style/index.css +0 -0
- package/lib/renderer/style/index.js +0 -4
- package/lib/renderer/style/index.js.map +0 -1
- package/lib/renderer/style/index.less +0 -0
- package/lib/renderer/transformRgb.js +0 -34
- package/lib/renderer/transformRgb.js.map +0 -1
- package/lib/search-map/VtxModal.js +0 -205
- package/lib/search-map/VtxModal.js.map +0 -1
- package/lib/search-map/index.js +0 -418
- package/lib/search-map/index.js.map +0 -1
- package/lib/search-map/style/css.js +0 -6
- package/lib/search-map/style/css.js.map +0 -1
- package/lib/search-map/style/index.css +0 -73
- package/lib/search-map/style/index.js +0 -6
- package/lib/search-map/style/index.js.map +0 -1
- package/lib/search-map/style/index.less +0 -83
- package/lib/search-map/style/modal.css +0 -54
- package/lib/search-map/style/modal.less +0 -58
- package/lib/style/index.css +0 -0
- package/lib/style/index.less +0 -2
- package/lib/style/themes/compact.css +0 -0
- package/lib/style/themes/compact.less +0 -1
- package/lib/style/themes/dark.css +0 -0
- package/lib/style/themes/dark.less +0 -9
- package/lib/style/themes/default.css +0 -0
- package/lib/style/themes/default.less +0 -7
- package/lib/style/themes/index.css +0 -0
- package/lib/style/themes/index.less +0 -1
- package/lib/style/themes/variable.css +0 -0
- package/lib/style/themes/variable.less +0 -5
- package/lib/tile-layer/TileLayer.js +0 -88
- package/lib/tile-layer/TileLayer.js.map +0 -1
- package/lib/tile-layer/index.js +0 -53
- package/lib/tile-layer/index.js.map +0 -1
- package/lib/tile-layer/style/css.js +0 -4
- package/lib/tile-layer/style/css.js.map +0 -1
- package/lib/tile-layer/style/index.css +0 -0
- package/lib/tile-layer/style/index.js +0 -4
- package/lib/tile-layer/style/index.js.map +0 -1
- package/lib/tile-layer/style/index.less +0 -0
- package/lib/tools/Layer/LayerService.js +0 -183
- package/lib/tools/Layer/LayerService.js.map +0 -1
- package/lib/tools/Layer/LayersCheckService.js +0 -195
- package/lib/tools/Layer/LayersCheckService.js.map +0 -1
- package/lib/tools/Layer/index.css +0 -50
- package/lib/tools/Layer/index.js +0 -226
- package/lib/tools/Layer/index.js.map +0 -1
- package/lib/tools/Layer/index.less +0 -43
- package/lib/tools/Search/index.js +0 -298
- package/lib/tools/Search/index.js.map +0 -1
- package/lib/tools/Toolbox/BoxSelect/index.js +0 -20
- package/lib/tools/Toolbox/BoxSelect/index.js.map +0 -1
- package/lib/tools/Toolbox/CircleSelect/index.js +0 -20
- package/lib/tools/Toolbox/CircleSelect/index.js.map +0 -1
- package/lib/tools/Toolbox/EagleEye/index.js +0 -57
- package/lib/tools/Toolbox/EagleEye/index.js.map +0 -1
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +0 -153
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +0 -1
- package/lib/tools/Toolbox/MapBookmark/index.css +0 -18
- package/lib/tools/Toolbox/MapBookmark/index.js +0 -430
- package/lib/tools/Toolbox/MapBookmark/index.js.map +0 -1
- package/lib/tools/Toolbox/MapBookmark/index.less +0 -20
- package/lib/tools/Toolbox/MapDownload/index.js +0 -16
- package/lib/tools/Toolbox/MapDownload/index.js.map +0 -1
- package/lib/tools/Toolbox/MapPrint/index.css +0 -4
- package/lib/tools/Toolbox/MapPrint/index.js +0 -234
- package/lib/tools/Toolbox/MapPrint/index.js.map +0 -1
- package/lib/tools/Toolbox/MapPrint/index.less +0 -4
- package/lib/tools/Toolbox/Measure/Area/index.js +0 -17
- package/lib/tools/Toolbox/Measure/Area/index.js.map +0 -1
- package/lib/tools/Toolbox/Measure/Distance/index.js +0 -17
- package/lib/tools/Toolbox/Measure/Distance/index.js.map +0 -1
- package/lib/tools/Toolbox/Measure/Measure.js +0 -229
- package/lib/tools/Toolbox/Measure/Measure.js.map +0 -1
- package/lib/tools/Toolbox/Measure/index.js +0 -77
- package/lib/tools/Toolbox/Measure/index.js.map +0 -1
- package/lib/tools/Toolbox/PolygonSelect/index.js +0 -20
- package/lib/tools/Toolbox/PolygonSelect/index.js.map +0 -1
- package/lib/tools/Toolbox/ScaleLine/index.js +0 -59
- package/lib/tools/Toolbox/ScaleLine/index.js.map +0 -1
- package/lib/tools/Toolbox/SelectTools/index.css +0 -103
- package/lib/tools/Toolbox/SelectTools/index.js +0 -779
- package/lib/tools/Toolbox/SelectTools/index.js.map +0 -1
- package/lib/tools/Toolbox/SelectTools/index.less +0 -87
- package/lib/tools/Toolbox/SpaceQuery/index.css +0 -19
- package/lib/tools/Toolbox/SpaceQuery/index.js +0 -593
- package/lib/tools/Toolbox/SpaceQuery/index.js.map +0 -1
- package/lib/tools/Toolbox/SpaceQuery/index.less +0 -16
- package/lib/tools/Toolbox/ZoomInput/index.css +0 -6
- package/lib/tools/Toolbox/ZoomInput/index.js +0 -50
- package/lib/tools/Toolbox/ZoomInput/index.js.map +0 -1
- package/lib/tools/Toolbox/ZoomInput/index.less +0 -6
- package/lib/tools/Toolbox/index.css +0 -0
- package/lib/tools/Toolbox/index.js +0 -172
- package/lib/tools/Toolbox/index.js.map +0 -1
- package/lib/tools/Toolbox/index.less +0 -2
- package/lib/tools/Utils/CreateOverlay.js +0 -47
- package/lib/tools/Utils/CreateOverlay.js.map +0 -1
- package/lib/tools/Utils/Draw.js +0 -130
- package/lib/tools/Utils/Draw.js.map +0 -1
- package/lib/tools/Utils/HighLayer.js +0 -213
- package/lib/tools/Utils/HighLayer.js.map +0 -1
- package/lib/tools/Utils/measure.js +0 -247
- package/lib/tools/Utils/measure.js.map +0 -1
- package/lib/tools/Utils/utils.js +0 -272
- package/lib/tools/Utils/utils.js.map +0 -1
- package/lib/tools/View/index.css +0 -35
- package/lib/tools/View/index.js +0 -166
- package/lib/tools/View/index.js.map +0 -1
- package/lib/tools/View/index.less +0 -28
- package/lib/tools/analysis-tool/index.js +0 -113
- package/lib/tools/analysis-tool/index.js.map +0 -1
- package/lib/tools/base-map-switch/index.js +0 -150
- package/lib/tools/base-map-switch/index.js.map +0 -1
- package/lib/tools/components/Chart/index.js +0 -828
- package/lib/tools/components/Chart/index.js.map +0 -1
- package/lib/tools/components/Icon/index.js +0 -32
- package/lib/tools/components/Icon/index.js.map +0 -1
- package/lib/tools/components/Info/index.css +0 -39
- package/lib/tools/components/Info/index.js +0 -35
- package/lib/tools/components/Info/index.js.map +0 -1
- package/lib/tools/components/Info/index.less +0 -26
- package/lib/tools/components/ItemWrap/index.css +0 -43
- package/lib/tools/components/ItemWrap/index.js +0 -48
- package/lib/tools/components/ItemWrap/index.js.map +0 -1
- package/lib/tools/components/ItemWrap/index.less +0 -41
- package/lib/tools/components/Modal/index.css +0 -42
- package/lib/tools/components/Modal/index.js +0 -46
- package/lib/tools/components/Modal/index.js.map +0 -1
- package/lib/tools/components/Modal/index.less +0 -33
- package/lib/tools/components/MyTabs/index.js +0 -22
- package/lib/tools/components/MyTabs/index.js.map +0 -1
- package/lib/tools/components/RequiredLabel/index.css +0 -5
- package/lib/tools/components/RequiredLabel/index.js +0 -32
- package/lib/tools/components/RequiredLabel/index.js.map +0 -1
- package/lib/tools/components/RequiredLabel/index.less +0 -5
- package/lib/tools/components/Select/index.js +0 -33
- package/lib/tools/components/Select/index.js.map +0 -1
- package/lib/tools/components/Table/assets/tableIcon.png +0 -0
- package/lib/tools/components/Table/index.css +0 -10
- package/lib/tools/components/Table/index.js +0 -91
- package/lib/tools/components/Table/index.js.map +0 -1
- package/lib/tools/components/Table/index.less +0 -13
- package/lib/tools/components/ToolItem/index.css +0 -30
- package/lib/tools/components/ToolItem/index.js +0 -29
- package/lib/tools/components/ToolItem/index.js.map +0 -1
- package/lib/tools/components/ToolItem/index.less +0 -27
- package/lib/tools/components/ToolsSelect/index.css +0 -15
- package/lib/tools/components/ToolsSelect/index.js +0 -45
- package/lib/tools/components/ToolsSelect/index.js.map +0 -1
- package/lib/tools/components/ToolsSelect/index.less +0 -10
- package/lib/tools/full-screen/index.js +0 -47
- package/lib/tools/full-screen/index.js.map +0 -1
- package/lib/tools/index.js +0 -151
- package/lib/tools/index.js.map +0 -1
- package/lib/tools/layer-control/index.js +0 -173
- package/lib/tools/layer-control/index.js.map +0 -1
- package/lib/tools/refresh/index.js +0 -41
- package/lib/tools/refresh/index.js.map +0 -1
- package/lib/tools/style/css.js +0 -22
- package/lib/tools/style/css.js.map +0 -1
- package/lib/tools/style/index.css +0 -136
- package/lib/tools/style/index.js +0 -22
- package/lib/tools/style/index.js.map +0 -1
- package/lib/tools/style/index.less +0 -154
- package/lib/tools-item/index.js +0 -67
- package/lib/tools-item/index.js.map +0 -1
- package/lib/use-props/index.js +0 -15
- package/lib/use-props/index.js.map +0 -1
- package/lib/use-props/style/css.js +0 -2
- package/lib/use-props/style/css.js.map +0 -1
- package/lib/use-props/style/index.js +0 -2
- package/lib/use-props/style/index.js.map +0 -1
- package/lib/wms-layer/WmsLayer.js +0 -315
- package/lib/wms-layer/WmsLayer.js.map +0 -1
- package/lib/wms-layer/index.js +0 -98
- package/lib/wms-layer/index.js.map +0 -1
- package/lib/wms-layer/style/css.js +0 -4
- package/lib/wms-layer/style/css.js.map +0 -1
- package/lib/wms-layer/style/index.css +0 -0
- package/lib/wms-layer/style/index.js +0 -4
- package/lib/wms-layer/style/index.js.map +0 -1
- package/lib/wms-layer/style/index.less +0 -0
package/lib/circle/index.js
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
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 _ol = require("ol");
|
|
10
|
-
var _geom = require("ol/geom");
|
|
11
|
-
var _ahooks = require("ahooks");
|
|
12
|
-
var _Circle = _interopRequireDefault(require("./Circle"));
|
|
13
|
-
var _events = require("../events");
|
|
14
|
-
var _useProps2 = _interopRequireDefault(require("../use-props"));
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
16
|
-
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); }
|
|
17
|
-
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; }
|
|
18
|
-
function _default(props) {
|
|
19
|
-
var data = props.data,
|
|
20
|
-
property = props.property,
|
|
21
|
-
style = props.style;
|
|
22
|
-
var _useProps = (0, _useProps2["default"])(),
|
|
23
|
-
featureLayer = _useProps.featureLayer,
|
|
24
|
-
map = _useProps.map;
|
|
25
|
-
var featureRef = (0, _react.useRef)();
|
|
26
|
-
(0, _react.useEffect)(function () {
|
|
27
|
-
var feature = new _ol.Feature();
|
|
28
|
-
if ((data === null || data === void 0 ? void 0 : data.length) == 3) {
|
|
29
|
-
var metersPerUnit = map.getView().getProjection().getMetersPerUnit();
|
|
30
|
-
var geometry = new _geom.Circle([data[0], data[1]], data[2] / metersPerUnit, 'XY');
|
|
31
|
-
feature.setGeometry(geometry);
|
|
32
|
-
}
|
|
33
|
-
if (style) {
|
|
34
|
-
feature.setStyle(new _Circle["default"](style));
|
|
35
|
-
}
|
|
36
|
-
if (property) {
|
|
37
|
-
feature.setProperties(property);
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
// 注册事件;
|
|
41
|
-
(0, _events.registerEventGeometry)(feature, props);
|
|
42
|
-
featureLayer.getSource().addFeature(feature);
|
|
43
|
-
featureRef.current = feature;
|
|
44
|
-
return function () {
|
|
45
|
-
featureLayer.getSource().removeFeature(feature);
|
|
46
|
-
};
|
|
47
|
-
}, []);
|
|
48
|
-
(0, _ahooks.useUpdateEffect)(function () {
|
|
49
|
-
if ((data === null || data === void 0 ? void 0 : data.length) == 3) {
|
|
50
|
-
var metersPerUnit = map.getView().getProjection().getMetersPerUnit();
|
|
51
|
-
var geometry = new _geom.Circle([data[0], data[1]], data[2] / metersPerUnit, 'XY');
|
|
52
|
-
featureRef.current.setGeometry(geometry);
|
|
53
|
-
}
|
|
54
|
-
}, [JSON.stringify(data)]);
|
|
55
|
-
(0, _ahooks.useUpdateEffect)(function () {
|
|
56
|
-
featureRef.current.setProperties(property);
|
|
57
|
-
}, [JSON.stringify(property)]);
|
|
58
|
-
(0, _ahooks.useUpdateEffect)(function () {
|
|
59
|
-
if (style) {
|
|
60
|
-
featureRef.current.setStyle(new _Circle["default"](style));
|
|
61
|
-
}
|
|
62
|
-
}, [JSON.stringify(style)]);
|
|
63
|
-
return /*#__PURE__*/_react["default"].createElement(_react["default"].Fragment, null);
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=index.js.map
|
package/lib/circle/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_ol","_geom","_ahooks","_Circle","_interopRequireDefault","_events","_useProps2","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","_default","props","data","property","style","_useProps","useProps","featureLayer","map","featureRef","useRef","useEffect","feature","Feature","length","metersPerUnit","getView","getProjection","getMetersPerUnit","geometry","CircleGeo","setGeometry","setStyle","CircleStyle","setProperties","registerEventGeometry","getSource","addFeature","current","removeFeature","useUpdateEffect","JSON","stringify","createElement","Fragment"],"sources":["circle/index.jsx"],"sourcesContent":["import React, { useRef, useEffect } from 'react';\r\nimport { Feature } from 'ol';\r\nimport { Circle as CircleGeo } from 'ol/geom';\r\nimport { useUpdateEffect } from 'ahooks';\r\nimport CircleStyle from './Circle';\r\nimport { registerEventGeometry } from '../events';\r\nimport useProps from '../use-props';\r\n\r\nexport default function(props) {\r\n const { data, property, style } = props;\r\n\r\n const { featureLayer, map } = useProps();\r\n const featureRef = useRef();\r\n\r\n useEffect(() => {\r\n let feature = new Feature();\r\n if (data?.length == 3) {\r\n const metersPerUnit = map\r\n .getView()\r\n .getProjection()\r\n .getMetersPerUnit();\r\n let geometry = new CircleGeo([data[0], data[1]], data[2] / metersPerUnit, 'XY');\r\n\r\n feature.setGeometry(geometry);\r\n }\r\n\r\n if (style) {\r\n feature.setStyle(new CircleStyle(style));\r\n }\r\n\r\n if (property) {\r\n feature.setProperties(property);\r\n }\r\n\r\n // 注册事件;\r\n registerEventGeometry(feature, props);\r\n\r\n featureLayer.getSource().addFeature(feature);\r\n\r\n featureRef.current = feature;\r\n\r\n return () => {\r\n featureLayer.getSource().removeFeature(feature);\r\n };\r\n }, []);\r\n\r\n useUpdateEffect(() => {\r\n if (data?.length == 3) {\r\n const metersPerUnit = map\r\n .getView()\r\n .getProjection()\r\n .getMetersPerUnit();\r\n let geometry = new CircleGeo([data[0], data[1]], data[2] / metersPerUnit, 'XY');\r\n featureRef.current.setGeometry(geometry);\r\n }\r\n }, [JSON.stringify(data)]);\r\n\r\n useUpdateEffect(() => {\r\n featureRef.current.setProperties(property);\r\n }, [JSON.stringify(property)]);\r\n\r\n useUpdateEffect(() => {\r\n if (style) {\r\n featureRef.current.setStyle(new CircleStyle(style));\r\n }\r\n }, [JSON.stringify(style)]);\r\n\r\n return <></>;\r\n}\r\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AACA,IAAAE,KAAA,GAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAF,sBAAA,CAAAL,OAAA;AAAoC,SAAAK,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,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,OAAO,CAAC,CAAC,CACTC,aAAa,CAAC,CAAC,CACfC,gBAAgB,CAAC,CAAC;MACvB,IAAIC,QAAQ,GAAG,IAAIC,YAAS,CAAC,CAAClB,IAAI,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,CAAC,CAAC,CAAC,EAAEA,IAAI,CAAC,CAAC,CAAC,GAAGa,aAAa,EAAE,IAAI,CAAC;MAC/EN,UAAU,CAACmB,OAAO,CAACP,WAAW,CAACF,QAAQ,CAAC;IAC5C;EACJ,CAAC,EAAE,CAACY,IAAI,CAACC,SAAS,CAAC9B,IAAI,CAAC,CAAC,CAAC;EAE1B,IAAA4B,uBAAe,EAAC,YAAM;IAClBrB,UAAU,CAACmB,OAAO,CAACJ,aAAa,CAACrB,QAAQ,CAAC;EAC9C,CAAC,EAAE,CAAC4B,IAAI,CAACC,SAAS,CAAC7B,QAAQ,CAAC,CAAC,CAAC;EAE9B,IAAA2B,uBAAe,EAAC,YAAM;IAClB,IAAI1B,KAAK,EAAE;MACPK,UAAU,CAACmB,OAAO,CAACN,QAAQ,CAAC,IAAIC,kBAAW,CAACnB,KAAK,CAAC,CAAC;IACvD;EACJ,CAAC,EAAE,CAAC2B,IAAI,CAACC,SAAS,CAAC5B,KAAK,CAAC,CAAC,CAAC;EAE3B,oBAAOpC,MAAA,YAAAiE,aAAA,CAAAjE,MAAA,YAAAkE,QAAA,MAAI,CAAC;AAChB"}
|
package/lib/circle/style/css.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["circle/style/index.js"],"sourcesContent":[""],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["circle/style/index.js"],"sourcesContent":[""],"mappings":""}
|
package/lib/config.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
var globalCfg = window.VtxPublicServiceAddress || {};
|
|
8
|
-
var _default = {
|
|
9
|
-
// ztree文件地址
|
|
10
|
-
ztreeServer: globalCfg.ztreeServer ? globalCfg.ztreeServer : '//vortexplugin.cloudhw.cn/ztree'
|
|
11
|
-
};
|
|
12
|
-
exports["default"] = _default;
|
|
13
|
-
//# sourceMappingURL=config.js.map
|
package/lib/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","names":["globalCfg","window","VtxPublicServiceAddress","_default","ztreeServer","exports"],"sources":["config.js"],"sourcesContent":["const globalCfg = window.VtxPublicServiceAddress || {};\n\nexport default {\n // ztree文件地址\n ztreeServer: globalCfg.ztreeServer ? globalCfg.ztreeServer : '//vortexplugin.cloudhw.cn/ztree',\n};\n"],"mappings":";;;;;;AAAA,IAAMA,SAAS,GAAGC,MAAM,CAACC,uBAAuB,IAAI,CAAC,CAAC;AAAC,IAAAC,QAAA,GAExC;EACX;EACAC,WAAW,EAAEJ,SAAS,CAACI,WAAW,GAAGJ,SAAS,CAACI,WAAW,GAAG;AACjE,CAAC;AAAAC,OAAA,cAAAF,QAAA"}
|
package/lib/convertCamelToCSS.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
// 将 jsx 的 style 小驼峰的 key 属性,转化为 cssText 的 -
|
|
8
|
-
var convertCamelToCSS = function convertCamelToCSS(style) {
|
|
9
|
-
var cssText = '';
|
|
10
|
-
for (var property in style) {
|
|
11
|
-
if (style.hasOwnProperty(property)) {
|
|
12
|
-
var value = style[property];
|
|
13
|
-
if (value && typeof value === 'number' && !isNaN(value)) {
|
|
14
|
-
value = value + 'px';
|
|
15
|
-
}
|
|
16
|
-
var cssProperty = property.replace(/([A-Z])/g, '-$1').toLowerCase();
|
|
17
|
-
cssText += "".concat(cssProperty, ": ").concat(value, "; ");
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
return cssText;
|
|
21
|
-
};
|
|
22
|
-
var _default = convertCamelToCSS;
|
|
23
|
-
exports["default"] = _default;
|
|
24
|
-
//# sourceMappingURL=convertCamelToCSS.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"convertCamelToCSS.js","names":["convertCamelToCSS","style","cssText","property","hasOwnProperty","value","isNaN","cssProperty","replace","toLowerCase","concat","_default","exports"],"sources":["convertCamelToCSS.js"],"sourcesContent":["// 将 jsx 的 style 小驼峰的 key 属性,转化为 cssText 的 -\nconst convertCamelToCSS = (style) => {\n let cssText = '';\n for (let property in style) {\n if (style.hasOwnProperty(property)) {\n let value = style[property];\n if (value && typeof value === 'number' && !isNaN(value)) {\n value = value + 'px';\n }\n let cssProperty = property.replace(/([A-Z])/g, '-$1').toLowerCase();\n cssText += `${cssProperty}: ${value}; `;\n }\n }\n\n return cssText;\n}\n\nexport default convertCamelToCSS;\n"],"mappings":";;;;;;AAAA;AACA,IAAMA,iBAAiB,GAAG,SAApBA,iBAAiBA,CAAIC,KAAK,EAAK;EACjC,IAAIC,OAAO,GAAG,EAAE;EAChB,KAAK,IAAIC,QAAQ,IAAIF,KAAK,EAAE;IACxB,IAAIA,KAAK,CAACG,cAAc,CAACD,QAAQ,CAAC,EAAE;MAChC,IAAIE,KAAK,GAAGJ,KAAK,CAACE,QAAQ,CAAC;MAC3B,IAAIE,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,IAAI,CAACC,KAAK,CAACD,KAAK,CAAC,EAAE;QACrDA,KAAK,GAAGA,KAAK,GAAG,IAAI;MACxB;MACA,IAAIE,WAAW,GAAGJ,QAAQ,CAACK,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAACC,WAAW,CAAC,CAAC;MACnEP,OAAO,OAAAQ,MAAA,CAAOH,WAAW,QAAAG,MAAA,CAAKL,KAAK,OAAI;IAC3C;EACJ;EAEA,OAAOH,OAAO;AAClB,CAAC;AAAA,IAAAS,QAAA,GAEcX,iBAAiB;AAAAY,OAAA,cAAAD,QAAA"}
|
package/lib/dom/Dom.js
DELETED
|
@@ -1,41 +0,0 @@
|
|
|
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"] = void 0;
|
|
8
|
-
var _ol = require("ol");
|
|
9
|
-
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; }
|
|
10
|
-
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; }
|
|
11
|
-
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; }
|
|
12
|
-
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); } }
|
|
13
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
14
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
15
|
-
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); }
|
|
16
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
17
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
18
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
19
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
20
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
21
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
22
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
23
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
24
|
-
var _default = /*#__PURE__*/function (_Overlay) {
|
|
25
|
-
_inherits(_default, _Overlay);
|
|
26
|
-
var _super = _createSuper(_default);
|
|
27
|
-
function _default(options) {
|
|
28
|
-
var _this;
|
|
29
|
-
_classCallCheck(this, _default);
|
|
30
|
-
var _options = _objectSpread({}, options);
|
|
31
|
-
if (options.stopEvent) {
|
|
32
|
-
_options.className = 'ol-overlay_container-stop_event';
|
|
33
|
-
}
|
|
34
|
-
_this = _super.call(this, _options);
|
|
35
|
-
_this.type = 'Dom';
|
|
36
|
-
return _this;
|
|
37
|
-
}
|
|
38
|
-
return _createClass(_default);
|
|
39
|
-
}(_ol.Overlay);
|
|
40
|
-
exports["default"] = _default;
|
|
41
|
-
//# sourceMappingURL=Dom.js.map
|
package/lib/dom/Dom.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Dom.js","names":["_ol","require","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","obj","value","_toPropertyKey","configurable","writable","_defineProperties","props","descriptor","_createClass","Constructor","protoProps","staticProps","prototype","arg","_toPrimitive","_typeof","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","TypeError","Number","_classCallCheck","instance","_inherits","subClass","superClass","create","constructor","_setPrototypeOf","o","p","setPrototypeOf","bind","__proto__","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","_createSuperInternal","Super","_getPrototypeOf","result","NewTarget","Reflect","construct","_possibleConstructorReturn","self","_assertThisInitialized","ReferenceError","sham","Proxy","Boolean","valueOf","e","getPrototypeOf","_default","_Overlay","_super","options","_this","_options","stopEvent","className","type","Overlay","exports"],"sources":["dom/Dom.js"],"sourcesContent":["import { Overlay } from 'ol';\n\nexport default class extends Overlay {\n constructor(options) {\n const _options = {...options};\n if (options.stopEvent) {\n _options.className = 'ol-overlay_container-stop_event';\n }\n super(_options);\n\n this.type = 'Dom';\n }\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AAA6B,SAAAC,QAAAC,MAAA,EAAAC,cAAA,QAAAC,IAAA,GAAAC,MAAA,CAAAD,IAAA,CAAAF,MAAA,OAAAG,MAAA,CAAAC,qBAAA,QAAAC,OAAA,GAAAF,MAAA,CAAAC,qBAAA,CAAAJ,MAAA,GAAAC,cAAA,KAAAI,OAAA,GAAAA,OAAA,CAAAC,MAAA,WAAAC,GAAA,WAAAJ,MAAA,CAAAK,wBAAA,CAAAR,MAAA,EAAAO,GAAA,EAAAE,UAAA,OAAAP,IAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,IAAA,EAAAG,OAAA,YAAAH,IAAA;AAAA,SAAAU,cAAAC,MAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAC,SAAA,CAAAC,MAAA,EAAAF,CAAA,UAAAG,MAAA,WAAAF,SAAA,CAAAD,CAAA,IAAAC,SAAA,CAAAD,CAAA,QAAAA,CAAA,OAAAf,OAAA,CAAAI,MAAA,CAAAc,MAAA,OAAAC,OAAA,WAAAC,GAAA,IAAAC,eAAA,CAAAP,MAAA,EAAAM,GAAA,EAAAF,MAAA,CAAAE,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AMK,QAAQ,GAAA9E,aAAA,KAAO4E,OAAO,CAAC;IAC7B,IAAIA,OAAO,CAACG,SAAS,EAAE;MACnBD,QAAQ,CAACE,SAAS,GAAG,iCAAiC;IAC1D;IACAH,KAAA,GAAAF,MAAA,CAAAvC,IAAA,OAAM0C,QAAQ;IAEdD,KAAA,CAAKI,IAAI,GAAG,KAAK;IAAC,OAAAJ,KAAA;EACtB;EAAC,OAAAzD,YAAA,CAAAqD,QAAA;AAAA,EATwBS,WAAO;AAAAC,OAAA,cAAAV,QAAA"}
|
package/lib/dom/index.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
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 _ahooks = require("ahooks");
|
|
10
|
-
var _useProps2 = _interopRequireDefault(require("../use-props"));
|
|
11
|
-
var _Dom = _interopRequireDefault(require("./Dom"));
|
|
12
|
-
var _excluded = ["data", "style", "className", "show", "children"];
|
|
13
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
14
|
-
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); }
|
|
15
|
-
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; }
|
|
16
|
-
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; }
|
|
17
|
-
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; }
|
|
18
|
-
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; }
|
|
19
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
20
|
-
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); }
|
|
21
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
22
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
23
|
-
function _default(props) {
|
|
24
|
-
var data = props.data,
|
|
25
|
-
style = props.style,
|
|
26
|
-
className = props.className,
|
|
27
|
-
_props$show = props.show,
|
|
28
|
-
show = _props$show === void 0 ? true : _props$show,
|
|
29
|
-
children = props.children,
|
|
30
|
-
otherProps = _objectWithoutProperties(props, _excluded);
|
|
31
|
-
var _useProps = (0, _useProps2["default"])(),
|
|
32
|
-
map = _useProps.map;
|
|
33
|
-
var domRef = (0, _react.useRef)();
|
|
34
|
-
var overlay = (0, _react.useRef)();
|
|
35
|
-
(0, _react.useEffect)(function () {
|
|
36
|
-
overlay.current = new _Dom["default"](_objectSpread({
|
|
37
|
-
element: domRef.current,
|
|
38
|
-
position: data,
|
|
39
|
-
positioning: "bottom-center",
|
|
40
|
-
offset: [0, -10]
|
|
41
|
-
}, otherProps));
|
|
42
|
-
|
|
43
|
-
// 将Overlay添加到地图上
|
|
44
|
-
map.addOverlay(overlay.current);
|
|
45
|
-
return function () {
|
|
46
|
-
map.removeOverlay(overlay.current);
|
|
47
|
-
};
|
|
48
|
-
}, []);
|
|
49
|
-
(0, _ahooks.useUpdateEffect)(function () {
|
|
50
|
-
overlay.current.setPosition(data);
|
|
51
|
-
}, [JSON.stringify(data)]);
|
|
52
|
-
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
53
|
-
style: {
|
|
54
|
-
display: show ? 'block' : 'none'
|
|
55
|
-
}
|
|
56
|
-
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
57
|
-
ref: domRef,
|
|
58
|
-
style: _objectSpread({}, style),
|
|
59
|
-
className: className
|
|
60
|
-
}, children));
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=index.js.map
|
package/lib/dom/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_ahooks","_useProps2","_interopRequireDefault","_Dom","_excluded","obj","__esModule","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","ownKeys","object","enumerableOnly","keys","getOwnPropertySymbols","symbols","filter","sym","enumerable","push","apply","_objectSpread","target","i","arguments","length","source","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","Symbol","toPrimitive","undefined","res","TypeError","Number","_objectWithoutProperties","excluded","_objectWithoutPropertiesLoose","sourceSymbolKeys","indexOf","propertyIsEnumerable","sourceKeys","_default","props","data","style","className","_props$show","show","children","otherProps","_useProps","useProps","map","domRef","useRef","overlay","useEffect","current","Dom","element","position","positioning","offset","addOverlay","removeOverlay","useUpdateEffect","setPosition","JSON","stringify","createElement","display","ref"],"sources":["dom/index.jsx"],"sourcesContent":["import React, {useRef, useEffect} from 'react';\nimport { useUpdateEffect } from 'ahooks';\nimport useProps from '../use-props';\nimport Dom from './Dom';\n\nexport default function (props) {\n const { data, style, className, show = true, children, ...otherProps } = props;\n const { map } = useProps();\n\n const domRef = useRef();\n const overlay = useRef();\n useEffect(() => {\n overlay.current = new Dom({\n element: domRef.current,\n position: data,\n positioning: \"bottom-center\",\n offset: [0, -10],\n ...otherProps\n });\n\n // 将Overlay添加到地图上\n map.addOverlay(overlay.current);\n\n return () => {\n map.removeOverlay(overlay.current);\n }\n }, []);\n\n useUpdateEffect(() => {\n overlay.current.setPosition(data)\n }, [JSON.stringify(data)])\n\n return (\n <div style={{display: show ? 'block' : 'none'}}>\n <div ref={domRef} style={{...style}} className={className}>\n {children}\n </div>\n </div>\n\n )\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,IAAA,GAAAD,sBAAA,CAAAH,OAAA;AAAwB,IAAAK,SAAA;AAAA,SAAAF,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAV,wBAAAO,GAAA,EAAAG,WAAA,SAAAA,WAAA,IAAAH,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAO,OAAA,CAAAP,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAQ,KAAA,GAAAN,wBAAA,CAAAC,WAAA,OAAAK,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAT,GAAA,YAAAQ,KAAA,CAAAE,GAAA,CAAAV,GAAA,SAAAW,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAhB,GAAA,QAAAgB,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAnB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AAD,aAAM,EAAC,CAAC;EACxB,IAAAE,gBAAS,EAAC,YAAM;IACZD,OAAO,CAACE,OAAO,GAAG,IAAIC,eAAG,CAAAlD,aAAA;MACrBmD,OAAO,EAAEN,MAAM,CAACI,OAAO;MACvBG,QAAQ,EAAEjB,IAAI;MACdkB,WAAW,EAAE,eAAe;MAC5BC,MAAM,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE;IAAC,GACbb,UAAU,CAChB,CAAC;;IAEF;IACAG,GAAG,CAACW,UAAU,CAACR,OAAO,CAACE,OAAO,CAAC;IAE/B,OAAO,YAAM;MACTL,GAAG,CAACY,aAAa,CAACT,OAAO,CAACE,OAAO,CAAC;IACtC,CAAC;EACL,CAAC,EAAE,EAAE,CAAC;EAEN,IAAAQ,uBAAe,EAAC,YAAM;IAClBV,OAAO,CAACE,OAAO,CAACS,WAAW,CAACvB,IAAI,CAAC;EACrC,CAAC,EAAE,CAACwB,IAAI,CAACC,SAAS,CAACzB,IAAI,CAAC,CAAC,CAAC;EAE1B,oBACI5E,MAAA,YAAAsG,aAAA;IAAKzB,KAAK,EAAE;MAAC0B,OAAO,EAAEvB,IAAI,GAAG,OAAO,GAAG;IAAM;EAAE,gBAC3ChF,MAAA,YAAAsG,aAAA;IAAKE,GAAG,EAAElB,MAAO;IAACT,KAAK,EAAApC,aAAA,KAAMoC,KAAK,CAAE;IAACC,SAAS,EAAEA;EAAU,GACrDG,QACA,CACJ,CAAC;AAGd"}
|
package/lib/dom/style/css.js
DELETED
package/lib/dom/style/css.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["dom/style/index.js"],"sourcesContent":[""],"mappings":""}
|
package/lib/dom/style/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["dom/style/index.js"],"sourcesContent":[""],"mappings":""}
|
package/lib/events/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.registerEventLayer = exports.registerEventGeometry = void 0;
|
|
7
|
-
var EVENT = ['onClick', 'onDoubleClick', 'onMouseEnter', 'onMouseMove', 'onMouseLeave'];
|
|
8
|
-
|
|
9
|
-
// 注册鼠标事件
|
|
10
|
-
var registerEventGeometry = function registerEventGeometry(layer, props) {
|
|
11
|
-
EVENT.map(function (v) {
|
|
12
|
-
layer[v] = function () {
|
|
13
|
-
var options = layer.getProperties();
|
|
14
|
-
props[v] && props[v](options);
|
|
15
|
-
};
|
|
16
|
-
});
|
|
17
|
-
};
|
|
18
|
-
exports.registerEventGeometry = registerEventGeometry;
|
|
19
|
-
var registerEventLayer = function registerEventLayer(layer, props) {
|
|
20
|
-
EVENT.map(function (v) {
|
|
21
|
-
layer[v] = function (e, a) {
|
|
22
|
-
props[v] && props[v](e, a);
|
|
23
|
-
};
|
|
24
|
-
});
|
|
25
|
-
};
|
|
26
|
-
exports.registerEventLayer = registerEventLayer;
|
|
27
|
-
//# sourceMappingURL=index.js.map
|
package/lib/events/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["EVENT","registerEventGeometry","layer","props","map","v","options","getProperties","exports","registerEventLayer","e","a"],"sources":["events/index.js"],"sourcesContent":["const EVENT = ['onClick', 'onDoubleClick', 'onMouseEnter', 'onMouseMove', 'onMouseLeave'];\n\n// 注册鼠标事件\nexport const registerEventGeometry = (layer, props) => {\n EVENT.map(v => {\n layer[v] = () => {\n let options = layer.getProperties();\n props[v] && props[v](options);\n };\n });\n};\n\nexport const registerEventLayer = (layer, props) => {\n EVENT.map(v => {\n layer[v] = (e, a) => {\n props[v] && props[v](e, a);\n };\n });\n};\n"],"mappings":";;;;;;AAAA,IAAMA,KAAK,GAAG,CAAC,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,CAAC;;AAEzF;AACO,IAAMC,qBAAqB,GAAG,SAAxBA,qBAAqBA,CAAIC,KAAK,EAAEC,KAAK,EAAK;EACnDH,KAAK,CAACI,GAAG,CAAC,UAAAC,CAAC,EAAI;IACXH,KAAK,CAACG,CAAC,CAAC,GAAG,YAAM;MACb,IAAIC,OAAO,GAAGJ,KAAK,CAACK,aAAa,CAAC,CAAC;MACnCJ,KAAK,CAACE,CAAC,CAAC,IAAIF,KAAK,CAACE,CAAC,CAAC,CAACC,OAAO,CAAC;IACjC,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACE,OAAA,CAAAP,qBAAA,GAAAA,qBAAA;AAEK,IAAMQ,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAIP,KAAK,EAAEC,KAAK,EAAK;EAChDH,KAAK,CAACI,GAAG,CAAC,UAAAC,CAAC,EAAI;IACXH,KAAK,CAACG,CAAC,CAAC,GAAG,UAACK,CAAC,EAAEC,CAAC,EAAK;MACjBR,KAAK,CAACE,CAAC,CAAC,IAAIF,KAAK,CAACE,CAAC,CAAC,CAACK,CAAC,EAAEC,CAAC,CAAC;IAC9B,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACH,OAAA,CAAAC,kBAAA,GAAAA,kBAAA"}
|
|
@@ -1,236 +0,0 @@
|
|
|
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.drawStyle = exports["default"] = void 0;
|
|
8
|
-
var _layer = require("ol/layer");
|
|
9
|
-
var _source = require("ol/source");
|
|
10
|
-
var _interaction = require("ol/interaction");
|
|
11
|
-
var _Draw2 = require("ol/interaction/Draw");
|
|
12
|
-
var _style4 = require("ol/style");
|
|
13
|
-
var _Marker = _interopRequireDefault(require("../marker/Marker"));
|
|
14
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
16
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
17
|
-
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
18
|
-
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
19
|
-
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
20
|
-
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
21
|
-
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
22
|
-
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
23
|
-
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
|
|
24
|
-
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
25
|
-
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); } }
|
|
26
|
-
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
27
|
-
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
28
|
-
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); }
|
|
29
|
-
function _get() { if (typeof Reflect !== "undefined" && Reflect.get) { _get = Reflect.get.bind(); } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }
|
|
30
|
-
function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }
|
|
31
|
-
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
32
|
-
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
33
|
-
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
34
|
-
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
35
|
-
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
36
|
-
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
37
|
-
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
38
|
-
var ModifyConstrain = /*#__PURE__*/function (_Modify) {
|
|
39
|
-
_inherits(ModifyConstrain, _Modify);
|
|
40
|
-
var _super = _createSuper(ModifyConstrain);
|
|
41
|
-
function ModifyConstrain(options) {
|
|
42
|
-
var _this;
|
|
43
|
-
_classCallCheck(this, ModifyConstrain);
|
|
44
|
-
_this = _super.call(this, options);
|
|
45
|
-
_this.constrainGeom_ = options.constrainGeom;
|
|
46
|
-
return _this;
|
|
47
|
-
}
|
|
48
|
-
_createClass(ModifyConstrain, [{
|
|
49
|
-
key: "handleDragEvent",
|
|
50
|
-
value: function handleDragEvent(evt) {
|
|
51
|
-
if (this.constrainGeom_ && this.constrainGeom_.intersectsCoordinate && !this.constrainGeom_.intersectsCoordinate(evt.coordinate)) {
|
|
52
|
-
evt.coordinate = this.constrainGeom_.getClosestPoint(evt.coordinate);
|
|
53
|
-
}
|
|
54
|
-
_get(_getPrototypeOf(ModifyConstrain.prototype), "handleDragEvent", this).call(this, evt);
|
|
55
|
-
}
|
|
56
|
-
}]);
|
|
57
|
-
return ModifyConstrain;
|
|
58
|
-
}(_interaction.Modify);
|
|
59
|
-
var DrawConstrain = /*#__PURE__*/function (_Draw) {
|
|
60
|
-
_inherits(DrawConstrain, _Draw);
|
|
61
|
-
var _super2 = _createSuper(DrawConstrain);
|
|
62
|
-
function DrawConstrain(options) {
|
|
63
|
-
var _this2;
|
|
64
|
-
_classCallCheck(this, DrawConstrain);
|
|
65
|
-
_this2 = _super2.call(this, options);
|
|
66
|
-
_this2.constrainGeom_ = options.constrainGeom;
|
|
67
|
-
return _this2;
|
|
68
|
-
}
|
|
69
|
-
_createClass(DrawConstrain, [{
|
|
70
|
-
key: "handlePointerMove_",
|
|
71
|
-
value: function handlePointerMove_(evt) {
|
|
72
|
-
if (this.constrainGeom_ && this.constrainGeom_.intersectsCoordinate && !this.constrainGeom_.intersectsCoordinate(evt.coordinate)) {
|
|
73
|
-
evt.coordinate = this.constrainGeom_.getClosestPoint(evt.coordinate);
|
|
74
|
-
}
|
|
75
|
-
_get(_getPrototypeOf(DrawConstrain.prototype), "handlePointerMove_", this).call(this, evt);
|
|
76
|
-
}
|
|
77
|
-
}]);
|
|
78
|
-
return DrawConstrain;
|
|
79
|
-
}(_interaction.Draw);
|
|
80
|
-
var drawStyle = function drawStyle(feature, style) {
|
|
81
|
-
var _style = [];
|
|
82
|
-
var styles = [new _style4.Style({
|
|
83
|
-
fill: new _style4.Fill({
|
|
84
|
-
color: 'rgba(255, 255, 255, 0.6)'
|
|
85
|
-
}),
|
|
86
|
-
stroke: new _style4.Stroke({
|
|
87
|
-
color: '#009BFF',
|
|
88
|
-
width: 2
|
|
89
|
-
}),
|
|
90
|
-
image: new _style4.Circle({
|
|
91
|
-
radius: 4,
|
|
92
|
-
fill: new _style4.Fill({
|
|
93
|
-
color: 'rgba(0,155,255, 0.8)'
|
|
94
|
-
})
|
|
95
|
-
})
|
|
96
|
-
})];
|
|
97
|
-
if (style) {
|
|
98
|
-
var _style2;
|
|
99
|
-
if (typeof style === 'function') {
|
|
100
|
-
_style = style(feature);
|
|
101
|
-
}
|
|
102
|
-
if (Array.isArray(_style) && (_style2 = _style) !== null && _style2 !== void 0 && _style2.length) styles.push.apply(styles, _toConsumableArray(_style));
|
|
103
|
-
}
|
|
104
|
-
return styles;
|
|
105
|
-
};
|
|
106
|
-
exports.drawStyle = drawStyle;
|
|
107
|
-
var _default = /*#__PURE__*/function () {
|
|
108
|
-
function _default(props, callback) {
|
|
109
|
-
var _this3 = this;
|
|
110
|
-
_classCallCheck(this, _default);
|
|
111
|
-
_defineProperty(this, "initModify", function () {
|
|
112
|
-
var t = _this3;
|
|
113
|
-
var modify = new ModifyConstrain({
|
|
114
|
-
source: _this3.source,
|
|
115
|
-
constrainGeom: _this3.constrainGeom
|
|
116
|
-
});
|
|
117
|
-
_this3.map.addInteraction(modify);
|
|
118
|
-
modify.on('modifyend', function (event) {
|
|
119
|
-
var features = event.features;
|
|
120
|
-
var feature = features.item(features.getLength() - 1);
|
|
121
|
-
_this3.drawFeature = feature;
|
|
122
|
-
var _feature = feature.clone();
|
|
123
|
-
t.callback && t.callback(_feature);
|
|
124
|
-
});
|
|
125
|
-
});
|
|
126
|
-
var _props$continuousDraw = props.continuousDraw,
|
|
127
|
-
continuousDraw = _props$continuousDraw === void 0 ? true : _props$continuousDraw,
|
|
128
|
-
_style3 = props.style,
|
|
129
|
-
markerStyle = props.markerStyle,
|
|
130
|
-
constrainGeom = props.constrainGeom;
|
|
131
|
-
this.map = props.map;
|
|
132
|
-
this.drawTool = null;
|
|
133
|
-
this.drawFeature = null;
|
|
134
|
-
this.maxPoints = props.maxPoints;
|
|
135
|
-
this.drawType = props.drawType;
|
|
136
|
-
this.callback = callback;
|
|
137
|
-
this.continuousDraw = continuousDraw; // 连续绘制
|
|
138
|
-
this.constrainGeom = constrainGeom; // 绘制限制范围:geometry
|
|
139
|
-
this.style = _style3;
|
|
140
|
-
this.source = new _source.Vector();
|
|
141
|
-
this.layer = new _layer.Vector({
|
|
142
|
-
source: this.source,
|
|
143
|
-
zIndex: props.zIndex || 20,
|
|
144
|
-
style: function style(feature) {
|
|
145
|
-
return drawStyle(feature, _style3);
|
|
146
|
-
}
|
|
147
|
-
});
|
|
148
|
-
this.map.addLayer(this.layer);
|
|
149
|
-
if (!props.onlyDraw) {
|
|
150
|
-
this.initModify();
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
/**
|
|
155
|
-
* @description:
|
|
156
|
-
* @param {*} drawType DragBox-框选 Circle-圈选 Polygon-多边形选择
|
|
157
|
-
* @return {*}
|
|
158
|
-
*/
|
|
159
|
-
_createClass(_default, [{
|
|
160
|
-
key: "init",
|
|
161
|
-
value: function init(drawType) {
|
|
162
|
-
var _this4 = this;
|
|
163
|
-
var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.callback;
|
|
164
|
-
var markerStyle = arguments.length > 2 ? arguments[2] : undefined;
|
|
165
|
-
var t = this;
|
|
166
|
-
if (drawType) {
|
|
167
|
-
var drawTool = new DrawConstrain(_objectSpread(_objectSpread({
|
|
168
|
-
type: drawType,
|
|
169
|
-
maxPoints: this.maxPoints,
|
|
170
|
-
constrainGeom: this.constrainGeom,
|
|
171
|
-
style: function style(feature) {
|
|
172
|
-
return drawStyle(feature, t.style);
|
|
173
|
-
}
|
|
174
|
-
}, drawType === 'DragBox' ? {
|
|
175
|
-
type: 'Circle',
|
|
176
|
-
geometryFunction: (0, _Draw2.createBox)()
|
|
177
|
-
} : {}), drawType === 'Marker' ? {
|
|
178
|
-
type: 'Point'
|
|
179
|
-
} : {}));
|
|
180
|
-
drawTool.on('drawstart', function () {
|
|
181
|
-
_this4.drawTool.setActive(true);
|
|
182
|
-
_this4.map.showTip('再次点击确定结束点');
|
|
183
|
-
_this4.clearFeatures();
|
|
184
|
-
_this4.callbackFn && _this4.callbackFn();
|
|
185
|
-
});
|
|
186
|
-
drawTool.on('drawend', function (event) {
|
|
187
|
-
_this4.map.showTip('鼠标左键确定起始点');
|
|
188
|
-
var drawSource = _this4.layer.getSource();
|
|
189
|
-
_this4.drawFeature = event.feature;
|
|
190
|
-
var _feature = event.feature.clone();
|
|
191
|
-
if (drawType == 'Marker') {
|
|
192
|
-
event.feature.setStyle(new _Marker["default"](markerStyle));
|
|
193
|
-
}
|
|
194
|
-
drawSource.addFeature(event.feature);
|
|
195
|
-
callback && callback(_feature);
|
|
196
|
-
_this4.drawTool.setActive(t.continuousDraw);
|
|
197
|
-
});
|
|
198
|
-
this.drawTool = drawTool;
|
|
199
|
-
this.map.showTip('鼠标左键确定起始点');
|
|
200
|
-
this.map.addInteraction(drawTool);
|
|
201
|
-
}
|
|
202
|
-
}
|
|
203
|
-
}, {
|
|
204
|
-
key: "clearFeatures",
|
|
205
|
-
value: function clearFeatures() {
|
|
206
|
-
this.source && this.source.clear();
|
|
207
|
-
this.map.hideTip();
|
|
208
|
-
}
|
|
209
|
-
}, {
|
|
210
|
-
key: "loadFeatures",
|
|
211
|
-
value: function loadFeatures(feature) {
|
|
212
|
-
if (this.style) {
|
|
213
|
-
feature.setStyle(drawStyle(feature, this.style));
|
|
214
|
-
}
|
|
215
|
-
// feature.setStyle(drawStyle(feature, this.style));
|
|
216
|
-
this.source && this.source.addFeatures([feature]);
|
|
217
|
-
this.drawFeature = feature;
|
|
218
|
-
}
|
|
219
|
-
}, {
|
|
220
|
-
key: "removeDrawTool",
|
|
221
|
-
value: function removeDrawTool() {
|
|
222
|
-
this.map.removeInteraction(this.drawTool);
|
|
223
|
-
}
|
|
224
|
-
}, {
|
|
225
|
-
key: "destroy",
|
|
226
|
-
value: function destroy() {
|
|
227
|
-
this.map.removeLayer(this.layer);
|
|
228
|
-
this.removeDrawTool();
|
|
229
|
-
this.drawTool && this.drawTool.setActive(false);
|
|
230
|
-
this.map.hideTip();
|
|
231
|
-
}
|
|
232
|
-
}]);
|
|
233
|
-
return _default;
|
|
234
|
-
}();
|
|
235
|
-
exports["default"] = _default;
|
|
236
|
-
//# sourceMappingURL=FeatureDraw.js.map
|