@vtx/ol-map 1.0.143 → 1.0.145
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +205 -205
- package/lib/_util/EventEmitter.js +11 -13
- package/lib/_util/EventEmitter.js.map +1 -1
- package/lib/_util/StyleCache.js +8 -10
- package/lib/_util/StyleCache.js.map +1 -1
- package/lib/_util/encryptParams.js +17 -22
- package/lib/_util/encryptParams.js.map +1 -1
- package/lib/_util/filterSpecialCharacters.js +12 -12
- package/lib/_util/filterSpecialCharacters.js.map +1 -1
- package/lib/_util/getComponentProps.js +1 -1
- package/lib/_util/getComponentProps.js.map +1 -1
- package/lib/_util/getCookie.js +5 -6
- package/lib/_util/getCookie.js.map +1 -1
- package/lib/_util/getDefaultMapInfo.js +7 -8
- package/lib/_util/getDefaultMapInfo.js.map +1 -1
- package/lib/_util/getSystemInfo.js +7 -8
- package/lib/_util/getSystemInfo.js.map +1 -1
- package/lib/_util/getToken.js +2 -4
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +2 -3
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/http.js +30 -32
- package/lib/_util/http.js.map +1 -1
- package/lib/_util/isFunction.js.map +1 -1
- package/lib/_util/isObject.js.map +1 -1
- package/lib/_util/layer.js +33 -37
- package/lib/_util/layer.js.map +1 -1
- package/lib/_util/mapTool.js +36 -37
- package/lib/_util/mapTool.js.map +1 -1
- package/lib/_util/projzh/datum/bd-09.js +2 -3
- package/lib/_util/projzh/datum/bd-09.js.map +1 -1
- package/lib/_util/projzh/datum/gcj-02.js +1 -2
- package/lib/_util/projzh/datum/gcj-02.js.map +1 -1
- package/lib/_util/projzh/datum/index.js +2 -3
- package/lib/_util/projzh/datum/index.js.map +1 -1
- package/lib/_util/projzh/index.js +2 -3
- package/lib/_util/projzh/index.js.map +1 -1
- package/lib/_util/projzh/projection/baidu-mercator.js +1 -2
- package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -1
- package/lib/_util/projzh/projection/index.js +2 -3
- package/lib/_util/projzh/projection/index.js.map +1 -1
- package/lib/_util/projzh/projection/spherical-mercator.js +1 -2
- package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -1
- package/lib/_util/projzh/util.js +1 -2
- package/lib/_util/projzh/util.js.map +1 -1
- package/lib/_util/search.js +13 -16
- package/lib/_util/search.js.map +1 -1
- package/lib/_util/setCookie.js +5 -6
- package/lib/_util/setCookie.js.map +1 -1
- package/lib/_util/stringToFun.js +5 -5
- package/lib/_util/stringToFun.js.map +1 -1
- package/lib/_util/transform.js +9 -10
- package/lib/_util/transform.js.map +1 -1
- package/lib/_util/useColSize.js +2 -3
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +12 -13
- package/lib/_util/useSet.js.map +1 -1
- package/lib/analysis-layer/index.js +44 -50
- package/lib/analysis-layer/index.js.map +1 -1
- package/lib/analysis-layer/style/css.js.map +1 -1
- package/lib/analysis-layer/style/index.js.map +1 -1
- package/lib/buffer-draw/BufferDraw.js +11 -13
- package/lib/buffer-draw/BufferDraw.js.map +1 -1
- package/lib/buffer-draw/index.js +9 -10
- package/lib/buffer-draw/index.js.map +1 -1
- package/lib/buffer-draw/style/css.js.map +1 -1
- package/lib/buffer-draw/style/index.js.map +1 -1
- package/lib/circle/Circle.js +22 -24
- package/lib/circle/Circle.js.map +1 -1
- package/lib/circle/index.js +3 -4
- package/lib/circle/index.js.map +1 -1
- package/lib/circle/style/css.js.map +1 -1
- package/lib/circle/style/index.js.map +1 -1
- package/lib/config.js +1 -2
- package/lib/config.js.map +1 -1
- package/lib/convertCamelToCSS.js +1 -2
- package/lib/convertCamelToCSS.js.map +1 -1
- package/lib/dom/Dom.js +19 -21
- package/lib/dom/Dom.js.map +1 -1
- package/lib/dom/index.js +10 -11
- package/lib/dom/index.js.map +1 -1
- package/lib/dom/style/css.js.map +1 -1
- package/lib/dom/style/index.js.map +1 -1
- package/lib/events/index.js +2 -4
- package/lib/events/index.js.map +1 -1
- package/lib/feature-draw/FeatureDraw.js +40 -46
- package/lib/feature-draw/FeatureDraw.js.map +1 -1
- package/lib/feature-draw/index.js +11 -11
- package/lib/feature-draw/index.js.map +1 -1
- package/lib/feature-draw/style/css.js.map +1 -1
- package/lib/feature-draw/style/index.js.map +1 -1
- package/lib/feature-layer/FeatureLayer.js +64 -65
- package/lib/feature-layer/FeatureLayer.js.map +1 -1
- package/lib/feature-layer/MyCluster.js +28 -31
- package/lib/feature-layer/MyCluster.js.map +1 -1
- package/lib/feature-layer/createFeatureCollection.js +39 -47
- package/lib/feature-layer/createFeatureCollection.js.map +1 -1
- package/lib/feature-layer/index.js +15 -16
- package/lib/feature-layer/index.js.map +1 -1
- package/lib/feature-layer/style/css.js.map +1 -1
- package/lib/feature-layer/style/index.js.map +1 -1
- package/lib/flow-line-layer/FlowLineLayer.js +22 -25
- package/lib/flow-line-layer/FlowLineLayer.js.map +1 -1
- package/lib/flow-line-layer/index.js +15 -16
- package/lib/flow-line-layer/index.js.map +1 -1
- package/lib/flow-line-layer/style/css.js.map +1 -1
- package/lib/flow-line-layer/style/index.js.map +1 -1
- package/lib/fly-line-layer/FlyLineLayer.js +12 -14
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -1
- package/lib/fly-line-layer/index.js +8 -9
- package/lib/fly-line-layer/index.js.map +1 -1
- package/lib/fly-line-layer/style/css.js.map +1 -1
- package/lib/fly-line-layer/style/index.js.map +1 -1
- package/lib/group-layer/GroupLayer.js +12 -13
- package/lib/group-layer/GroupLayer.js.map +1 -1
- package/lib/group-layer/index.js +8 -9
- package/lib/group-layer/index.js.map +1 -1
- package/lib/group-layer/style/css.js.map +1 -1
- package/lib/group-layer/style/index.js.map +1 -1
- package/lib/heatmap-layer/HeatmapLayer.js +29 -30
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -1
- package/lib/heatmap-layer/index.js +8 -9
- package/lib/heatmap-layer/index.js.map +1 -1
- package/lib/heatmap-layer/style/css.js.map +1 -1
- package/lib/heatmap-layer/style/index.js.map +1 -1
- package/lib/high-layer/HighLayer.js +13 -15
- package/lib/high-layer/HighLayer.js.map +1 -1
- package/lib/high-layer/index.js +11 -13
- package/lib/high-layer/index.js.map +1 -1
- package/lib/high-layer/style/css.js.map +1 -1
- package/lib/high-layer/style/index.js.map +1 -1
- package/lib/image-layer/ImageLayer.js +31 -33
- package/lib/image-layer/ImageLayer.js.map +1 -1
- package/lib/image-layer/ImageTileLayer.js +31 -33
- package/lib/image-layer/ImageTileLayer.js.map +1 -1
- package/lib/image-layer/index.js +10 -11
- package/lib/image-layer/index.js.map +1 -1
- package/lib/image-layer/style/css.js.map +1 -1
- package/lib/image-layer/style/index.js.map +1 -1
- package/lib/index.js +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legend/index.js +20 -23
- package/lib/legend/index.js.map +1 -1
- package/lib/legend/style/css.js.map +1 -1
- package/lib/legend/style/index.js.map +1 -1
- package/lib/legend/style/index.less +73 -73
- package/lib/map/Analysis.js +24 -27
- package/lib/map/Analysis.js.map +1 -1
- package/lib/map/Layers.js +25 -29
- package/lib/map/Layers.js.map +1 -1
- package/lib/map/Popup.js +22 -24
- package/lib/map/Popup.js.map +1 -1
- 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/getBaseLayers/imagery/amap/AmapImageryProvider.js +1 -2
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +2 -3
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js +8 -10
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +7 -9
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/index.js +11 -13
- package/lib/map/getBaseLayers/index.js.map +1 -1
- package/lib/map/index.js +73 -77
- package/lib/map/index.js.map +1 -1
- package/lib/map/style/css.js.map +1 -1
- package/lib/map/style/index.js.map +1 -1
- package/lib/map/style/index.less +152 -152
- package/lib/map-icon/svg/index.js +2 -3
- package/lib/map-icon/svg/index.js.map +1 -1
- package/lib/map-icon/svg/tuceng.svg.js.map +1 -1
- package/lib/marker/Marker.js +23 -26
- package/lib/marker/Marker.js.map +1 -1
- package/lib/marker/index.js +3 -4
- package/lib/marker/index.js.map +1 -1
- package/lib/marker/style/css.js.map +1 -1
- package/lib/marker/style/index.js.map +1 -1
- package/lib/path-line-layer/PathLineLayer.js +21 -23
- package/lib/path-line-layer/PathLineLayer.js.map +1 -1
- package/lib/path-line-layer/getPathLineStyles.js +8 -9
- package/lib/path-line-layer/getPathLineStyles.js.map +1 -1
- package/lib/path-line-layer/index.js +15 -16
- package/lib/path-line-layer/index.js.map +1 -1
- package/lib/path-line-layer/style/css.js.map +1 -1
- package/lib/path-line-layer/style/index.js.map +1 -1
- package/lib/path-play-back/PathPlayBack.js +33 -29
- package/lib/path-play-back/PathPlayBack.js.map +1 -1
- package/lib/path-play-back/index.js +8 -9
- package/lib/path-play-back/index.js.map +1 -1
- package/lib/path-play-back/style/css.js.map +1 -1
- package/lib/path-play-back/style/index.js.map +1 -1
- package/lib/poi-search/Location.js +7 -8
- package/lib/poi-search/Location.js.map +1 -1
- package/lib/poi-search/PoiList.js +9 -10
- package/lib/poi-search/PoiList.js.map +1 -1
- package/lib/poi-search/Search.js +20 -21
- package/lib/poi-search/Search.js.map +1 -1
- package/lib/poi-search/index.js +9 -11
- package/lib/poi-search/index.js.map +1 -1
- package/lib/poi-search/style/css.js.map +1 -1
- package/lib/poi-search/style/index.js.map +1 -1
- package/lib/poi-search/style/index.less +97 -97
- package/lib/point/Point.js +22 -24
- package/lib/point/Point.js.map +1 -1
- package/lib/point/index.js +3 -4
- package/lib/point/index.js.map +1 -1
- package/lib/point/style/css.js.map +1 -1
- package/lib/point/style/index.js.map +1 -1
- package/lib/polygon/Polygon.js +22 -24
- package/lib/polygon/Polygon.js.map +1 -1
- package/lib/polygon/index.js +3 -4
- package/lib/polygon/index.js.map +1 -1
- package/lib/polygon/style/css.js.map +1 -1
- package/lib/polygon/style/index.js.map +1 -1
- package/lib/polyline/Polyline.js +22 -24
- package/lib/polyline/Polyline.js.map +1 -1
- package/lib/polyline/index.js +3 -4
- package/lib/polyline/index.js.map +1 -1
- package/lib/polyline/style/css.js.map +1 -1
- package/lib/polyline/style/index.js.map +1 -1
- package/lib/popup/index.js +14 -16
- package/lib/popup/index.js.map +1 -1
- package/lib/popup/style/css.js.map +1 -1
- package/lib/popup/style/index.js.map +1 -1
- package/lib/popup/style/index.less +129 -129
- package/lib/provider/index.js +3 -5
- package/lib/provider/index.js.map +1 -1
- package/lib/provider/style/css.js.map +1 -1
- package/lib/provider/style/index.js.map +1 -1
- package/lib/renderer/Fill.js +17 -19
- package/lib/renderer/Fill.js.map +1 -1
- package/lib/renderer/Stroke.js +17 -19
- package/lib/renderer/Stroke.js.map +1 -1
- package/lib/renderer/index.js +12 -15
- package/lib/renderer/index.js.map +1 -1
- package/lib/renderer/style/css.js.map +1 -1
- package/lib/renderer/style/index.js.map +1 -1
- package/lib/renderer/transformRgb.js +1 -2
- package/lib/renderer/transformRgb.js.map +1 -1
- package/lib/search-map/VtxModal.js +22 -25
- package/lib/search-map/VtxModal.js.map +1 -1
- package/lib/search-map/index.js +22 -24
- package/lib/search-map/index.js.map +1 -1
- package/lib/search-map/style/css.js.map +1 -1
- package/lib/search-map/style/index.js.map +1 -1
- package/lib/search-map/style/index.less +82 -82
- package/lib/search-map/style/modal.less +58 -58
- package/lib/style/index.less +2 -2
- package/lib/style/themes/compact.less +1 -1
- package/lib/style/themes/dark.less +9 -9
- package/lib/style/themes/default.less +7 -7
- package/lib/style/themes/index.less +1 -1
- package/lib/style/themes/variable.less +5 -5
- package/lib/tile-layer/TileLayer.js +21 -24
- package/lib/tile-layer/TileLayer.js.map +1 -1
- package/lib/tile-layer/index.js +3 -4
- package/lib/tile-layer/index.js.map +1 -1
- package/lib/tile-layer/style/css.js.map +1 -1
- package/lib/tile-layer/style/index.js.map +1 -1
- package/lib/tools/Layer/LayerService.js +8 -9
- package/lib/tools/Layer/LayerService.js.map +1 -1
- package/lib/tools/Layer/LayersCheckService.js +32 -39
- package/lib/tools/Layer/LayersCheckService.js.map +1 -1
- package/lib/tools/Layer/index.js +14 -15
- package/lib/tools/Layer/index.js.map +1 -1
- package/lib/tools/Layer/index.less +43 -43
- package/lib/tools/Search/index.js +18 -21
- package/lib/tools/Search/index.js.map +1 -1
- package/lib/tools/Toolbox/BoxSelect/index.js +5 -6
- package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/CircleSelect/index.js +5 -6
- package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/EagleEye/index.js +9 -11
- package/lib/tools/Toolbox/EagleEye/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +44 -50
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.js +34 -36
- package/lib/tools/Toolbox/MapBookmark/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.less +20 -20
- package/lib/tools/Toolbox/MapDownload/index.js +2 -2
- package/lib/tools/Toolbox/MapDownload/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.js +33 -36
- package/lib/tools/Toolbox/MapPrint/index.js.map +1 -1
- package/lib/tools/Toolbox/MapPrint/index.less +4 -4
- package/lib/tools/Toolbox/Measure/Area/index.js +3 -4
- package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Distance/index.js +3 -4
- package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Measure.js +8 -10
- package/lib/tools/Toolbox/Measure/Measure.js.map +1 -1
- package/lib/tools/Toolbox/Measure/index.js +12 -14
- package/lib/tools/Toolbox/Measure/index.js.map +1 -1
- package/lib/tools/Toolbox/PolygonSelect/index.js +5 -6
- package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/ScaleLine/index.js +9 -11
- package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.js +59 -62
- package/lib/tools/Toolbox/SelectTools/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.less +87 -87
- package/lib/tools/Toolbox/SpaceQuery/index.js +24 -25
- package/lib/tools/Toolbox/SpaceQuery/index.js.map +1 -1
- package/lib/tools/Toolbox/SpaceQuery/index.less +16 -16
- package/lib/tools/Toolbox/ZoomInput/index.js +9 -11
- package/lib/tools/Toolbox/ZoomInput/index.js.map +1 -1
- package/lib/tools/Toolbox/ZoomInput/index.less +5 -5
- package/lib/tools/Toolbox/index.js +7 -10
- package/lib/tools/Toolbox/index.js.map +1 -1
- package/lib/tools/Toolbox/index.less +2 -2
- package/lib/tools/Utils/CreateOverlay.js +10 -11
- package/lib/tools/Utils/CreateOverlay.js.map +1 -1
- package/lib/tools/Utils/Draw.js +16 -19
- package/lib/tools/Utils/Draw.js.map +1 -1
- package/lib/tools/Utils/HighLayer.js +14 -16
- package/lib/tools/Utils/HighLayer.js.map +1 -1
- package/lib/tools/Utils/measure.js +6 -7
- package/lib/tools/Utils/measure.js.map +1 -1
- package/lib/tools/Utils/utils.js +36 -45
- package/lib/tools/Utils/utils.js.map +1 -1
- package/lib/tools/View/index.js +14 -16
- package/lib/tools/View/index.js.map +1 -1
- package/lib/tools/View/index.less +28 -28
- package/lib/tools/analysis-tool/index.js +18 -20
- package/lib/tools/analysis-tool/index.js.map +1 -1
- package/lib/tools/base-map-switch/index.js +14 -16
- package/lib/tools/base-map-switch/index.js.map +1 -1
- package/lib/tools/components/Chart/index.js +129 -140
- package/lib/tools/components/Chart/index.js.map +1 -1
- package/lib/tools/components/Icon/index.js +2 -3
- package/lib/tools/components/Icon/index.js.map +1 -1
- package/lib/tools/components/Info/index.js +2 -3
- package/lib/tools/components/Info/index.js.map +1 -1
- package/lib/tools/components/Info/index.less +26 -26
- package/lib/tools/components/ItemWrap/index.js +9 -11
- package/lib/tools/components/ItemWrap/index.js.map +1 -1
- package/lib/tools/components/ItemWrap/index.less +41 -41
- package/lib/tools/components/Modal/index.js +10 -11
- package/lib/tools/components/Modal/index.js.map +1 -1
- package/lib/tools/components/Modal/index.less +33 -33
- package/lib/tools/components/MyTabs/index.js +1 -1
- package/lib/tools/components/MyTabs/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.js +7 -7
- package/lib/tools/components/RequiredLabel/index.js.map +1 -1
- package/lib/tools/components/RequiredLabel/index.less +5 -5
- package/lib/tools/components/Select/index.js +2 -3
- package/lib/tools/components/Select/index.js.map +1 -1
- package/lib/tools/components/Table/index.js +17 -19
- package/lib/tools/components/Table/index.js.map +1 -1
- package/lib/tools/components/Table/index.less +13 -13
- package/lib/tools/components/ToolItem/index.js +2 -3
- package/lib/tools/components/ToolItem/index.js.map +1 -1
- package/lib/tools/components/ToolItem/index.less +27 -27
- package/lib/tools/components/ToolsSelect/index.js +2 -3
- package/lib/tools/components/ToolsSelect/index.js.map +1 -1
- package/lib/tools/components/ToolsSelect/index.less +10 -10
- package/lib/tools/full-screen/index.js +10 -12
- package/lib/tools/full-screen/index.js.map +1 -1
- package/lib/tools/index.js +10 -11
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/layer-control/index.js +22 -26
- package/lib/tools/layer-control/index.js.map +1 -1
- package/lib/tools/refresh/index.js +10 -12
- package/lib/tools/refresh/index.js.map +1 -1
- package/lib/tools/style/css.js.map +1 -1
- package/lib/tools/style/index.js.map +1 -1
- package/lib/tools/style/index.less +154 -154
- package/lib/tools-item/index.js +9 -11
- package/lib/tools-item/index.js.map +1 -1
- package/lib/use-props/index.js +1 -2
- package/lib/use-props/index.js.map +1 -1
- package/lib/use-props/style/css.js.map +1 -1
- package/lib/use-props/style/index.js.map +1 -1
- package/lib/wms-layer/WmsLayer.js +31 -33
- package/lib/wms-layer/WmsLayer.js.map +1 -1
- package/lib/wms-layer/index.js +10 -11
- package/lib/wms-layer/index.js.map +1 -1
- package/lib/wms-layer/style/css.js.map +1 -1
- package/lib/wms-layer/style/index.js.map +1 -1
- package/package.json +3 -2
- package/CHANGELOG.md +0 -217
package/lib/dom/Dom.js
CHANGED
|
@@ -1,29 +1,27 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
8
|
var _ol = require("ol");
|
|
9
|
-
function ownKeys(
|
|
10
|
-
function _objectSpread(
|
|
11
|
-
function _defineProperty(
|
|
12
|
-
function _defineProperties(
|
|
13
|
-
function _createClass(
|
|
14
|
-
function _toPropertyKey(
|
|
15
|
-
function _toPrimitive(
|
|
16
|
-
function _classCallCheck(
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
22
|
-
function
|
|
23
|
-
function
|
|
24
|
-
var _default = /*#__PURE__*/function (_Overlay) {
|
|
25
|
-
_inherits(_default, _Overlay);
|
|
26
|
-
var _super = _createSuper(_default);
|
|
9
|
+
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; }
|
|
10
|
+
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; }
|
|
11
|
+
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; }
|
|
12
|
+
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); } }
|
|
13
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
14
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
15
|
+
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); }
|
|
16
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
17
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
18
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
19
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
20
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
21
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
22
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
23
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
24
|
+
var _default = exports["default"] = /*#__PURE__*/function (_Overlay) {
|
|
27
25
|
function _default(options) {
|
|
28
26
|
var _this;
|
|
29
27
|
_classCallCheck(this, _default);
|
|
@@ -31,11 +29,11 @@ var _default = /*#__PURE__*/function (_Overlay) {
|
|
|
31
29
|
if (options.stopEvent) {
|
|
32
30
|
_options.className = 'ol-overlay_container-stop_event';
|
|
33
31
|
}
|
|
34
|
-
_this =
|
|
32
|
+
_this = _callSuper(this, _default, [_options]);
|
|
35
33
|
_this.type = 'Dom';
|
|
36
34
|
return _this;
|
|
37
35
|
}
|
|
36
|
+
_inherits(_default, _Overlay);
|
|
38
37
|
return _createClass(_default);
|
|
39
38
|
}(_ol.Overlay);
|
|
40
|
-
exports["default"] = _default;
|
|
41
39
|
//# sourceMappingURL=Dom.js.map
|
package/lib/dom/Dom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dom.js","names":["_ol","require","ownKeys","
|
|
1
|
+
{"version":3,"file":"Dom.js","names":["_ol","require","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_toPropertyKey","value","configurable","writable","_defineProperties","key","_createClass","prototype","i","_toPrimitive","_typeof","Symbol","toPrimitive","call","TypeError","String","Number","_classCallCheck","a","n","_callSuper","_getPrototypeOf","_possibleConstructorReturn","_isNativeReflectConstruct","Reflect","construct","constructor","_assertThisInitialized","ReferenceError","Boolean","valueOf","setPrototypeOf","getPrototypeOf","bind","__proto__","_inherits","create","_setPrototypeOf","_default","exports","_Overlay","options","_this","_options","stopEvent","className","type","Overlay"],"sources":["dom/Dom.js"],"sourcesContent":["import { Overlay } from 'ol';\r\n\r\nexport default class extends Overlay {\r\n constructor(options) {\r\n const _options = {...options};\r\n if (options.stopEvent) {\r\n _options.className = 'ol-overlay_container-stop_event';\r\n }\r\n super(_options);\r\n\r\n this.type = 'Dom';\r\n }\r\n}\r\n"],"mappings":";;;;;;;AAAA,IAAAA,GAAA,GAAAC,OAAA;AAA6B,SAAAC,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAC,CAAA,GAAAH,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAK,CAAA,GAAAA,CAAA,CAAAC,MAAA,WAAAN,CAAA,WAAAE,MAAA,CAAAK,wBAAA,CAAAR,CAAA,EAAAC,CAAA,EAAAQ,UAAA,OAAAP,CAAA,CAAAQ,IAAA,CAAAC,KAAA,CAAAT,CAAA,EAAAI,CAAA,YAAAJ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0D,QAAA,GAAAC,OAAA,qCAAAC,QAAA;EAGzB,SAAAF,SAAYG,OAAO,EAAE;IAAA,IAAAC,KAAA;IAAAzB,eAAA,OAAAqB,QAAA;IACjB,IAAMK,QAAQ,GAAAnD,aAAA,KAAOiD,OAAO,CAAC;IAC7B,IAAIA,OAAO,CAACG,SAAS,EAAE;MACnBD,QAAQ,CAACE,SAAS,GAAG,iCAAiC;IAC1D;IACAH,KAAA,GAAAtB,UAAA,OAAAkB,QAAA,GAAMK,QAAQ;IAEdD,KAAA,CAAKI,IAAI,GAAG,KAAK;IAAC,OAAAJ,KAAA;EACtB;EAACP,SAAA,CAAAG,QAAA,EAAAE,QAAA;EAAA,OAAAlC,YAAA,CAAAgC,QAAA;AAAA,EATwBS,WAAO","ignoreList":[]}
|
package/lib/dom/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -10,16 +10,15 @@ var _ahooks = require("ahooks");
|
|
|
10
10
|
var _useProps2 = _interopRequireDefault(require("../use-props"));
|
|
11
11
|
var _Dom = _interopRequireDefault(require("./Dom"));
|
|
12
12
|
var _excluded = ["data", "style", "className", "show", "children"];
|
|
13
|
-
function _interopRequireDefault(
|
|
14
|
-
function
|
|
15
|
-
function
|
|
16
|
-
function
|
|
17
|
-
function
|
|
18
|
-
function
|
|
19
|
-
function
|
|
20
|
-
function
|
|
21
|
-
function
|
|
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; }
|
|
13
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
14
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, "default": e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
19
|
+
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); }
|
|
20
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
21
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
23
22
|
function _default(props) {
|
|
24
23
|
var data = props.data,
|
|
25
24
|
style = props.style,
|
package/lib/dom/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_ahooks","_useProps2","_interopRequireDefault","_Dom","_excluded","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_react","_interopRequireWildcard","require","_ahooks","_useProps2","_interopRequireDefault","_Dom","_excluded","e","__esModule","t","WeakMap","r","n","o","i","f","__proto__","_typeof","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","_toPropertyKey","value","configurable","writable","_toPrimitive","Symbol","toPrimitive","TypeError","String","Number","_objectWithoutProperties","_objectWithoutPropertiesLoose","indexOf","propertyIsEnumerable","_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';\r\nimport { useUpdateEffect } from 'ahooks';\r\nimport useProps from '../use-props';\r\nimport Dom from './Dom';\r\n\r\nexport default function (props) {\r\n const { data, style, className, show = true, children, ...otherProps } = props;\r\n const { map } = useProps();\r\n\r\n const domRef = useRef();\r\n const overlay = useRef();\r\n useEffect(() => {\r\n overlay.current = new Dom({\r\n element: domRef.current,\r\n position: data,\r\n positioning: \"bottom-center\",\r\n offset: [0, -10],\r\n ...otherProps\r\n });\r\n\r\n // 将Overlay添加到地图上\r\n map.addOverlay(overlay.current);\r\n\r\n return () => {\r\n map.removeOverlay(overlay.current);\r\n }\r\n }, []);\r\n\r\n useUpdateEffect(() => {\r\n overlay.current.setPosition(data)\r\n }, [JSON.stringify(data)])\r\n\r\n return (\r\n <div style={{display: show ? 'block' : 'none'}}>\r\n <div ref={domRef} style={{...style}} className={className}>\r\n {children}\r\n </div>\r\n </div>\r\n\r\n )\r\n}\r\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,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,gBAAAA,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAE,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAV,uBAAA,YAAAA,wBAAAO,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,mBAAAT,CAAA,iBAAAA,CAAA,gBAAAU,OAAA,CAAAV,CAAA,0BAAAA,CAAA,SAAAQ,CAAA,MAAAF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CAAC;EACxB,IAAAE,gBAAS,EAAC,YAAM;IACZD,OAAO,CAACE,OAAO,GAAG,IAAIC,eAAG,CAAAtC,aAAA;MACrBuC,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,oBACI1D,MAAA,YAAAoF,aAAA;IAAKzB,KAAK,EAAE;MAAC0B,OAAO,EAAEvB,IAAI,GAAG,OAAO,GAAG;IAAM;EAAE,gBAC3C9D,MAAA,YAAAoF,aAAA;IAAKE,GAAG,EAAElB,MAAO;IAACT,KAAK,EAAAxB,aAAA,KAAMwB,KAAK,CAAE;IAACC,SAAS,EAAEA;EAAU,GACrDG,QACA,CACJ,CAAC;AAGd","ignoreList":[]}
|
package/lib/dom/style/css.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"css.js","names":[],"sources":["dom/style/index.js"],"sourcesContent":[""],"mappings":""}
|
|
1
|
+
{"version":3,"file":"css.js","names":[],"sources":["dom/style/index.js"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["dom/style/index.js"],"sourcesContent":[""],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["dom/style/index.js"],"sourcesContent":[""],"mappings":"","ignoreList":[]}
|
package/lib/events/index.js
CHANGED
|
@@ -7,7 +7,7 @@ exports.registerEventLayer = exports.registerEventGeometry = void 0;
|
|
|
7
7
|
var EVENT = ['onClick', 'onDoubleClick', 'onMouseEnter', 'onMouseMove', 'onMouseLeave'];
|
|
8
8
|
|
|
9
9
|
// 注册鼠标事件
|
|
10
|
-
var registerEventGeometry = function registerEventGeometry(layer, props) {
|
|
10
|
+
var registerEventGeometry = exports.registerEventGeometry = function registerEventGeometry(layer, props) {
|
|
11
11
|
EVENT.map(function (v) {
|
|
12
12
|
layer[v] = function () {
|
|
13
13
|
var options = layer.getProperties();
|
|
@@ -15,13 +15,11 @@ var registerEventGeometry = function registerEventGeometry(layer, props) {
|
|
|
15
15
|
};
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
exports.
|
|
19
|
-
var registerEventLayer = function registerEventLayer(layer, props) {
|
|
18
|
+
var registerEventLayer = exports.registerEventLayer = function registerEventLayer(layer, props) {
|
|
20
19
|
EVENT.map(function (v) {
|
|
21
20
|
layer[v] = function (e, a) {
|
|
22
21
|
props[v] && props[v](e, a);
|
|
23
22
|
};
|
|
24
23
|
});
|
|
25
24
|
};
|
|
26
|
-
exports.registerEventLayer = registerEventLayer;
|
|
27
25
|
//# sourceMappingURL=index.js.map
|
package/lib/events/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["EVENT","registerEventGeometry","layer","props","map","v","options","getProperties","
|
|
1
|
+
{"version":3,"file":"index.js","names":["EVENT","registerEventGeometry","exports","layer","props","map","v","options","getProperties","registerEventLayer","e","a"],"sources":["events/index.js"],"sourcesContent":["const EVENT = ['onClick', 'onDoubleClick', 'onMouseEnter', 'onMouseMove', 'onMouseLeave'];\r\n\r\n// 注册鼠标事件\r\nexport const registerEventGeometry = (layer, props) => {\r\n EVENT.map(v => {\r\n layer[v] = () => {\r\n let options = layer.getProperties();\r\n props[v] && props[v](options);\r\n };\r\n });\r\n};\r\n\r\nexport const registerEventLayer = (layer, props) => {\r\n EVENT.map(v => {\r\n layer[v] = (e, a) => {\r\n props[v] && props[v](e, a);\r\n };\r\n });\r\n};\r\n"],"mappings":";;;;;;AAAA,IAAMA,KAAK,GAAG,CAAC,SAAS,EAAE,eAAe,EAAE,cAAc,EAAE,aAAa,EAAE,cAAc,CAAC;;AAEzF;AACO,IAAMC,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,SAAxBA,qBAAqBA,CAAIE,KAAK,EAAEC,KAAK,EAAK;EACnDJ,KAAK,CAACK,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;AAEM,IAAME,kBAAkB,GAAAP,OAAA,CAAAO,kBAAA,GAAG,SAArBA,kBAAkBA,CAAIN,KAAK,EAAEC,KAAK,EAAK;EAChDJ,KAAK,CAACK,GAAG,CAAC,UAAAC,CAAC,EAAI;IACXH,KAAK,CAACG,CAAC,CAAC,GAAG,UAACI,CAAC,EAAEC,CAAC,EAAK;MACjBP,KAAK,CAACE,CAAC,CAAC,IAAIF,KAAK,CAACE,CAAC,CAAC,CAACI,CAAC,EAAEC,CAAC,CAAC;IAC9B,CAAC;EACL,CAAC,CAAC;AACN,CAAC","ignoreList":[]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
3
|
+
function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
|
|
4
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -11,73 +11,70 @@ var _interaction = require("ol/interaction");
|
|
|
11
11
|
var _Draw2 = require("ol/interaction/Draw");
|
|
12
12
|
var _style4 = require("ol/style");
|
|
13
13
|
var _Marker = _interopRequireDefault(require("../marker/Marker"));
|
|
14
|
-
function _interopRequireDefault(
|
|
15
|
-
function ownKeys(
|
|
16
|
-
function _objectSpread(
|
|
17
|
-
function _defineProperty(
|
|
18
|
-
function _toConsumableArray(
|
|
14
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { "default": e }; }
|
|
15
|
+
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; }
|
|
16
|
+
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; }
|
|
17
|
+
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; }
|
|
18
|
+
function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
|
|
19
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(
|
|
21
|
-
function _iterableToArray(
|
|
22
|
-
function _arrayWithoutHoles(
|
|
23
|
-
function _arrayLikeToArray(
|
|
24
|
-
function _classCallCheck(
|
|
25
|
-
function _defineProperties(
|
|
26
|
-
function _createClass(
|
|
27
|
-
function _toPropertyKey(
|
|
28
|
-
function _toPrimitive(
|
|
29
|
-
function
|
|
30
|
-
function
|
|
31
|
-
function
|
|
32
|
-
function
|
|
33
|
-
function
|
|
34
|
-
function
|
|
35
|
-
function
|
|
36
|
-
function
|
|
37
|
-
function
|
|
20
|
+
function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
|
|
21
|
+
function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
|
|
22
|
+
function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
|
|
23
|
+
function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
|
|
24
|
+
function _classCallCheck(a, n) { if (!(a instanceof n)) throw new TypeError("Cannot call a class as a function"); }
|
|
25
|
+
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); } }
|
|
26
|
+
function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r), t && _defineProperties(e, t), Object.defineProperty(e, "prototype", { writable: !1 }), e; }
|
|
27
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
|
|
28
|
+
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); }
|
|
29
|
+
function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
|
|
30
|
+
function _possibleConstructorReturn(t, e) { if (e && ("object" == _typeof(e) || "function" == typeof e)) return e; if (void 0 !== e) throw new TypeError("Derived constructors may only return object or undefined"); return _assertThisInitialized(t); }
|
|
31
|
+
function _assertThisInitialized(e) { if (void 0 === e) throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); return e; }
|
|
32
|
+
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
33
|
+
function _superPropGet(t, o, e, r) { var p = _get(_getPrototypeOf(1 & r ? t.prototype : t), o, e); return 2 & r && "function" == typeof p ? function (t) { return p.apply(e, t); } : p; }
|
|
34
|
+
function _get() { return _get = "undefined" != typeof Reflect && Reflect.get ? Reflect.get.bind() : function (e, t, r) { var p = _superPropBase(e, t); if (p) { var n = Object.getOwnPropertyDescriptor(p, t); return n.get ? n.get.call(arguments.length < 3 ? e : r) : n.value; } }, _get.apply(null, arguments); }
|
|
35
|
+
function _superPropBase(t, o) { for (; !{}.hasOwnProperty.call(t, o) && null !== (t = _getPrototypeOf(t));); return t; }
|
|
36
|
+
function _getPrototypeOf(t) { return _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function (t) { return t.__proto__ || Object.getPrototypeOf(t); }, _getPrototypeOf(t); }
|
|
37
|
+
function _inherits(t, e) { if ("function" != typeof e && null !== e) throw new TypeError("Super expression must either be null or a function"); t.prototype = Object.create(e && e.prototype, { constructor: { value: t, writable: !0, configurable: !0 } }), Object.defineProperty(t, "prototype", { writable: !1 }), e && _setPrototypeOf(t, e); }
|
|
38
|
+
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
38
39
|
var ModifyConstrain = /*#__PURE__*/function (_Modify) {
|
|
39
|
-
_inherits(ModifyConstrain, _Modify);
|
|
40
|
-
var _super = _createSuper(ModifyConstrain);
|
|
41
40
|
function ModifyConstrain(options) {
|
|
42
41
|
var _this;
|
|
43
42
|
_classCallCheck(this, ModifyConstrain);
|
|
44
|
-
_this =
|
|
43
|
+
_this = _callSuper(this, ModifyConstrain, [options]);
|
|
45
44
|
_this.constrainGeom_ = options.constrainGeom;
|
|
46
45
|
return _this;
|
|
47
46
|
}
|
|
48
|
-
|
|
47
|
+
_inherits(ModifyConstrain, _Modify);
|
|
48
|
+
return _createClass(ModifyConstrain, [{
|
|
49
49
|
key: "handleDragEvent",
|
|
50
50
|
value: function handleDragEvent(evt) {
|
|
51
51
|
if (this.constrainGeom_ && this.constrainGeom_.intersectsCoordinate && !this.constrainGeom_.intersectsCoordinate(evt.coordinate)) {
|
|
52
52
|
evt.coordinate = this.constrainGeom_.getClosestPoint(evt.coordinate);
|
|
53
53
|
}
|
|
54
|
-
|
|
54
|
+
_superPropGet(ModifyConstrain, "handleDragEvent", this, 3)([evt]);
|
|
55
55
|
}
|
|
56
56
|
}]);
|
|
57
|
-
return ModifyConstrain;
|
|
58
57
|
}(_interaction.Modify);
|
|
59
58
|
var DrawConstrain = /*#__PURE__*/function (_Draw) {
|
|
60
|
-
_inherits(DrawConstrain, _Draw);
|
|
61
|
-
var _super2 = _createSuper(DrawConstrain);
|
|
62
59
|
function DrawConstrain(options) {
|
|
63
60
|
var _this2;
|
|
64
61
|
_classCallCheck(this, DrawConstrain);
|
|
65
|
-
_this2 =
|
|
62
|
+
_this2 = _callSuper(this, DrawConstrain, [options]);
|
|
66
63
|
_this2.constrainGeom_ = options.constrainGeom;
|
|
67
64
|
return _this2;
|
|
68
65
|
}
|
|
69
|
-
|
|
66
|
+
_inherits(DrawConstrain, _Draw);
|
|
67
|
+
return _createClass(DrawConstrain, [{
|
|
70
68
|
key: "handlePointerMove_",
|
|
71
69
|
value: function handlePointerMove_(evt) {
|
|
72
70
|
if (this.constrainGeom_ && this.constrainGeom_.intersectsCoordinate && !this.constrainGeom_.intersectsCoordinate(evt.coordinate)) {
|
|
73
71
|
evt.coordinate = this.constrainGeom_.getClosestPoint(evt.coordinate);
|
|
74
72
|
}
|
|
75
|
-
|
|
73
|
+
_superPropGet(DrawConstrain, "handlePointerMove_", this, 3)([evt]);
|
|
76
74
|
}
|
|
77
75
|
}]);
|
|
78
|
-
return DrawConstrain;
|
|
79
76
|
}(_interaction.Draw);
|
|
80
|
-
var drawStyle = function drawStyle(feature, style) {
|
|
77
|
+
var drawStyle = exports.drawStyle = function drawStyle(feature, style) {
|
|
81
78
|
var _style = [];
|
|
82
79
|
var styles = [new _style4.Style({
|
|
83
80
|
fill: new _style4.Fill({
|
|
@@ -103,8 +100,7 @@ var drawStyle = function drawStyle(feature, style) {
|
|
|
103
100
|
}
|
|
104
101
|
return styles;
|
|
105
102
|
};
|
|
106
|
-
exports
|
|
107
|
-
var _default = /*#__PURE__*/function () {
|
|
103
|
+
var _default = exports["default"] = /*#__PURE__*/function () {
|
|
108
104
|
function _default(props, callback) {
|
|
109
105
|
var _this3 = this;
|
|
110
106
|
_classCallCheck(this, _default);
|
|
@@ -151,12 +147,12 @@ var _default = /*#__PURE__*/function () {
|
|
|
151
147
|
}
|
|
152
148
|
}
|
|
153
149
|
|
|
154
|
-
/**
|
|
155
|
-
* @description:
|
|
156
|
-
* @param {*} drawType DragBox-框选 Circle-圈选 Polygon-多边形选择
|
|
157
|
-
* @return {*}
|
|
150
|
+
/**
|
|
151
|
+
* @description:
|
|
152
|
+
* @param {*} drawType DragBox-框选 Circle-圈选 Polygon-多边形选择
|
|
153
|
+
* @return {*}
|
|
158
154
|
*/
|
|
159
|
-
_createClass(_default, [{
|
|
155
|
+
return _createClass(_default, [{
|
|
160
156
|
key: "init",
|
|
161
157
|
value: function init(drawType) {
|
|
162
158
|
var _this4 = this;
|
|
@@ -230,7 +226,5 @@ var _default = /*#__PURE__*/function () {
|
|
|
230
226
|
this.map.hideTip();
|
|
231
227
|
}
|
|
232
228
|
}]);
|
|
233
|
-
return _default;
|
|
234
229
|
}();
|
|
235
|
-
exports["default"] = _default;
|
|
236
230
|
//# sourceMappingURL=FeatureDraw.js.map
|