File tree Expand file tree Collapse file tree 4 files changed +37
-55
lines changed
docs/componentsguide/geometries/geomlinestring
src/components/geometries Expand file tree Collapse file tree 4 files changed +37
-55
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ import LineString from "@demos/LineString.vue"
1616 <ol-map
1717 :loadTilesWhileAnimating="true"
1818 :loadTilesWhileInteracting="true"
19- style="height:400px"
19+ style="height: 400px"
2020 >
2121 <ol-view
2222 ref="view"
@@ -65,29 +65,15 @@ import LineString from "@demos/LineString.vue"
6565 </ol-map>
6666</template>
6767
68- <script>
68+ <script setup >
6969import { ref } from "vue";
70- export default {
71- setup() {
72- const center = ref([116.54875, 40.45064]);
73- const projection = ref("EPSG:4326");
74- const zoom = ref(17);
75- const rotation = ref(0);
76- const radius = ref(40);
77- const strokeWidth = ref(10);
78- const strokeColor = ref("red");
7970
80- return {
81- center,
82- projection,
83- zoom,
84- rotation,
85- radius,
86- strokeWidth,
87- strokeColor,
88- };
89- },
90- };
71+ const center = ref([116.54875, 40.45064]);
72+ const projection = ref("EPSG:4326");
73+ const zoom = ref(17);
74+ const rotation = ref(0);
75+ const strokeWidth = ref(10);
76+ const strokeColor = ref("red");
9177</script>
9278```
9379
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ <template lang="">
2+ <div v-if =" false" ></div >
3+ </template >
4+
5+ <script setup>
6+ import LineString from " ol/geom/LineString" ;
7+ import useGeometry from " @/composables/useGeometry" ;
8+
9+ const props = defineProps ({
10+ coordinates: {
11+ type: Array ,
12+ },
13+ opt_layout: {
14+ type: String ,
15+ default: " XY" ,
16+ },
17+ });
18+
19+ const { geometry } = useGeometry (LineString, props);
20+
21+ defineExpose ({
22+ geometry,
23+ });
24+ </script >
25+
26+ <style lang=""></style >
Original file line number Diff line number Diff line change 11import OlGeomCircle from "./OlGeomCircle.vue" ;
2+ import OlGeomLineString from "./OlGeomLineString.vue" ;
23import Point from "./Point.vue" ;
3- import LineString from "./LineString.vue" ;
44import Polygon from "./Polygon.vue" ;
55import MultiPoint from "./MultiPoint.vue" ;
66import MultiLineString from "./MultiLineString.vue" ;
@@ -14,8 +14,8 @@ function install(app) {
1414 install . installed = true ;
1515
1616 app . component ( "ol-geom-circle" , OlGeomCircle ) ;
17+ app . component ( "ol-geom-line-string" , OlGeomLineString ) ;
1718 app . component ( Point . name , Point ) ;
18- app . component ( LineString . name , LineString ) ;
1919 app . component ( Polygon . name , Polygon ) ;
2020 app . component ( MultiPoint . name , MultiPoint ) ;
2121 app . component ( MultiLineString . name , MultiLineString ) ;
@@ -27,8 +27,8 @@ export default install;
2727export {
2828 install ,
2929 OlGeomCircle ,
30+ OlGeomLineString ,
3031 Point ,
31- LineString ,
3232 Polygon ,
3333 MultiPoint ,
3434 MultiLineString ,
You can’t perform that action at this time.
0 commit comments