mapboxgl-tools 1.5.1 → 1.5.2

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 (2) hide show
  1. package/README.md +33 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -292,5 +292,38 @@ export default {
292
292
  }
293
293
  }
294
294
 
295
+ </script>
296
+ ```
297
+
298
+ ### 8.PositionControl
299
+ > 测量面积mapboxgl控制器
300
+
301
+ | Property | Type | 默认值 | Description |
302
+ | ----- | ------------- | ------------- | ------------------------ |
303
+ | title | String | 测量面积 | 入口按钮title |
304
+ | layout | String | { icon-size: 0.2, icon-anchor: 'bottom', icon-image: ['case', ['get', 'current'], IMAGE_POSCONTROL_ACT, IMAGE_POSCONTROL_NOR ] } | mapboxgl-layout, 当前的定位点current属性为true |
305
+ | paint | String | {} | mapboxgl-paint |
306
+
307
+ ```js
308
+ <template>
309
+ <section id="map" style="width: 90%; height: 700px"></section>
310
+ </template>
311
+
312
+ <script>
313
+ import { PositionControl, transformRequest4326 } from 'mapboxgl-tools'
314
+
315
+ export default {
316
+ mounted() {
317
+ const map = new mapboxgl.Map({
318
+ container: 'map',
319
+ style: 'mapbox://styles/mapbox/light-v11',
320
+ zoom: 18,
321
+ center: [114.26697720786854,30.63091896813168],
322
+ transformRequest: transformRequest4326,
323
+ })
324
+ map.addControl(new PositionControl(), 'top-right')
325
+ }
326
+ }
327
+
295
328
  </script>
296
329
  ```
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "瓦片",
10
10
  "control"
11
11
  ],
12
- "version": "1.5.1",
12
+ "version": "1.5.2",
13
13
  "private": false,
14
14
  "type": "module",
15
15
  "author": "Wbiokr",