Skip to content

Commit 5c3b508

Browse files
committed
update
1 parent aed606a commit 5c3b508

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

geojson-editor/src/App.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,14 @@ function handleMapLoaded(map: maplibregl.Map) {
4646
fc.value = glManager.fc;
4747
});
4848
const drawManager = new DrawManager(glManager);
49+
const measureManager = new MeasureManager(glManager);
4950
5051
map.loadImage(img_marker).then((img) => {
5152
map.addImage("marker", img.data);
5253
5354
map.getLayerProxy<maplibregl.CircleLayerSpecification>(drawManager.id_layer_point).value.layout!['visibility'] = 'none';
55+
map.getLayerProxy<maplibregl.SymbolLayerSpecification>(measureManager.id_layer_measrue_point).value.layout!['text-offset'] = [0, 1];
56+
5457
const layout = map.getLayerProxy<maplibregl.SymbolLayerSpecification>(drawManager.id_layer_point_symbol).value.layout!;
5558
layout['icon-image'] = 'marker'
5659
layout['icon-size'] = 0.3;
@@ -59,7 +62,7 @@ function handleMapLoaded(map: maplibregl.Map) {
5962
6063
createMapControl(map, ShowEditorButton);
6164
createMapControl(map, Drawer, { drawManager }, 'top-left');
62-
createMapControl(map, Measurer, { measureManager: new MeasureManager(glManager) }, 'top-left');
65+
createMapControl(map, Measurer, { measureManager }, 'top-left');
6366
}
6467
6568
function createMapControl(map: maplibregl.Map, component: Component, data?: Record<string, unknown>, position: maplibregl.ControlPosition = 'top-right') {

packages/maplugin-maplibre/demo/Map.vue

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,10 @@ onMounted(() => {
1919
container: 'map',
2020
zoom: 2,
2121
style: props.style,
22-
// attributionControl: false
22+
attributionControl: false
2323
});
24-
24+
map.addControl(new maplibregl.NavigationControl(),'bottom-right');
25+
map.addControl(new maplibregl.ScaleControl(),'bottom-left');
2526
map.on('load', () => {
2627
props.onMapLoad(map);
2728
});

0 commit comments

Comments
 (0)