@sl-utils/map 1.0.8 → 1.0.9

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/demo/App.vue CHANGED
@@ -1,11 +1,24 @@
1
1
  <script setup lang="ts">
2
-
3
- import { SLUMap } from "@sl-utils/map";
2
+ import { SLUMap, MapPluginDraw } from "@sl-utils/map";
4
3
  import { ref, onMounted } from "vue";
5
4
 
6
-
7
5
  onMounted(() => {
8
- const map4 = new SLUMap("map");
6
+ const map4 = new SLUMap("map", { type: "A" });
7
+ setTimeout(() => {
8
+ const draw = new MapPluginDraw(map4.map);
9
+ draw.addRect({
10
+ latlngs: [
11
+ [26.3, 110.5],
12
+ [27.3, 112.5],
13
+ ],
14
+ width: 500,
15
+ height: 50,
16
+ });
17
+ draw.addArc({
18
+ latlng: [22.5, 114.0],
19
+ size: 100,
20
+ });
21
+ }, 1000);
9
22
  // const map1 = new MapCanvasDraw()
10
23
  // const map2 = new MapCanvasEvent()
11
24
  // const map3 = new MapCanvasLayer()