@@ -6,12 +6,12 @@ ol-geom-line-string can be used inside a ol-feature to draw lines on the map.
66import LineString from " @demos/LineString.vue"
77</script >
88<ClientOnly >
9- <LineString />
9+ <LineString />
1010</ClientOnly >
1111
1212## Usage
1313
14- ``` html
14+ ``` vue
1515<template>
1616 <ol-map
1717 :loadTilesWhileAnimating="true"
@@ -34,7 +34,24 @@ import LineString from "@demos/LineString.vue"
3434 <ol-source-vector>
3535 <ol-feature>
3636 <ol-geom-line-string
37- :coordinates =" [[116.544921,40.451633],[116.545264,40.451649],[116.545865,40.451698],[116.546144,40.451551],[116.546337,40.451274],[116.546788,40.451143],[116.547324,40.451078],[116.547539,40.450996],[116.547839,40.450719],[116.548440,40.450506],[116.548933,40.450604],[116.549448,40.450604],[116.550242,40.450376],[116.550865,40.450163],[116.551702,40.449935],[116.552581,40.449576]]"
37+ :coordinates="[
38+ [116.544921, 40.451633],
39+ [116.545264, 40.451649],
40+ [116.545865, 40.451698],
41+ [116.546144, 40.451551],
42+ [116.546337, 40.451274],
43+ [116.546788, 40.451143],
44+ [116.547324, 40.451078],
45+ [116.547539, 40.450996],
46+ [116.547839, 40.450719],
47+ [116.54844, 40.450506],
48+ [116.548933, 40.450604],
49+ [116.549448, 40.450604],
50+ [116.550242, 40.450376],
51+ [116.550865, 40.450163],
52+ [116.551702, 40.449935],
53+ [116.552581, 40.449576],
54+ ]"
3855 ></ol-geom-line-string>
3956 <ol-style>
4057 <ol-style-stroke
@@ -47,9 +64,8 @@ import LineString from "@demos/LineString.vue"
4764 </ol-vector-layer>
4865 </ol-map>
4966</template>
50- ```
5167
52- ``` js
68+ <script>
5369import { ref } from "vue";
5470export default {
5571 setup() {
@@ -72,6 +88,7 @@ export default {
7288 };
7389 },
7490};
91+ </script>
7592```
7693
7794## Properties
0 commit comments