Change the Map in the Manager UI

Hi,

I have tried entering Lat and Longitude settings into the geo position attributes for my assets. I am in the UK, but the map always defaults back to Rotterdam? Do I need to adjust any Environment settings in the container?

Thanks,

Hi,

this is because for demo there is only a small map of Rotterdam included. You would need to extract and install your own map data. It is quite simple, you just put a new map as ./deployment/map/mapdata.mbtiles. @Don knows everything how a custom map can be created.

Thanks @michal

I will look into it.

I read on the issues list that you were considering linking to a map provider - that would be a good move :slight_smile:

Hi @3more,

Please follow this wiki page on the use of maps.
Note that you can download a map (free for personal use) using the link mentioned on the wiki. If you want to have a smaller portion of that map, you can use the guide (last section) on extracting that from the downloaded map.

If you have any questions please let us know,

Don

Thanks Don,

I did as you suggested and it is working great now :slight_smile:

3 Likes

Hi @Don ,
I also have problems with the wiget map. I followed the instructions on the wiki but still with no success.
please see my docker-compose and mapsettings files and help me find the mistake.

{
“options”: {
“default”: {
“center”: [ 106.90, 20.85 ],
“bounds”: [ 106.63, 20.54, 107.18, 20.7 ],
“zoom”: 14,
“maxZoom”: 19,
“boxZoom”: false
},
“building”: {
“center”: [ 106.90, 20.85 ],
“bounds”: [ 106.63, 20.54, 107.18, 20.7 ],
“zoom”: 15,
“minZoom”: 14,
“maxZoom”: 19,
“boxZoom”: false
}
},
“version”: 8,
“sources”: {
“vector_tiles”: {
“type”: “vector”,
“url”: “mbtiles://mapdata.mbtiles”
}
},
}

manager:
restart: always
image: openremote/manager:${MANAGER_VERSION:-latest}
depends_on:
keycloak:
condition: service_healthy
environment:
DEV_MODE: ${DEV_MODE:-false}
MAP_TILES_PATH: ${MAP_TILES_PATH:-…/deployment/map/mapdata.mbtiles}
MAP_SETTINGS_PATH: ${MAP_SETTINGS_PATH:-…/deployment/map/mapsettings.json}

Thanks so much!

Hi @TheThings,

I see, well actually @michal, that you used three points instead of two or one (depending on your structure) in your paths to the mapdata and mapsettings. That might solve it.

MAP_TILES_PATH: ./deployment/map/mapdata.mbtiles
MAP_SETTINGS_PATH: ./deployment/map/mapsettings.json

Otherwise you could go a different direction and check this section I updated on the custom deployment wiki page: The deployment map structure and adjusted volume mapping for the manager. (you can remove the MAP environment settings in this case)

Let me know how it works out,

Don

hi,
i added volumes (- ./deployment:/deployment) to manager service in docker-compose file. but manager container unheathly when i start the stack.
i changed to (- ./deployment:/deployment/manager/app), the unheathly error was clear. (but, ofcourse, map page not change to my location).
please check this volumes.
Thanks so much
Things

How does your ./deployment dir looks like? It should be something like this:

> tree ./deployment
./deployment
├── keycloak
│   └── themes
├── manager
│   ├── app
│   │   ├── images
│   │   │   ├── favicon.png
│   │   │   ├── logo-mobile.png
│   │   │   └── logo.png
│   │   └── manager_config.json
│   ├── extensions
│   │   └── openremote-deployment-1.0-SNAPSHOT.jar
│   └── provisioning
│       └── consoleappconfig
│           └── master.json
├── map
│   ├── mapdata.mbtiles
│   └── mapsettings.json

When the manager is unhealthy what do you see in it’s log file? Is ./deployment directory writable?

Hi,
I found the problem and solved them. The map is displayed as desired.
Thanks for your support.
(By the way, I like your youtube video)

What was the problem?

i added some environment to manager service (same deploy.yml).

hi.
The exact cause of unhealthy manager container was due to the mapdata.mbtiles file.
I didn’t download the map from openstreetmap, but downloaded from "OpenSeaMap - The free nautical chart -1 & lang = de "
is also in mbtiles format.
The extracting to smaller tilesets succeeded, but the deployment failed. I don’t know why.
If possible, please help me try out maps from this source.
thanks.