@vtx/ol-map 1.0.23 → 1.0.24

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.
Files changed (249) hide show
  1. package/lib/_util/EventEmitter.js +79 -0
  2. package/lib/_util/EventEmitter.js.map +1 -0
  3. package/lib/_util/getComponentProps.js +1 -1
  4. package/lib/_util/getCookie.js +1 -2
  5. package/lib/_util/getCookie.js.map +1 -1
  6. package/lib/_util/getDefaultMapInfo.js +4 -5
  7. package/lib/_util/getDefaultMapInfo.js.map +1 -1
  8. package/lib/_util/getSystemInfo.js +4 -5
  9. package/lib/_util/getSystemInfo.js.map +1 -1
  10. package/lib/_util/getToken.js +1 -2
  11. package/lib/_util/getToken.js.map +1 -1
  12. package/lib/_util/getUrlParam.js +1 -2
  13. package/lib/_util/getUrlParam.js.map +1 -1
  14. package/lib/_util/http.js +5 -6
  15. package/lib/_util/http.js.map +1 -1
  16. package/lib/_util/layer.js +7 -11
  17. package/lib/_util/layer.js.map +1 -1
  18. package/lib/_util/mapTool.js +1 -2
  19. package/lib/_util/mapTool.js.map +1 -1
  20. package/lib/_util/projzh/datum/bd-09.js +1 -2
  21. package/lib/_util/projzh/datum/bd-09.js.map +1 -1
  22. package/lib/_util/projzh/datum/gcj-02.js +1 -2
  23. package/lib/_util/projzh/datum/gcj-02.js.map +1 -1
  24. package/lib/_util/projzh/datum/index.js +1 -2
  25. package/lib/_util/projzh/datum/index.js.map +1 -1
  26. package/lib/_util/projzh/index.js +1 -2
  27. package/lib/_util/projzh/index.js.map +1 -1
  28. package/lib/_util/projzh/projection/baidu-mercator.js +1 -2
  29. package/lib/_util/projzh/projection/baidu-mercator.js.map +1 -1
  30. package/lib/_util/projzh/projection/index.js +1 -2
  31. package/lib/_util/projzh/projection/index.js.map +1 -1
  32. package/lib/_util/projzh/projection/spherical-mercator.js +1 -2
  33. package/lib/_util/projzh/projection/spherical-mercator.js.map +1 -1
  34. package/lib/_util/projzh/util.js +1 -2
  35. package/lib/_util/projzh/util.js.map +1 -1
  36. package/lib/_util/search.js +6 -10
  37. package/lib/_util/search.js.map +1 -1
  38. package/lib/_util/setCookie.js +1 -2
  39. package/lib/_util/setCookie.js.map +1 -1
  40. package/lib/_util/useColSize.js +1 -2
  41. package/lib/_util/useColSize.js.map +1 -1
  42. package/lib/_util/useSet.js +5 -6
  43. package/lib/_util/useSet.js.map +1 -1
  44. package/lib/{tools/Analysis/AnalysisLayer.js → analysis-layer/index.js} +87 -46
  45. package/lib/analysis-layer/index.js.map +1 -0
  46. package/lib/analysis-layer/style/css.js +2 -0
  47. package/lib/analysis-layer/style/css.js.map +1 -0
  48. package/lib/analysis-layer/style/index.js +2 -0
  49. package/lib/analysis-layer/style/index.js.map +1 -0
  50. package/lib/buffer-draw/BufferDraw.js +314 -0
  51. package/lib/buffer-draw/BufferDraw.js.map +1 -0
  52. package/lib/buffer-draw/index.js +51 -0
  53. package/lib/buffer-draw/index.js.map +1 -0
  54. package/lib/buffer-draw/style/css.js +2 -0
  55. package/lib/buffer-draw/style/css.js.map +1 -0
  56. package/lib/buffer-draw/style/index.js +2 -0
  57. package/lib/buffer-draw/style/index.js.map +1 -0
  58. package/lib/circle/Circle.js +52 -0
  59. package/lib/circle/Circle.js.map +1 -0
  60. package/lib/circle/index.js +65 -0
  61. package/lib/circle/index.js.map +1 -0
  62. package/lib/circle/style/css.js +2 -0
  63. package/lib/circle/style/css.js.map +1 -0
  64. package/lib/circle/style/index.js +2 -0
  65. package/lib/circle/style/index.js.map +1 -0
  66. package/lib/config.js +1 -2
  67. package/lib/config.js.map +1 -1
  68. package/lib/events/index.js +2 -4
  69. package/lib/events/index.js.map +1 -1
  70. package/lib/feature-draw/FeatureDraw.js +179 -0
  71. package/lib/feature-draw/FeatureDraw.js.map +1 -0
  72. package/lib/feature-draw/index.js +73 -0
  73. package/lib/feature-draw/index.js.map +1 -0
  74. package/lib/feature-draw/style/css.js +2 -0
  75. package/lib/feature-draw/style/css.js.map +1 -0
  76. package/lib/feature-draw/style/index.js +2 -0
  77. package/lib/feature-draw/style/index.js.map +1 -0
  78. package/lib/feature-layer/FeatureLayer.js +199 -125
  79. package/lib/feature-layer/FeatureLayer.js.map +1 -1
  80. package/lib/feature-layer/createFeatureCollection.js +11 -18
  81. package/lib/feature-layer/createFeatureCollection.js.map +1 -1
  82. package/lib/feature-layer/index.js +38 -15
  83. package/lib/feature-layer/index.js.map +1 -1
  84. package/lib/group-layer/GroupLayer.js +129 -0
  85. package/lib/group-layer/GroupLayer.js.map +1 -1
  86. package/lib/group-layer/index.js +71 -0
  87. package/lib/group-layer/index.js.map +1 -1
  88. package/lib/high-layer/HighLayer.js +192 -0
  89. package/lib/high-layer/HighLayer.js.map +1 -0
  90. package/lib/high-layer/index.js +40 -0
  91. package/lib/high-layer/index.js.map +1 -0
  92. package/lib/high-layer/style/css.js +2 -0
  93. package/lib/high-layer/style/css.js.map +1 -0
  94. package/lib/high-layer/style/index.js +2 -0
  95. package/lib/high-layer/style/index.js.map +1 -0
  96. package/lib/image-layer/ImageLayer.js +66 -12
  97. package/lib/image-layer/ImageLayer.js.map +1 -1
  98. package/lib/image-layer/index.js +33 -9
  99. package/lib/image-layer/index.js.map +1 -1
  100. package/lib/index.js +55 -0
  101. package/lib/index.js.map +1 -1
  102. package/lib/map/Layers.js +299 -0
  103. package/lib/map/Layers.js.map +1 -0
  104. package/lib/map/Popup.js +5 -6
  105. package/lib/map/Popup.js.map +1 -1
  106. package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js +1 -2
  107. package/lib/map/getBaseLayers/imagery/amap/AmapImageryProvider.js.map +1 -1
  108. package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js +1 -2
  109. package/lib/map/getBaseLayers/imagery/baidu/BaiduImageryProvider.js.map +1 -1
  110. package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js +3 -5
  111. package/lib/map/getBaseLayers/imagery/tdt/TdtImageryProvider.js.map +1 -1
  112. package/lib/map/getBaseLayers/index.js +2 -4
  113. package/lib/map/getBaseLayers/index.js.map +1 -1
  114. package/lib/map/index.js +66 -67
  115. package/lib/map/index.js.map +1 -1
  116. package/lib/map/style/index.css +11 -1
  117. package/lib/map/style/index.less +12 -1
  118. package/lib/map-icon/svg/index.js +29 -4
  119. package/lib/map-icon/svg/index.js.map +1 -1
  120. package/lib/marker/Marker.js +4 -5
  121. package/lib/marker/Marker.js.map +1 -1
  122. package/lib/marker/index.js +4 -4
  123. package/lib/marker/index.js.map +1 -1
  124. package/lib/poi-search/Location.js +4 -4
  125. package/lib/poi-search/Location.js.map +1 -1
  126. package/lib/poi-search/PoiList.js +5 -5
  127. package/lib/poi-search/PoiList.js.map +1 -1
  128. package/lib/poi-search/Search.js +4 -4
  129. package/lib/poi-search/Search.js.map +1 -1
  130. package/lib/poi-search/index.js +5 -6
  131. package/lib/poi-search/index.js.map +1 -1
  132. package/lib/point/Point.js +4 -5
  133. package/lib/point/Point.js.map +1 -1
  134. package/lib/point/index.js +4 -4
  135. package/lib/point/index.js.map +1 -1
  136. package/lib/polygon/Polygon.js +4 -5
  137. package/lib/polygon/Polygon.js.map +1 -1
  138. package/lib/polygon/index.js +4 -4
  139. package/lib/polygon/index.js.map +1 -1
  140. package/lib/polyline/Polyline.js +4 -5
  141. package/lib/polyline/Polyline.js.map +1 -1
  142. package/lib/polyline/index.js +4 -4
  143. package/lib/polyline/index.js.map +1 -1
  144. package/lib/{_util/Provider.js → provider/index.js} +3 -5
  145. package/lib/provider/index.js.map +1 -0
  146. package/lib/provider/style/css.js +2 -0
  147. package/lib/provider/style/css.js.map +1 -0
  148. package/lib/provider/style/index.js +2 -0
  149. package/lib/provider/style/index.js.map +1 -0
  150. package/lib/renderer/Fill.js +2 -3
  151. package/lib/renderer/Fill.js.map +1 -1
  152. package/lib/renderer/Stroke.js +2 -3
  153. package/lib/renderer/Stroke.js.map +1 -1
  154. package/lib/renderer/index.js +52 -4
  155. package/lib/renderer/index.js.map +1 -1
  156. package/lib/renderer/transformRgb.js +1 -2
  157. package/lib/renderer/transformRgb.js.map +1 -1
  158. package/lib/tile-layer/TileLayer.js +4 -5
  159. package/lib/tile-layer/TileLayer.js.map +1 -1
  160. package/lib/tile-layer/index.js +4 -4
  161. package/lib/tile-layer/index.js.map +1 -1
  162. package/lib/tools/Layer/LayerService.js +4 -5
  163. package/lib/tools/Layer/LayerService.js.map +1 -1
  164. package/lib/tools/Layer/LayersCheckService.js +8 -13
  165. package/lib/tools/Layer/LayersCheckService.js.map +1 -1
  166. package/lib/tools/Layer/index.js +4 -4
  167. package/lib/tools/Layer/index.js.map +1 -1
  168. package/lib/tools/Search/index.js +5 -6
  169. package/lib/tools/Search/index.js.map +1 -1
  170. package/lib/tools/Toolbox/BoxSelect/index.js +1 -2
  171. package/lib/tools/Toolbox/BoxSelect/index.js.map +1 -1
  172. package/lib/tools/Toolbox/CircleSelect/index.js +1 -2
  173. package/lib/tools/Toolbox/CircleSelect/index.js.map +1 -1
  174. package/lib/tools/Toolbox/EagleEye/index.js +5 -6
  175. package/lib/tools/Toolbox/EagleEye/index.js.map +1 -1
  176. package/lib/tools/Toolbox/MapBookmark/index.js +7 -8
  177. package/lib/tools/Toolbox/MapBookmark/index.js.map +1 -1
  178. package/lib/tools/Toolbox/MapPrint/index.js +6 -6
  179. package/lib/tools/Toolbox/MapPrint/index.js.map +1 -1
  180. package/lib/tools/Toolbox/Measure/Area/index.js +1 -2
  181. package/lib/tools/Toolbox/Measure/Area/index.js.map +1 -1
  182. package/lib/tools/Toolbox/Measure/Distance/index.js +1 -2
  183. package/lib/tools/Toolbox/Measure/Distance/index.js.map +1 -1
  184. package/lib/tools/Toolbox/Measure/Measure.js +2 -3
  185. package/lib/tools/Toolbox/Measure/Measure.js.map +1 -1
  186. package/lib/tools/Toolbox/Measure/index.js +5 -6
  187. package/lib/tools/Toolbox/Measure/index.js.map +1 -1
  188. package/lib/tools/Toolbox/PolygonSelect/index.js +1 -2
  189. package/lib/tools/Toolbox/PolygonSelect/index.js.map +1 -1
  190. package/lib/tools/Toolbox/ScaleLine/index.js +5 -6
  191. package/lib/tools/Toolbox/ScaleLine/index.js.map +1 -1
  192. package/lib/tools/Toolbox/SelectTools/index.js +5 -6
  193. package/lib/tools/Toolbox/SelectTools/index.js.map +1 -1
  194. package/lib/tools/Toolbox/SpaceQuery/index.js +6 -6
  195. package/lib/tools/Toolbox/SpaceQuery/index.js.map +1 -1
  196. package/lib/tools/Toolbox/index.js +4 -4
  197. package/lib/tools/Toolbox/index.js.map +1 -1
  198. package/lib/tools/Utils/CreateOverlay.js +2 -3
  199. package/lib/tools/Utils/CreateOverlay.js.map +1 -1
  200. package/lib/tools/Utils/Draw.js +5 -7
  201. package/lib/tools/Utils/Draw.js.map +1 -1
  202. package/lib/tools/Utils/HighLayer.js +4 -5
  203. package/lib/tools/Utils/HighLayer.js.map +1 -1
  204. package/lib/tools/Utils/measure.js +1 -2
  205. package/lib/tools/Utils/measure.js.map +1 -1
  206. package/lib/tools/Utils/utils.js +10 -18
  207. package/lib/tools/Utils/utils.js.map +1 -1
  208. package/lib/tools/View/index.js +7 -8
  209. package/lib/tools/View/index.js.map +1 -1
  210. package/lib/tools/analysis-tool/index.js +90 -0
  211. package/lib/tools/analysis-tool/index.js.map +1 -0
  212. package/lib/tools/base-map-switch/index.js +7 -8
  213. package/lib/tools/base-map-switch/index.js.map +1 -1
  214. package/lib/tools/components/Icon/index.js +1 -2
  215. package/lib/tools/components/Icon/index.js.map +1 -1
  216. package/lib/tools/components/ItemWrap/index.js +4 -4
  217. package/lib/tools/components/ItemWrap/index.js.map +1 -1
  218. package/lib/tools/components/Modal/index.js +1 -2
  219. package/lib/tools/components/Modal/index.js.map +1 -1
  220. package/lib/tools/components/RequiredLabel/index.js +3 -3
  221. package/lib/tools/components/RequiredLabel/index.js.map +1 -1
  222. package/lib/tools/components/Select/index.js +1 -2
  223. package/lib/tools/components/Select/index.js.map +1 -1
  224. package/lib/tools/components/Table/index.js +4 -5
  225. package/lib/tools/components/Table/index.js.map +1 -1
  226. package/lib/tools/components/ToolItem/index.js +1 -2
  227. package/lib/tools/components/ToolItem/index.js.map +1 -1
  228. package/lib/tools/components/ToolsSelect/index.js +1 -2
  229. package/lib/tools/components/ToolsSelect/index.js.map +1 -1
  230. package/lib/tools/index.js +24 -8
  231. package/lib/tools/index.js.map +1 -1
  232. package/lib/tools/layer-control/index.css +15 -0
  233. package/lib/tools/layer-control/index.js +163 -0
  234. package/lib/tools/layer-control/index.js.map +1 -0
  235. package/lib/tools/layer-control/index.less +22 -0
  236. package/lib/tools/style/index.css +42 -0
  237. package/lib/tools/style/index.less +35 -0
  238. package/lib/tools-item/index.js +5 -6
  239. package/lib/tools-item/index.js.map +1 -1
  240. package/lib/{_util/useProps.js → use-props/index.js} +4 -5
  241. package/lib/use-props/index.js.map +1 -0
  242. package/lib/use-props/style/css.js +2 -0
  243. package/lib/use-props/style/css.js.map +1 -0
  244. package/lib/use-props/style/index.js +2 -0
  245. package/lib/use-props/style/index.js.map +1 -0
  246. package/package.json +2 -2
  247. package/lib/_util/Provider.js.map +0 -1
  248. package/lib/_util/useProps.js.map +0 -1
  249. package/lib/tools/Analysis/AnalysisLayer.js.map +0 -1
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["circle/style/index.js"],"sourcesContent":[""],"mappings":""}
package/lib/config.js CHANGED
@@ -5,9 +5,8 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports["default"] = void 0;
7
7
  var globalCfg = window.VtxPublicServiceAddress || {};
8
- var _default = {
8
+ var _default = exports["default"] = {
9
9
  // ztree文件地址
10
10
  ztreeServer: globalCfg.ztreeServer ? globalCfg.ztreeServer : '//vortexplugin.cloudhw.cn/ztree'
11
11
  };
12
- exports["default"] = _default;
13
12
  //# sourceMappingURL=config.js.map
package/lib/config.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"config.js","names":["globalCfg","window","VtxPublicServiceAddress","_default","ztreeServer","exports"],"sources":["config.js"],"sourcesContent":["const globalCfg = window.VtxPublicServiceAddress || {};\r\n\r\nexport default {\r\n // ztree文件地址\r\n ztreeServer: globalCfg.ztreeServer ? globalCfg.ztreeServer : '//vortexplugin.cloudhw.cn/ztree',\r\n};\r\n"],"mappings":";;;;;;AAAA,IAAMA,SAAS,GAAGC,MAAM,CAACC,uBAAuB,IAAI,CAAC,CAAC;AAAC,IAAAC,QAAA,GAExC;EACX;EACAC,WAAW,EAAEJ,SAAS,CAACI,WAAW,GAAGJ,SAAS,CAACI,WAAW,GAAG;AACjE,CAAC;AAAAC,OAAA,cAAAF,QAAA"}
1
+ {"version":3,"file":"config.js","names":["globalCfg","window","VtxPublicServiceAddress","_default","exports","ztreeServer"],"sources":["config.js"],"sourcesContent":["const globalCfg = window.VtxPublicServiceAddress || {};\r\n\r\nexport default {\r\n // ztree文件地址\r\n ztreeServer: globalCfg.ztreeServer ? globalCfg.ztreeServer : '//vortexplugin.cloudhw.cn/ztree',\r\n};\r\n"],"mappings":";;;;;;AAAA,IAAMA,SAAS,GAAGC,MAAM,CAACC,uBAAuB,IAAI,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,cAExC;EACX;EACAC,WAAW,EAAEL,SAAS,CAACK,WAAW,GAAGL,SAAS,CAACK,WAAW,GAAG;AACjE,CAAC"}
@@ -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.registerEventGeometry = registerEventGeometry;
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) {
22
21
  props[v] && props[v](e);
23
22
  };
24
23
  });
25
24
  };
26
- exports.registerEventLayer = registerEventLayer;
27
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["EVENT","registerEventGeometry","layer","props","map","v","options","getProperties","exports","registerEventLayer","e"],"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 => {\r\n props[v] && props[v](e);\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,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,UAAAK,CAAC,EAAI;MACZP,KAAK,CAACE,CAAC,CAAC,IAAIF,KAAK,CAACE,CAAC,CAAC,CAACK,CAAC,CAAC;IAC3B,CAAC;EACL,CAAC,CAAC;AACN,CAAC;AAACF,OAAA,CAAAC,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"file":"index.js","names":["EVENT","registerEventGeometry","exports","layer","props","map","v","options","getProperties","registerEventLayer","e"],"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 => {\r\n props[v] && props[v](e);\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,UAAAI,CAAC,EAAI;MACZN,KAAK,CAACE,CAAC,CAAC,IAAIF,KAAK,CAACE,CAAC,CAAC,CAACI,CAAC,CAAC;IAC3B,CAAC;EACL,CAAC,CAAC;AACN,CAAC"}
@@ -0,0 +1,179 @@
1
+ "use strict";
2
+
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
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.drawStyle = exports["default"] = void 0;
8
+ var _layer = require("ol/layer");
9
+ var _source = require("ol/source");
10
+ var _interaction = require("ol/interaction");
11
+ var _Draw = require("ol/interaction/Draw");
12
+ var _style4 = require("ol/style");
13
+ var _Marker = _interopRequireDefault(require("../marker/Marker"));
14
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
15
+ function ownKeys(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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
18
+ 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); } }
19
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
20
+ 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; }
21
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
22
+ 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); }
23
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
24
+ 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."); }
25
+ 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); }
26
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
27
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
28
+ 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; }
29
+ var drawStyle = exports.drawStyle = function drawStyle(feature, style) {
30
+ var _style = [];
31
+ var styles = [new _style4.Style({
32
+ fill: new _style4.Fill({
33
+ color: 'rgba(255, 255, 255, 0.6)'
34
+ }),
35
+ stroke: new _style4.Stroke({
36
+ color: '#009BFF',
37
+ width: 2
38
+ }),
39
+ image: new _style4.Circle({
40
+ radius: 4,
41
+ fill: new _style4.Fill({
42
+ color: 'rgba(0,155,255, 0.8)'
43
+ })
44
+ })
45
+ })];
46
+ if (style) {
47
+ var _style2;
48
+ if (typeof style === 'function') {
49
+ _style = style(feature);
50
+ }
51
+ if (Array.isArray(_style) && (_style2 = _style) !== null && _style2 !== void 0 && _style2.length) styles.push.apply(styles, _toConsumableArray(_style));
52
+ }
53
+ return styles;
54
+ };
55
+ var _default = exports["default"] = /*#__PURE__*/function () {
56
+ function _default(props, callback) {
57
+ var _this = this;
58
+ _classCallCheck(this, _default);
59
+ _defineProperty(this, "initModify", function () {
60
+ var t = _this;
61
+ var modify = new _interaction.Modify({
62
+ source: _this.source
63
+ });
64
+ _this.map.addInteraction(modify);
65
+ modify.on('modifyend', function (event) {
66
+ var features = event.features;
67
+ var feature = features.item(features.getLength() - 1);
68
+ _this.drawFeature = feature;
69
+ var _feature = feature.clone();
70
+ t.callback && t.callback(_feature);
71
+ });
72
+ });
73
+ var _props$continuousDraw = props.continuousDraw,
74
+ continuousDraw = _props$continuousDraw === void 0 ? true : _props$continuousDraw,
75
+ _style3 = props.style,
76
+ markerStyle = props.markerStyle;
77
+ this.map = props.map;
78
+ this.drawTool = null;
79
+ this.drawFeature = null;
80
+ this.maxPoints = props.maxPoints;
81
+ this.drawType = props.drawType;
82
+ this.callback = callback;
83
+ this.continuousDraw = continuousDraw; // 连续绘制
84
+ this.style = _style3;
85
+ this.source = new _source.Vector();
86
+ this.layer = new _layer.Vector({
87
+ source: this.source,
88
+ zIndex: props.zIndex || 20,
89
+ style: function style(feature) {
90
+ return drawStyle(feature, _style3);
91
+ }
92
+ });
93
+ this.map.addLayer(this.layer);
94
+ if (!props.onlyDraw) {
95
+ this.initModify();
96
+ }
97
+ }
98
+
99
+ /**
100
+ * @description:
101
+ * @param {*} drawType DragBox-框选 Circle-圈选 Polygon-多边形选择
102
+ * @return {*}
103
+ */
104
+ _createClass(_default, [{
105
+ key: "init",
106
+ value: function init(drawType) {
107
+ var _this2 = this;
108
+ var callback = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this.callback;
109
+ var markerStyle = arguments.length > 2 ? arguments[2] : undefined;
110
+ var t = this;
111
+ if (drawType) {
112
+ var drawTool = new _interaction.Draw(_objectSpread(_objectSpread({
113
+ type: drawType,
114
+ maxPoints: this.maxPoints,
115
+ style: function style(feature) {
116
+ return drawStyle(feature, t.style);
117
+ }
118
+ }, drawType === 'DragBox' ? {
119
+ type: 'Circle',
120
+ geometryFunction: (0, _Draw.createBox)()
121
+ } : {}), drawType === 'Marker' ? {
122
+ type: 'Point'
123
+ } : {}));
124
+ drawTool.on('drawstart', function () {
125
+ _this2.drawTool.setActive(true);
126
+ _this2.map.showTip('再次点击确定结束点');
127
+ _this2.clearFeatures();
128
+ _this2.callbackFn && _this2.callbackFn();
129
+ });
130
+ drawTool.on('drawend', function (event) {
131
+ _this2.map.showTip('鼠标左键确定起始点');
132
+ var drawSource = _this2.layer.getSource();
133
+ _this2.drawFeature = event.feature;
134
+ var _feature = event.feature.clone();
135
+ if (drawType == 'Marker') {
136
+ event.feature.setStyle(new _Marker["default"](markerStyle));
137
+ }
138
+ drawSource.addFeature(event.feature);
139
+ callback && callback(_feature);
140
+ _this2.drawTool.setActive(t.continuousDraw);
141
+ });
142
+ this.drawTool = drawTool;
143
+ this.map.showTip('鼠标左键确定起始点');
144
+ this.map.addInteraction(drawTool);
145
+ }
146
+ }
147
+ }, {
148
+ key: "clearFeatures",
149
+ value: function clearFeatures() {
150
+ this.source && this.source.clear();
151
+ this.map.hideTip();
152
+ }
153
+ }, {
154
+ key: "loadFeatures",
155
+ value: function loadFeatures(feature) {
156
+ if (this.style) {
157
+ feature.setStyle(drawStyle(feature, this.style));
158
+ }
159
+ // feature.setStyle(drawStyle(feature, this.style));
160
+ this.source && this.source.addFeatures([feature]);
161
+ this.drawFeature = feature;
162
+ }
163
+ }, {
164
+ key: "removeDrawTool",
165
+ value: function removeDrawTool() {
166
+ this.map.removeInteraction(this.drawTool);
167
+ }
168
+ }, {
169
+ key: "destroy",
170
+ value: function destroy() {
171
+ this.map.removeLayer(this.layer);
172
+ this.removeDrawTool();
173
+ this.drawTool && this.drawTool.setActive(false);
174
+ this.map.hideTip();
175
+ }
176
+ }]);
177
+ return _default;
178
+ }();
179
+ //# sourceMappingURL=FeatureDraw.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FeatureDraw.js","names":["_layer","require","_source","_interaction","_Draw","_style4","_Marker","_interopRequireDefault","obj","__esModule","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","_classCallCheck","instance","Constructor","TypeError","_defineProperties","target","props","i","descriptor","configurable","writable","_toPropertyKey","key","_createClass","protoProps","staticProps","prototype","value","arg","_toPrimitive","_typeof","String","input","hint","prim","Symbol","toPrimitive","undefined","res","call","Number","_toConsumableArray","arr","_arrayWithoutHoles","_iterableToArray","_unsupportedIterableToArray","_nonIterableSpread","minLen","_arrayLikeToArray","n","toString","slice","constructor","name","Array","from","test","iter","iterator","isArray","len","arr2","drawStyle","exports","feature","style","_style","styles","Style","fill","Fill","color","stroke","Stroke","width","image","CircleStyle","radius","_style2","_default","callback","_this","modify","Modify","source","map","addInteraction","on","event","features","item","getLength","drawFeature","_feature","clone","_props$continuousDraw","continuousDraw","markerStyle","drawTool","maxPoints","drawType","VectorSource","layer","VectorLayer","zIndex","addLayer","onlyDraw","initModify","init","_this2","Draw","type","geometryFunction","createBox","setActive","showTip","clearFeatures","callbackFn","drawSource","getSource","setStyle","Marker","addFeature","clear","hideTip","loadFeatures","addFeatures","removeDrawTool","removeInteraction","destroy","removeLayer"],"sources":["feature-draw/FeatureDraw.js"],"sourcesContent":["import { Vector as VectorLayer } from 'ol/layer';\r\nimport { Vector as VectorSource } from 'ol/source';\r\nimport { Draw, Modify } from 'ol/interaction';\r\nimport { createBox } from 'ol/interaction/Draw';\r\nimport { Stroke, Style, Circle as CircleStyle, Fill, Icon } from 'ol/style';\r\nimport Marker from '../marker/Marker';\r\n\r\nexport const drawStyle = (feature, style) => {\r\n let _style = [];\r\n\r\n let styles = [\r\n new Style({\r\n fill: new Fill({\r\n color: 'rgba(255, 255, 255, 0.6)',\r\n }),\r\n stroke: new Stroke({\r\n color: '#009BFF',\r\n width: 2,\r\n }),\r\n image: new CircleStyle({\r\n radius: 4,\r\n fill: new Fill({\r\n color: 'rgba(0,155,255, 0.8)',\r\n }),\r\n }),\r\n }),\r\n ];\r\n\r\n if (style) {\r\n if (typeof style === 'function') {\r\n _style = style(feature);\r\n }\r\n if (Array.isArray(_style) && _style?.length) styles.push(..._style);\r\n }\r\n return styles;\r\n};\r\nexport default class {\r\n constructor(props, callback) {\r\n const { continuousDraw = true, style, markerStyle } = props;\r\n\r\n this.map = props.map;\r\n this.drawTool = null;\r\n this.drawFeature = null;\r\n this.maxPoints = props.maxPoints;\r\n this.drawType = props.drawType;\r\n this.callback = callback;\r\n this.continuousDraw = continuousDraw; // 连续绘制\r\n this.style = style;\r\n this.source = new VectorSource();\r\n\r\n this.layer = new VectorLayer({\r\n source: this.source,\r\n zIndex: props.zIndex || 20,\r\n style: function(feature) {\r\n return drawStyle(feature, style);\r\n },\r\n });\r\n\r\n this.map.addLayer(this.layer);\r\n if (!props.onlyDraw) {\r\n this.initModify();\r\n }\r\n }\r\n\r\n /**\r\n * @description:\r\n * @param {*} drawType DragBox-框选 Circle-圈选 Polygon-多边形选择\r\n * @return {*}\r\n */\r\n init(drawType, callback = this.callback, markerStyle) {\r\n const t = this;\r\n if (drawType) {\r\n const drawTool = new Draw({\r\n type: drawType,\r\n maxPoints: this.maxPoints,\r\n style: function(feature) {\r\n return drawStyle(feature, t.style);\r\n },\r\n ...(drawType === 'DragBox'\r\n ? {\r\n type: 'Circle',\r\n geometryFunction: createBox(),\r\n }\r\n : {}),\r\n ...(drawType === 'Marker'\r\n ? {\r\n type: 'Point',\r\n }\r\n : {}),\r\n });\r\n drawTool.on('drawstart', () => {\r\n this.drawTool.setActive(true);\r\n this.map.showTip('再次点击确定结束点');\r\n this.clearFeatures();\r\n this.callbackFn && this.callbackFn();\r\n });\r\n drawTool.on('drawend', event => {\r\n this.map.showTip('鼠标左键确定起始点');\r\n let drawSource = this.layer.getSource();\r\n this.drawFeature = event.feature;\r\n let _feature = event.feature.clone();\r\n if (drawType == 'Marker') {\r\n event.feature.setStyle(new Marker(markerStyle));\r\n }\r\n drawSource.addFeature(event.feature);\r\n callback && callback(_feature);\r\n this.drawTool.setActive(t.continuousDraw);\r\n });\r\n this.drawTool = drawTool;\r\n\r\n this.map.showTip('鼠标左键确定起始点');\r\n\r\n this.map.addInteraction(drawTool);\r\n }\r\n }\r\n\r\n initModify = () => {\r\n const t = this;\r\n const modify = new Modify({\r\n source: this.source,\r\n });\r\n this.map.addInteraction(modify);\r\n modify.on('modifyend', event => {\r\n let features = event.features;\r\n let feature = features.item(features.getLength() - 1);\r\n this.drawFeature = feature;\r\n let _feature = feature.clone();\r\n t.callback && t.callback(_feature);\r\n });\r\n };\r\n\r\n clearFeatures() {\r\n this.source && this.source.clear();\r\n this.map.hideTip();\r\n }\r\n loadFeatures(feature) {\r\n if (this.style) {\r\n feature.setStyle(drawStyle(feature, this.style));\r\n }\r\n // feature.setStyle(drawStyle(feature, this.style));\r\n this.source && this.source.addFeatures([feature]);\r\n this.drawFeature = feature;\r\n }\r\n\r\n removeDrawTool() {\r\n this.map.removeInteraction(this.drawTool);\r\n }\r\n destroy() {\r\n this.map.removeLayer(this.layer);\r\n this.removeDrawTool();\r\n this.drawTool && this.drawTool.setActive(false);\r\n this.map.hideTip();\r\n }\r\n}\r\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,KAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAC,sBAAA,CAAAN,OAAA;AAAsC,SAAAM,uBAAAC,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,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,CAAA;AAAA,SAAAU,cAAAZ,CAAA,aAAAC,CAAA,MAAAA,CAAA,GAAAY,SAAA,CAAAC,MAAA,EAAAb,CAAA,UAAAC,CAAA,WAAAW,SAAA,CAAAZ,CAAA,IAAAY,SAAA,CAAAZ,CAAA,QAAAA,CAAA,OAAAF,OAAA,CAAAI,MAAA,CAAAD,CAAA,OAAAa,OAAA,WAAAd,CAAA,IAAAe,eAAA,CAAAhB,CAAA,EAAAC,CAA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,CAAC;MAC/C,IAAI,CAAC7B,GAAG,CAACuC,OAAO,CAAC,CAAC;IACtB;EAAC;EAAA,OAAA7C,QAAA;AAAA"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports["default"] = FeatureDraw;
7
+ var _react = require("react");
8
+ var _useProps2 = _interopRequireDefault(require("../use-props"));
9
+ var _FeatureDraw = _interopRequireDefault(require("./FeatureDraw"));
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
12
+ 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); }
13
+ 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; }
14
+ 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; }
15
+ 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; }
16
+ function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
17
+ 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); }
18
+ function FeatureDraw(props) {
19
+ var _useProps = (0, _useProps2["default"])(),
20
+ map = _useProps.map;
21
+ var drawRef = (0, _react.useRef)();
22
+ var _props$drawType = props.drawType,
23
+ drawType = _props$drawType === void 0 ? '' : _props$drawType,
24
+ _props$onDrawEnd = props.onDrawEnd,
25
+ onDrawEnd = _props$onDrawEnd === void 0 ? function () {} : _props$onDrawEnd,
26
+ _props$feature = props.feature,
27
+ feature = _props$feature === void 0 ? null : _props$feature,
28
+ _props$style = props.style,
29
+ style = _props$style === void 0 ? null : _props$style,
30
+ _props$markerStyle = props.markerStyle,
31
+ markerStyle = _props$markerStyle === void 0 ? {
32
+ icon: 'YWZ',
33
+ color: '#119FFB'
34
+ } : _props$markerStyle;
35
+ (0, _react.useEffect)(function () {
36
+ drawRef.current = new _FeatureDraw["default"](_objectSpread(_objectSpread({}, props), {}, {
37
+ map: map,
38
+ style: style
39
+ }), function (feature, distance) {
40
+ onDrawEnd(feature, distance);
41
+ });
42
+ return function () {
43
+ drawRef.current.destroy();
44
+ };
45
+ }, []);
46
+ (0, _react.useEffect)(function () {
47
+ if (drawRef.current) {
48
+ var _drawRef$current, _drawRef$current2;
49
+ (_drawRef$current = drawRef.current) === null || _drawRef$current === void 0 || _drawRef$current.clearFeatures();
50
+ (_drawRef$current2 = drawRef.current) === null || _drawRef$current2 === void 0 || _drawRef$current2.removeDrawTool();
51
+ // 如果有features的话 加载features
52
+ if (feature) {
53
+ var _drawRef$current3;
54
+ (_drawRef$current3 = drawRef.current) === null || _drawRef$current3 === void 0 || _drawRef$current3.loadFeatures(feature);
55
+ } else {
56
+ var _drawRef$current4;
57
+ (_drawRef$current4 = drawRef.current) === null || _drawRef$current4 === void 0 || _drawRef$current4.init(drawType, function (feature, distance) {
58
+ onDrawEnd(feature, distance);
59
+ }, markerStyle);
60
+ }
61
+ drawRef.current.drawType = drawType;
62
+ }
63
+ }, [drawType, feature]);
64
+ return null;
65
+ }
66
+ FeatureDraw.propTypes = {
67
+ drawType: _propTypes["default"].string,
68
+ onDrawEnd: _propTypes["default"].func,
69
+ feature: _propTypes["default"].object,
70
+ style: _propTypes["default"].object,
71
+ markerStyle: _propTypes["default"].object
72
+ };
73
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_react","require","_useProps2","_interopRequireDefault","_FeatureDraw","_propTypes","obj","__esModule","_typeof","o","Symbol","iterator","constructor","prototype","ownKeys","e","r","t","Object","keys","getOwnPropertySymbols","filter","getOwnPropertyDescriptor","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty","getOwnPropertyDescriptors","defineProperties","defineProperty","key","value","_toPropertyKey","configurable","writable","arg","_toPrimitive","String","input","hint","prim","toPrimitive","undefined","res","call","TypeError","Number","FeatureDraw","props","_useProps","useProps","map","drawRef","useRef","_props$drawType","drawType","_props$onDrawEnd","onDrawEnd","_props$feature","feature","_props$style","style","_props$markerStyle","markerStyle","icon","color","useEffect","current","FeatureDrawFun","distance","destroy","_drawRef$current","_drawRef$current2","clearFeatures","removeDrawTool","_drawRef$current3","loadFeatures","_drawRef$current4","init","propTypes","PropTypes","string","func","object"],"sources":["feature-draw/index.js"],"sourcesContent":["import { useRef, useEffect } from 'react';\r\nimport useProps from '../use-props';\r\nimport FeatureDrawFun from './FeatureDraw';\r\nimport PropTypes from 'prop-types';\r\n\r\nexport default function FeatureDraw(props) {\r\n const { map } = useProps();\r\n const drawRef = useRef();\r\n const {\r\n drawType = '',\r\n onDrawEnd = () => {},\r\n feature = null,\r\n style = null,\r\n markerStyle = { icon: 'YWZ', color: '#119FFB' },\r\n } = props;\r\n useEffect(() => {\r\n drawRef.current = new FeatureDrawFun({ ...props, map, style }, (feature, distance) => {\r\n onDrawEnd(feature, distance);\r\n });\r\n return () => {\r\n drawRef.current.destroy();\r\n };\r\n }, []);\r\n\r\n useEffect(() => {\r\n if (drawRef.current) {\r\n drawRef.current?.clearFeatures();\r\n drawRef.current?.removeDrawTool();\r\n // 如果有features的话 加载features\r\n if (feature) {\r\n drawRef.current?.loadFeatures(feature);\r\n } else {\r\n drawRef.current?.init(\r\n drawType,\r\n (feature, distance) => {\r\n onDrawEnd(feature, distance);\r\n },\r\n markerStyle,\r\n );\r\n }\r\n\r\n drawRef.current.drawType = drawType;\r\n }\r\n }, [drawType, feature]);\r\n\r\n return null;\r\n}\r\nFeatureDraw.propTypes = {\r\n drawType: PropTypes.string,\r\n onDrawEnd: PropTypes.func,\r\n feature: PropTypes.object,\r\n style: PropTypes.object,\r\n markerStyle: PropTypes.object,\r\n};\r\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAD,sBAAA,CAAAF,OAAA;AACA,IAAAI,UAAA,GAAAF,sBAAA,CAAAF,OAAA;AAAmC,SAAAE,uBAAAG,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,gBAAAA,GAAA;AAAA,SAAAE,QAAAC,CAAA,sCAAAD,OAAA,wBAAAE,MAAA,uBAAAA,MAAA,CAAAC,QAAA,aAAAF,CAAA,kBAAAA,CAAA,gBAAAA,CAAA,WAAAA,CAAA,yBAAAC,MAAA,IAAAD,CAAA,CAAAG,WAAA,KAAAF,MAAA,IAAAD,CAAA,KAAAC,MAAA,CAAAG,SAAA,qBAAAJ,CAAA,KAAAD,OAAA,CAAAC,CAAA;AAAA,SAAAK,QAAAC,CAAA,EAAAC,CAAA,QAAAC,CAAA,GAAAC,MAAA,CAAAC,IAAA,CAAAJ,CAAA,OAAAG,MAAA,CAAAE,qBAAA,QAAAX,CAAA,GAAAS,MAAA,CAAAE,qBAAA,CAAAL,CAAA,GAAAC,CAAA,KAAAP,CAAA,GAA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,EAAEqB,qBAAS,CAACG,MAAM;EACzBtB,KAAK,EAAEmB,qBAAS,CAACG,MAAM;EACvBpB,WAAW,EAAEiB,qBAAS,CAACG;AAC3B,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=css.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"css.js","names":[],"sources":["feature-draw/style/index.js"],"sourcesContent":[""],"mappings":""}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["feature-draw/style/index.js"],"sourcesContent":[""],"mappings":""}