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:
Is there a proper way to permanently center the map on Germany, regardless of the loaded nodes or configuration data?
In which file or function is the initial map center set from /api/config, so I can correctly override it?
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 -->
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 -->
@dh9yap when I change config.ini as spec'd above I get Munchen/Linz Area, when I hit: http://localhost:8081/map
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 -->
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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, addedmap.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:
/api/config, so I can correctly override it?Thank you for your support!
System Information:
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
@dh9yap when I change config.ini as spec'd above I get Munchen/Linz Area, when I hit:
http://localhost:8081/map
I agree with @pablorevilla-meshtastic that this is probably the fix you need.
Ping us back if it doesn't work.
Thank you, it worked!