my-openlayer 0.0.11 → 0.0.12
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/dist/core/DomPoint.d.ts +1 -0
- package/dist/core/DomPoint.js +14 -6
- package/package.json +2 -3
package/dist/core/DomPoint.d.ts
CHANGED
package/dist/core/DomPoint.js
CHANGED
|
@@ -1,15 +1,23 @@
|
|
|
1
|
-
import { createApp } from "vue";
|
|
1
|
+
// import { createApp } from "vue";
|
|
2
2
|
import Overlay from "ol/Overlay";
|
|
3
3
|
export default class DomPoint {
|
|
4
4
|
constructor(map, options) {
|
|
5
5
|
this.myOlMap = map;
|
|
6
|
-
const { Template, lgtd, lttd, props, } = options;
|
|
6
|
+
const { Vue, Template, lgtd, lttd, props, } = options;
|
|
7
7
|
this.dom = document.createElement('div');
|
|
8
8
|
this.myOlMap.map.getViewport().appendChild(this.dom);
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
if (Vue.version.startsWith('3')) {
|
|
10
|
+
this.app = Vue.createApp(Object.assign(Template, {
|
|
11
|
+
props: { ...props }
|
|
12
|
+
}));
|
|
13
|
+
this.app.mount(this.dom);
|
|
14
|
+
}
|
|
15
|
+
else {
|
|
16
|
+
this.app = new Vue({
|
|
17
|
+
el: this.dom,
|
|
18
|
+
render: (h) => h(Template, { props })
|
|
19
|
+
});
|
|
20
|
+
}
|
|
13
21
|
this.anchor = new Overlay({
|
|
14
22
|
element: this.dom,
|
|
15
23
|
positioning: 'center-center',
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "my-openlayer",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.12",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -16,8 +16,7 @@
|
|
|
16
16
|
"dependencies": {
|
|
17
17
|
"ol": "^6.15.1",
|
|
18
18
|
"proj4": "^2.7.5",
|
|
19
|
-
"turf": "^3.0.14"
|
|
20
|
-
"vue": "^3.4.21"
|
|
19
|
+
"turf": "^3.0.14"
|
|
21
20
|
},
|
|
22
21
|
"devDependencies": {
|
|
23
22
|
"typescript": "~5.6.2",
|