Map always starts in the USA despite changing initial coordinates #25

Closed
opened 2026-10-05 06:02:31 +02:00 by adam · 3 comments
Owner

Hello,

I’m using the latest version of Meshview and would like the live map to always start centered over Germany ([51.1634, 10.4477], zoom level 6).
I’ve already modified live-map.html, added map.setView([51.1634,10.4477],6), and even tried disabling calls to /api/config, but the map still always starts in the USA.

The nodes load and display correctly, but it seems that some dynamic process (probably /api/config) is overriding the initial map position. Clearing the browser cache doesn’t change anything.

Questions:

  1. Is there a proper way to permanently center the map on Germany, regardless of the loaded nodes or configuration data?
  2. In which file or function is the initial map center set from /api/config, so I can correctly override it?
  3. Is there an official or recommended method to fix the map’s default view to a specific region or country?

Thank you for your support!

System Information:

  • Meshview version: latest GitHub release
  • Browser: Chrome/Firefox (latest versions)
  • OS: Ubuntu 22.04 LTS
Hello, I’m using the latest version of Meshview and would like the live map to always start centered over Germany ([51.1634, 10.4477], zoom level 6). I’ve already modified `live-map.html`, added `map.setView([51.1634,10.4477],6)`, and even tried disabling calls to `/api/config`, but the map still always starts in the USA. The nodes load and display correctly, but it seems that some dynamic process (probably `/api/config`) is overriding the initial map position. Clearing the browser cache doesn’t change anything. **Questions:** 1. Is there a proper way to permanently center the map on Germany, regardless of the loaded nodes or configuration data? 2. In which file or function is the initial map center set from `/api/config`, so I can correctly override it? 3. Is there an official or recommended method to fix the map’s default view to a specific region or country? Thank you for your support! **System Information:** * Meshview version: latest GitHub release * Browser: Chrome/Firefox (latest versions) * OS: Ubuntu 22.04 LTS <!-- github-sync-id:3583578400 -->
adam closed this issue 2026-10-05 06:02:32 +02:00
Author
Owner

I did not go with map center and zoom, it is a good idea and we may add it to the next version.

in your config file use something like this:
map_top_left_lat = 47
map_top_left_lon = 12
map_bottom_right_lat = 49
map_bottom_right_lon = 14

let me know if that works

I did not go with map center and zoom, it is a good idea and we may add it to the next version. in your config file use something like this: map_top_left_lat = 47 map_top_left_lon = 12 map_bottom_right_lat = 49 map_bottom_right_lon = 14 let me know if that works <!-- github-comment-id:3486427262 -->
Author
Owner

@dh9yap when I change config.ini as spec'd above I get Munchen/Linz Area, when I hit:
http://localhost:8081/map

Image

I agree with @pablorevilla-meshtastic that this is probably the fix you need.

Ping us back if it doesn't work.

@dh9yap when I change config.ini as spec'd above I get Munchen/Linz Area, when I hit: http://localhost:8081/map <img width="1154" height="1306" alt="Image" src="https://github.com/user-attachments/assets/391a35a7-969d-4ee6-aa49-8989df67cb2f" /> I agree with @pablorevilla-meshtastic that this is probably the fix you need. Ping us back if it doesn't work. <!-- github-comment-id:3493907213 -->
Author
Owner

Thank you, it worked!

Thank you, it worked! <!-- github-comment-id:3496578383 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/meshview#25