From 68e07d7d7beca5b4ea26b9fc6ff964014d28af4b Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 29 Jun 2023 00:29:17 +0200 Subject: [PATCH 1/3] Fix: actually pass the initial coordinate in the locationInput element, fix #1486 --- UI/Popup/MoveWizard.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/UI/Popup/MoveWizard.ts b/UI/Popup/MoveWizard.ts index 4247a63609..6d1de64ebd 100644 --- a/UI/Popup/MoveWizard.ts +++ b/UI/Popup/MoveWizard.ts @@ -73,7 +73,7 @@ export default class MoveWizard extends Toggle { lockBounds: true, includeSearch: false, background: "photo", - startZoom: 17, + startZoom: 18, minZoom: 16, eraseAddressFields: false, }) @@ -139,6 +139,7 @@ export default class MoveWizard extends Toggle { new SvelteUIElement(LocationInput, { mapProperties, value, + initialCoordinate: { lon, lat }, }).SetClass("w-full h-full"), new SvelteUIElement(OpenBackgroundSelectorButton, { state }).SetClass( "absolute bottom-0 left-0" From d95d96fb1ba1a8886f05b118c0650a4af1ae5dd7 Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 29 Jun 2023 00:38:46 +0200 Subject: [PATCH 2/3] Fix: fix #1477. Setting the background caused a map.resize(), which in turn caused the coordinates to be set to 0,0, which caused the location-correction to kick in, moving the location input towards null island --- UI/Map/MapLibreAdaptor.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/UI/Map/MapLibreAdaptor.ts b/UI/Map/MapLibreAdaptor.ts index 443d099b36..5ec2729e9d 100644 --- a/UI/Map/MapLibreAdaptor.ts +++ b/UI/Map/MapLibreAdaptor.ts @@ -411,8 +411,6 @@ export class MapLibreAdaptor implements MapProperties, ExportableMap { map.addSource(background.id, MapLibreAdaptor.prepareWmsSource(background)) - map.resize() - let addLayerBeforeId = "aeroway_fill" // this is the first non-landuse item in the stylesheet, we add the raster layer before the roads but above the landuse if (background.category === "osmbasedmap" || background.category === "map") { // The background layer is already an OSM-based map or another map, so we don't want anything from the baselayer From 622717c6958ac47e44b91f09bced572a71ea9d8a Mon Sep 17 00:00:00 2001 From: Pieter Vander Vennet Date: Thu, 29 Jun 2023 00:50:31 +0200 Subject: [PATCH 3/3] Version bump --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 19a4da499b..5108592434 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "mapcomplete", - "version": "0.30.8", + "version": "0.30.9", "repository": "https://github.com/pietervdvn/MapComplete", "description": "A small website to edit OSM easily", "bugs": "https://github.com/pietervdvn/MapComplete/issues",