@vtx/ol-map 1.0.151 → 1.0.152
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 +13 -11
- package/lib/_util/EventEmitter.js.map +1 -1
- package/lib/_util/StyleCache.js +10 -8
- package/lib/_util/StyleCache.js.map +1 -1
- package/lib/_util/encryptParams.js +22 -17
- 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 +6 -5
- package/lib/_util/getCookie.js.map +1 -1
- package/lib/_util/getDefaultMapInfo.js +8 -7
- package/lib/_util/getDefaultMapInfo.js.map +1 -1
- package/lib/_util/getSystemInfo.js +8 -7
- package/lib/_util/getSystemInfo.js.map +1 -1
- package/lib/_util/getToken.js +4 -2
- package/lib/_util/getToken.js.map +1 -1
- package/lib/_util/getUrlParam.js +3 -2
- package/lib/_util/getUrlParam.js.map +1 -1
- package/lib/_util/http.js +32 -30
- 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 +37 -33
- package/lib/_util/layer.js.map +1 -1
- package/lib/_util/mapTool.js +37 -36
- package/lib/_util/mapTool.js.map +1 -1
- package/lib/_util/projzh/datum/bd-09.js +3 -2
- package/lib/_util/projzh/datum/bd-09.js.map +1 -1
- package/lib/_util/projzh/datum/gcj-02.js +2 -1
- package/lib/_util/projzh/datum/gcj-02.js.map +1 -1
- package/lib/_util/projzh/datum/index.js +3 -2
- package/lib/_util/projzh/datum/index.js.map +1 -1
- package/lib/_util/projzh/index.js +3 -2
- package/lib/_util/projzh/index.js.map +1 -1
- package/lib/_util/projzh/projection/baidu-mercator.js +2 -1
- package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -1
- package/lib/_util/projzh/projection/index.js +3 -2
- package/lib/_util/projzh/projection/index.js.map +1 -1
- package/lib/_util/projzh/projection/spherical-mercator.js +2 -1
- package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -1
- package/lib/_util/projzh/util.js +2 -1
- package/lib/_util/projzh/util.js.map +1 -1
- package/lib/_util/search.js +16 -13
- package/lib/_util/search.js.map +1 -1
- package/lib/_util/setCookie.js +6 -5
- 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 +10 -9
- package/lib/_util/transform.js.map +1 -1
- package/lib/_util/useColSize.js +3 -2
- package/lib/_util/useColSize.js.map +1 -1
- package/lib/_util/useInterval.js.map +1 -1
- package/lib/_util/useSet.js +13 -12
- package/lib/_util/useSet.js.map +1 -1
- package/lib/analysis-layer/index.js +52 -45
- 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 +13 -11
- package/lib/buffer-draw/BufferDraw.js.map +1 -1
- package/lib/buffer-draw/index.js +10 -9
- 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 +24 -22
- package/lib/circle/Circle.js.map +1 -1
- package/lib/circle/index.js +4 -3
- 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 +2 -1
- package/lib/config.js.map +1 -1
- package/lib/convertCamelToCSS.js +2 -1
- package/lib/convertCamelToCSS.js.map +1 -1
- package/lib/dom/Dom.js +21 -19
- package/lib/dom/Dom.js.map +1 -1
- package/lib/dom/index.js +11 -10
- 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 +4 -2
- package/lib/events/index.js.map +1 -1
- package/lib/feature-draw/FeatureDraw.js +46 -40
- 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 +65 -64
- package/lib/feature-layer/FeatureLayer.js.map +1 -1
- package/lib/feature-layer/MyCluster.js +31 -28
- package/lib/feature-layer/MyCluster.js.map +1 -1
- package/lib/feature-layer/createFeatureCollection.js +47 -39
- package/lib/feature-layer/createFeatureCollection.js.map +1 -1
- package/lib/feature-layer/index.js +16 -15
- 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 +25 -22
- package/lib/flow-line-layer/FlowLineLayer.js.map +1 -1
- package/lib/flow-line-layer/index.js +16 -15
- 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 +14 -12
- package/lib/fly-line-layer/FlyLineLayer.js.map +1 -1
- package/lib/fly-line-layer/index.js +9 -8
- 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 -10
- package/lib/group-layer/GroupLayer.js.map +1 -1
- package/lib/group-layer/index.js +9 -8
- 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 +30 -29
- package/lib/heatmap-layer/HeatmapLayer.js.map +1 -1
- package/lib/heatmap-layer/index.js +9 -8
- 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 +15 -13
- package/lib/high-layer/HighLayer.js.map +1 -1
- package/lib/high-layer/index.js +13 -11
- 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 +33 -31
- package/lib/image-layer/ImageLayer.js.map +1 -1
- package/lib/image-layer/ImageTileLayer.js +33 -31
- package/lib/image-layer/ImageTileLayer.js.map +1 -1
- package/lib/image-layer/index.js +11 -10
- 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 +23 -20
- 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 +100 -100
- package/lib/map/Analysis.js +27 -24
- package/lib/map/Analysis.js.map +1 -1
- package/lib/map/Layers.js +28 -24
- package/lib/map/Layers.js.map +1 -1
- package/lib/map/Popup.js +24 -22
- package/lib/map/Popup.js.map +1 -1
- package/lib/map/ScaleDenominator.js +11 -9
- package/lib/map/ScaleDenominator.js.map +1 -1
- package/lib/map/Test.js +14 -12
- package/lib/map/Test.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +2 -1
- package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +3 -2
- package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js +10 -8
- package/lib/map/getBaseLayers/imagery/geoq/GeoQImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +9 -7
- package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -1
- package/lib/map/getBaseLayers/index.js +13 -11
- package/lib/map/getBaseLayers/index.js.map +1 -1
- package/lib/map/index.js +74 -71
- 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 +3 -2
- 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 +26 -23
- package/lib/marker/Marker.js.map +1 -1
- package/lib/marker/index.js +4 -3
- 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 +23 -21
- package/lib/path-line-layer/PathLineLayer.js.map +1 -1
- package/lib/path-line-layer/getPathLineStyles.js +9 -8
- package/lib/path-line-layer/getPathLineStyles.js.map +1 -1
- package/lib/path-line-layer/index.js +16 -15
- 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 +24 -21
- package/lib/path-play-back/PathPlayBack.js.map +1 -1
- package/lib/path-play-back/index.js +9 -8
- 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 +8 -7
- package/lib/poi-search/Location.js.map +1 -1
- package/lib/poi-search/PoiList.js +10 -9
- package/lib/poi-search/PoiList.js.map +1 -1
- package/lib/poi-search/Search.js +21 -20
- package/lib/poi-search/Search.js.map +1 -1
- package/lib/poi-search/index.js +11 -9
- 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 +24 -22
- package/lib/point/Point.js.map +1 -1
- package/lib/point/index.js +4 -3
- 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 +24 -22
- package/lib/polygon/Polygon.js.map +1 -1
- package/lib/polygon/index.js +4 -3
- 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 +24 -22
- package/lib/polyline/Polyline.js.map +1 -1
- package/lib/polyline/index.js +4 -3
- 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 +16 -14
- 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 +5 -3
- 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 +19 -17
- package/lib/renderer/Fill.js.map +1 -1
- package/lib/renderer/Stroke.js +19 -17
- package/lib/renderer/Stroke.js.map +1 -1
- package/lib/renderer/index.js +15 -12
- 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 +2 -1
- package/lib/renderer/transformRgb.js.map +1 -1
- package/lib/search-map/VtxModal.js +25 -22
- package/lib/search-map/VtxModal.js.map +1 -1
- package/lib/search-map/index.js +37 -33
- 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 +24 -21
- package/lib/tile-layer/TileLayer.js.map +1 -1
- package/lib/tile-layer/index.js +4 -3
- 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 +9 -8
- package/lib/tools/Layer/LayerService.js.map +1 -1
- package/lib/tools/Layer/LayersCheckService.js +39 -32
- package/lib/tools/Layer/LayersCheckService.js.map +1 -1
- package/lib/tools/Layer/index.js +15 -14
- package/lib/tools/Layer/index.js.map +1 -1
- package/lib/tools/Layer/index.less +43 -43
- package/lib/tools/Search/index.js +21 -18
- package/lib/tools/Search/index.js.map +1 -1
- package/lib/tools/Toolbox/BoxSelect/index.js +6 -5
- package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/CircleSelect/index.js +6 -5
- package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/EagleEye/index.js +11 -9
- package/lib/tools/Toolbox/EagleEye/index.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js +50 -44
- package/lib/tools/Toolbox/MapBookmark/Bookmark.js.map +1 -1
- package/lib/tools/Toolbox/MapBookmark/index.js +36 -34
- 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 +36 -33
- 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 +4 -3
- package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Distance/index.js +4 -3
- package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -1
- package/lib/tools/Toolbox/Measure/Measure.js +10 -8
- package/lib/tools/Toolbox/Measure/Measure.js.map +1 -1
- package/lib/tools/Toolbox/Measure/index.js +14 -12
- package/lib/tools/Toolbox/Measure/index.js.map +1 -1
- package/lib/tools/Toolbox/PolygonSelect/index.js +6 -5
- package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -1
- package/lib/tools/Toolbox/ScaleLine/index.js +11 -9
- package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -1
- package/lib/tools/Toolbox/SelectTools/index.js +62 -59
- 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 +25 -24
- 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 +11 -9
- 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 +10 -7
- package/lib/tools/Toolbox/index.js.map +1 -1
- package/lib/tools/Toolbox/index.less +2 -2
- package/lib/tools/Utils/CreateOverlay.js +11 -10
- package/lib/tools/Utils/CreateOverlay.js.map +1 -1
- package/lib/tools/Utils/Draw.js +19 -16
- package/lib/tools/Utils/Draw.js.map +1 -1
- package/lib/tools/Utils/HighLayer.js +16 -14
- package/lib/tools/Utils/HighLayer.js.map +1 -1
- package/lib/tools/Utils/measure.js +7 -6
- package/lib/tools/Utils/measure.js.map +1 -1
- package/lib/tools/Utils/utils.js +45 -36
- package/lib/tools/Utils/utils.js.map +1 -1
- package/lib/tools/View/index.js +16 -14
- package/lib/tools/View/index.js.map +1 -1
- package/lib/tools/View/index.less +28 -28
- package/lib/tools/analysis-tool/index.js +20 -18
- package/lib/tools/analysis-tool/index.js.map +1 -1
- package/lib/tools/base-map-switch/index.js +16 -14
- package/lib/tools/base-map-switch/index.js.map +1 -1
- package/lib/tools/components/Chart/index.js +140 -129
- package/lib/tools/components/Chart/index.js.map +1 -1
- package/lib/tools/components/Icon/index.js +3 -2
- package/lib/tools/components/Icon/index.js.map +1 -1
- package/lib/tools/components/Info/index.js +3 -2
- 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 +11 -9
- 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 +11 -10
- 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 +3 -2
- package/lib/tools/components/Select/index.js.map +1 -1
- package/lib/tools/components/Table/index.js +19 -17
- 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 +3 -2
- 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 +3 -2
- 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 +12 -10
- package/lib/tools/full-screen/index.js.map +1 -1
- package/lib/tools/index.js +11 -10
- package/lib/tools/index.js.map +1 -1
- package/lib/tools/layer-control/index.js +26 -22
- package/lib/tools/layer-control/index.js.map +1 -1
- package/lib/tools/refresh/index.js +12 -10
- 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 +11 -9
- package/lib/tools-item/index.js.map +1 -1
- package/lib/use-props/index.js +2 -1
- 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 +33 -31
- package/lib/wms-layer/WmsLayer.js.map +1 -1
- package/lib/wms-layer/index.js +11 -10
- 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 +120 -120
package/lib/dom/Dom.js
CHANGED
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
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
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 =
|
|
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);
|
|
25
27
|
function _default(options) {
|
|
26
28
|
var _this;
|
|
27
29
|
_classCallCheck(this, _default);
|
|
@@ -29,11 +31,11 @@ var _default = exports["default"] = /*#__PURE__*/function (_Overlay) {
|
|
|
29
31
|
if (options.stopEvent) {
|
|
30
32
|
_options.className = 'ol-overlay_container-stop_event';
|
|
31
33
|
}
|
|
32
|
-
_this =
|
|
34
|
+
_this = _super.call(this, _options);
|
|
33
35
|
_this.type = 'Dom';
|
|
34
36
|
return _this;
|
|
35
37
|
}
|
|
36
|
-
_inherits(_default, _Overlay);
|
|
37
38
|
return _createClass(_default);
|
|
38
39
|
}(_ol.Overlay);
|
|
40
|
+
exports["default"] = _default;
|
|
39
41
|
//# 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","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,QAA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,SAAAT,0BAAA,eAAAM,OAAA,qBAAAA,OAAA,CAAAC,SAAA,oBAAAD,OAAA,CAAAC,SAAA,CAAAK,IAAA,2BAAAC,KAAA,oCAAAC,OAAA,CAAA7C,SAAA,CAAA8C,OAAA,CAAAlC,IAAA,CAAAyB,OAAA,CAAAC,SAAA,CAAAO,OAAA,8CAAAE,CAAA;AAAA,SAAAb,gBAAAX,CAAA,IAAAW,eAAA,GAAAnE,MAAA,CAAA0D,cAAA,GAAA1D,MAAA,CAAAiF,cAAA,CAAAtB,IAAA,cAAAQ,gBAAAX,CAAA,WAAAA,CAAA,CAAAI,SAAA,IAAA5D,MAAA,CAAAiF,cAAA,CAAAzB,CAAA,aAAAW,eAAA,CAAAX,CAAA;AAAA,IAAA0B,QAAA,0BAAAC,QAAA;EAAAjC,SAAA,CAAAgC,QAAA,EAAAC,QAAA;EAAA,IAAAC,MAAA,GAAAvB,YAAA,CAAAqB,QAAA;EAGzB,SAAAA,SAAYG,OAAO,EAAE;IAAA,IAAAC,KAAA;IAAAtC,eAAA,OAAAkC,QAAA;IACjB,IAAMK,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
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
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
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -10,15 +10,16 @@ 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
|
|
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; }
|
|
22
23
|
function _default(props) {
|
|
23
24
|
var data = props.data,
|
|
24
25
|
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","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,GAAA,EAAAgB,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAf,GAAA,EAAAgB,GAAA,cA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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.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":""}
|
|
@@ -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":""}
|
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 =
|
|
10
|
+
var registerEventGeometry = function registerEventGeometry(layer, props) {
|
|
11
11
|
EVENT.map(function (v) {
|
|
12
12
|
layer[v] = function () {
|
|
13
13
|
var options = layer.getProperties();
|
|
@@ -15,11 +15,13 @@ var registerEventGeometry = exports.registerEventGeometry = function registerEve
|
|
|
15
15
|
};
|
|
16
16
|
});
|
|
17
17
|
};
|
|
18
|
-
|
|
18
|
+
exports.registerEventGeometry = registerEventGeometry;
|
|
19
|
+
var registerEventLayer = function registerEventLayer(layer, props) {
|
|
19
20
|
EVENT.map(function (v) {
|
|
20
21
|
layer[v] = function (e, a) {
|
|
21
22
|
props[v] && props[v](e, a);
|
|
22
23
|
};
|
|
23
24
|
});
|
|
24
25
|
};
|
|
26
|
+
exports.registerEventLayer = registerEventLayer;
|
|
25
27
|
//# sourceMappingURL=index.js.map
|
package/lib/events/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["EVENT","registerEventGeometry","
|
|
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,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(
|
|
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
4
|
Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
@@ -11,70 +11,73 @@ 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(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
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
|
|
38
|
-
function _setPrototypeOf(t, e) { return _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function (t, e) { return t.__proto__ = e, t; }, _setPrototypeOf(t, e); }
|
|
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); }
|
|
39
38
|
var ModifyConstrain = /*#__PURE__*/function (_Modify) {
|
|
39
|
+
_inherits(ModifyConstrain, _Modify);
|
|
40
|
+
var _super = _createSuper(ModifyConstrain);
|
|
40
41
|
function ModifyConstrain(options) {
|
|
41
42
|
var _this;
|
|
42
43
|
_classCallCheck(this, ModifyConstrain);
|
|
43
|
-
_this =
|
|
44
|
+
_this = _super.call(this, options);
|
|
44
45
|
_this.constrainGeom_ = options.constrainGeom;
|
|
45
46
|
return _this;
|
|
46
47
|
}
|
|
47
|
-
|
|
48
|
-
return _createClass(ModifyConstrain, [{
|
|
48
|
+
_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
|
+
_get(_getPrototypeOf(ModifyConstrain.prototype), "handleDragEvent", this).call(this, evt);
|
|
55
55
|
}
|
|
56
56
|
}]);
|
|
57
|
+
return ModifyConstrain;
|
|
57
58
|
}(_interaction.Modify);
|
|
58
59
|
var DrawConstrain = /*#__PURE__*/function (_Draw) {
|
|
60
|
+
_inherits(DrawConstrain, _Draw);
|
|
61
|
+
var _super2 = _createSuper(DrawConstrain);
|
|
59
62
|
function DrawConstrain(options) {
|
|
60
63
|
var _this2;
|
|
61
64
|
_classCallCheck(this, DrawConstrain);
|
|
62
|
-
_this2 =
|
|
65
|
+
_this2 = _super2.call(this, options);
|
|
63
66
|
_this2.constrainGeom_ = options.constrainGeom;
|
|
64
67
|
return _this2;
|
|
65
68
|
}
|
|
66
|
-
|
|
67
|
-
return _createClass(DrawConstrain, [{
|
|
69
|
+
_createClass(DrawConstrain, [{
|
|
68
70
|
key: "handlePointerMove_",
|
|
69
71
|
value: function handlePointerMove_(evt) {
|
|
70
72
|
if (this.constrainGeom_ && this.constrainGeom_.intersectsCoordinate && !this.constrainGeom_.intersectsCoordinate(evt.coordinate)) {
|
|
71
73
|
evt.coordinate = this.constrainGeom_.getClosestPoint(evt.coordinate);
|
|
72
74
|
}
|
|
73
|
-
|
|
75
|
+
_get(_getPrototypeOf(DrawConstrain.prototype), "handlePointerMove_", this).call(this, evt);
|
|
74
76
|
}
|
|
75
77
|
}]);
|
|
78
|
+
return DrawConstrain;
|
|
76
79
|
}(_interaction.Draw);
|
|
77
|
-
var drawStyle =
|
|
80
|
+
var drawStyle = function drawStyle(feature, style) {
|
|
78
81
|
var _style = [];
|
|
79
82
|
var styles = [new _style4.Style({
|
|
80
83
|
fill: new _style4.Fill({
|
|
@@ -100,7 +103,8 @@ var drawStyle = exports.drawStyle = function drawStyle(feature, style) {
|
|
|
100
103
|
}
|
|
101
104
|
return styles;
|
|
102
105
|
};
|
|
103
|
-
|
|
106
|
+
exports.drawStyle = drawStyle;
|
|
107
|
+
var _default = /*#__PURE__*/function () {
|
|
104
108
|
function _default(props, callback) {
|
|
105
109
|
var _this3 = this;
|
|
106
110
|
_classCallCheck(this, _default);
|
|
@@ -147,12 +151,12 @@ var _default = exports["default"] = /*#__PURE__*/function () {
|
|
|
147
151
|
}
|
|
148
152
|
}
|
|
149
153
|
|
|
150
|
-
/**
|
|
151
|
-
* @description:
|
|
152
|
-
* @param {*} drawType DragBox-框选 Circle-圈选 Polygon-多边形选择
|
|
153
|
-
* @return {*}
|
|
154
|
+
/**
|
|
155
|
+
* @description:
|
|
156
|
+
* @param {*} drawType DragBox-框选 Circle-圈选 Polygon-多边形选择
|
|
157
|
+
* @return {*}
|
|
154
158
|
*/
|
|
155
|
-
|
|
159
|
+
_createClass(_default, [{
|
|
156
160
|
key: "init",
|
|
157
161
|
value: function init(drawType) {
|
|
158
162
|
var _this4 = this;
|
|
@@ -226,5 +230,7 @@ var _default = exports["default"] = /*#__PURE__*/function () {
|
|
|
226
230
|
this.map.hideTip();
|
|
227
231
|
}
|
|
228
232
|
}]);
|
|
233
|
+
return _default;
|
|
229
234
|
}();
|
|
235
|
+
exports["default"] = _default;
|
|
230
236
|
//# sourceMappingURL=FeatureDraw.js.map
|