Skip to content

Commit ff3bff7

Browse files
committed
update
1 parent 8e46442 commit ff3bff7

File tree

8 files changed

+67
-4
lines changed

8 files changed

+67
-4
lines changed

geojson-editor/src/App.vue

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import { DrawManager, GeoJSONLayerManager, MeasureManager } from '../../packages
1919
import { TIdentityGeoJSONFeature } from '../../packages/maplugin-core/types';
2020
import { StoreEditor } from './stores';
2121
22+
import img_marker from './assets/map-marker.png?url';
23+
2224
const fc = ref<GeoJSON.FeatureCollection>({
2325
type: 'FeatureCollection',
2426
features: []
@@ -43,9 +45,19 @@ function handleMapLoaded(map: maplibregl.Map) {
4345
glManager.on('all', () => {
4446
fc.value = glManager.fc;
4547
});
48+
const drawManager = new DrawManager(glManager, {});
49+
50+
map.loadImage(img_marker).then((img) => {
51+
map.addImage("marker", img.data);
52+
53+
map.getLayerProxy<maplibregl.CircleLayerSpecification>(drawManager.id_layer_point).value.layout!['visibility'] = 'none';
54+
const layout = map.getLayerProxy<maplibregl.SymbolLayerSpecification>(drawManager.id_layer_point_symbol).value.layout!;
55+
layout['icon-image'] = 'marker'
56+
layout['icon-size'] = 0.5;
57+
});
4658
4759
createMapControl(map, ShowEditorButton);
48-
createMapControl(map, Drawer, { drawManager: new DrawManager(glManager, {}) }, 'top-left');
60+
createMapControl(map, Drawer, { drawManager }, 'top-left');
4961
createMapControl(map, Measurer, { measureManager: new MeasureManager(glManager, {}) }, 'top-left');
5062
}
5163
1.95 KB
Loading

geojson-editor/src/components/features/FeatureCollectionEditor.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,7 @@
33
</template>
44

55
<script setup lang="ts">
6-
//@ts-ignore
76
import jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker';
8-
//@ts-ignore
97
import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
108
import * as monaco from 'monaco-editor'
119
import geojson_schema from '../../contracts/geojson-schema.json';

geojson-editor/src/vite-env.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/// <reference types="vite/client" />

geojson-editor/tsconfig.app.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2020",
4+
"useDefineForClassFields": true,
5+
"module": "ESNext",
6+
"lib": ["ES2020", "DOM", "DOM.Iterable"],
7+
"skipLibCheck": true,
8+
9+
/* Bundler mode */
10+
"moduleResolution": "bundler",
11+
"allowImportingTsExtensions": true,
12+
"isolatedModules": true,
13+
"moduleDetection": "force",
14+
"noEmit": true,
15+
"jsx": "preserve",
16+
17+
/* Linting */
18+
"strict": true,
19+
"noUnusedLocals": true,
20+
"noUnusedParameters": true,
21+
"noFallthroughCasesInSwitch": true
22+
},
23+
"include": ["src/**/*.ts", "src/**/*.tsx", "src/**/*.vue"]
24+
}

geojson-editor/tsconfig.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"files": [],
3+
"references": [
4+
{ "path": "./tsconfig.app.json" },
5+
{ "path": "./tsconfig.node.json" }
6+
]
7+
}

geojson-editor/tsconfig.node.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"compilerOptions": {
3+
"target": "ES2022",
4+
"lib": ["ES2023"],
5+
"module": "ESNext",
6+
"skipLibCheck": true,
7+
8+
/* Bundler mode */
9+
"moduleResolution": "bundler",
10+
"allowImportingTsExtensions": true,
11+
"isolatedModules": true,
12+
"moduleDetection": "force",
13+
"noEmit": true,
14+
15+
/* Linting */
16+
"strict": true,
17+
"noUnusedLocals": true,
18+
"noUnusedParameters": true,
19+
"noFallthroughCasesInSwitch": true
20+
},
21+
"include": ["vite.config.ts"]
22+
}

geojson-editor/vite.config.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { defineConfig } from 'vite';
22
import vue from '@vitejs/plugin-vue';
3-
import path from "path";
43

54
export default defineConfig({
65
plugins: [vue()],

0 commit comments

Comments
 (0)