How to customise the map

Hi,
I have tried to follow the “Customising the map” step did those related development.

  • Download the map and mapsettings
  • Adjust the filestructure of deployment as follows:
deployment
|-- manager
|    |-- app
|    |    +-- images
|    |    |-- manager_config.json
|-- map
|    |-- mapdata.mbtiles
|    |-- mapsettings.json
  • Change the volume mapping of the manager container to:

volumes: - ./deployment:/deployment

But I cant’ get my own map out from the main page at all. it is total blank! however when I change the manager container to:

volumes:
- ./deployment:/deployment/manager/app

the main page given is still default map instead of my own map.

Please advise where I have mistake. Thanks.

Probably something wrong with paths. You can check what files are visible in the manager’s container. Here is one example for correctly customized one:

$ docker exec -ti openremote_manager_1 ls -lR /deployment
/deployment:
total 2356
-rw-r--r-- 1 1000 1000     596 Jul 11 13:28 Caddyfile
drwxr-xr-x 3 1000 1000    4096 Jul 11 13:28 keycloak
drwxr-xr-x 5 1000 1000    4096 Aug  6 14:48 manager
drwxr-xr-x 2 1000 1000    4096 Aug  6 14:20 map
-rw-r--r-- 1 root root 2388102 Oct 18 10:45 openremote.log.0
-rw-r--r-- 1 root root       0 Aug  6 15:06 openremote.log.0.lck

/deployment/keycloak:
total 4
drwxr-xr-x 2 1000 1000 4096 Jul 11 13:28 themes

/deployment/keycloak/themes:
total 0

/deployment/manager:
total 16
drwxr-xr-x 3 1000 1000 4096 Jul 11 13:28 app
drwxr-xr-x 2 1000 1000 4096 Jul 11 13:28 extensions
-rw-r--r-- 1 root root  223 Aug  6 14:48 keycloak.json
drwxr-xr-x 3 1000 1000 4096 Jul 11 13:28 provisioning

/deployment/manager/app:
total 8
drwxr-xr-x 2 1000 1000 4096 Jul 11 13:28 images
-rw-r--r-- 1 1000 1000  365 Jul 11 13:28 manager_config.json

/deployment/manager/app/images:
total 40
-rw-r--r-- 1 1000 1000  2484 Jul 11 13:28 favicon.png
-rw-r--r-- 1 1000 1000  4548 Jul 11 13:28 logo-mobile.png
-rw-r--r-- 1 1000 1000 24987 Jul 11 13:28 logo.png

/deployment/manager/extensions:
total 4
-rw-r--r-- 1 1000 1000 261 Jul 11 13:30 openremote-deployment-1.0-SNAPSHOT.jar

/deployment/manager/provisioning:
total 4
drwxr-xr-x 2 1000 1000 4096 Jul 11 13:28 consoleappconfig

/deployment/manager/provisioning/consoleappconfig:
total 4
-rw-r--r-- 1 1000 1000 661 Jul 11 13:28 master.json

/deployment/map:
total 11904
-rw-r--r-- 1 1000 1000 12132352 Mar 29  2021 mapdata.mbtiles
-rw-r--r-- 1 1000 1000    55737 Jul 11 13:28 mapsettings.json 

root@ssd2454466:~# docker exec -ti openremote_manager_1 ls -lR /deployment/
/deployment/:
total 32
drwxr-xr-x 3 root root 4096 Oct 15 20:18 manager
-rw-r–r-- 1 root root 27626 Oct 18 10:45 openremote.log.0
-rw-r–r-- 1 root root 0 Oct 16 19:12 openremote.log.0.lck

/deployment/manager:
total 4
drwxr-xr-x 2 root root 4096 Oct 15 20:18 extensions

/deployment/manager/extensions:
total 0

Hi, Michal,
Thank you for your help. I did execute the command and it is output are not same as you give. Please advice what else I need to do to correct it.

[root@FogsCloud ~]# docker exec -ti openremote_manager_1 ls -lR /deployment
/deployment:/deployment:
total 36
drwxr-xr-x 1 root root 4096 Oct 18 03:49 manager
-rw-r–r-- 1 root root 24734 Oct 19 02:30 openremote.log.0
-rw-r–r-- 1 root root 0 Oct 18 03:49 openremote.log.0.lck

/deployment/manager:
total 8
drwxr-xr-x 5 root root 4096 Oct 18 03:49 app
drwxr-xr-x 2 root root 4096 Oct 12 15:15 extensions

/deployment/manager/app:
total 32
drwxr-xr-x 2 root root 4096 Oct 15 03:24 images
drwxr-xr-x 3 root root 4096 Oct 15 03:58 manager
drwxr-xr-x 2 root root 4096 Oct 18 03:34 map
-rw-r–r-- 1 root root 20292 Oct 18 03:49 openremote.log.0

/deployment/manager/app/images:
total 12
-rw-r–r-- 1 root root 4661 Oct 15 03:24 manager_config.ison
-rw-r–r-- 1 root root 330 Oct 15 03:22 manager_config.old

/deployment/manager/app/manager:
total 4
drwxr-xr-x 3 root root 4096 Oct 15 04:21 app

/deployment/manager/app/manager/app:
total 12
drwxr-xr-x 2 root root 4096 Oct 15 03:59 images
-rw-r–r-- 1 root root 4661 Oct 15 04:21 manager_config.json

/deployment/manager/app/manager/app/images:
total 0

/deployment/manager/app/map:
total 161984
-rw-r–r-- 1 root root 165789696 Oct 15 03:41 mapdata.mbtiles
-rw-r–r-- 1 root root 75694 Oct 15 03:57 mapsettings.json

/deployment/manager/extensions:
total 0
[root@FogsCloud ~]#

It is clear that deployments folder with maps isn’t correctly mounted as volume to the manager container. Are the docker-compose.yml and deployment/ folder in the same directory? What do you see it you run ‘ls -Rl .’ in the directory where the docker-compose.yml file is?

[root@FogsCloud openremote]# ls -R
.:
deployment docker-compose_v1.yml docker-compose.yml profile

./deployment:
images manager map openremote.log.0

./deployment/images:
manager_config.ison manager_config.old

./deployment/manager:
app

./deployment/manager/app:
images manager_config.json

./deployment/manager/app/images:

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

./profile:
deploy.yml

yes. Please check above list out. Thanks.

You have to change volume mapping back to
volumes: - ./deployment:/deployment
and check then if the listing match my example. Then if it does and map is blank check its settings. Maybe its misplaced or files are corrupted? Check web console, maybe there are errors?

Hi, Michal,
I have changed the manager volumes from docker-compose.yml file as

manager:
restart: always
image: openremote/manager:${MANAGER_VERSION:-latest}
depends_on:
keycloak:
condition: service_healthy
environment:
DEV_MODE: ${DEV_MODE:-false}
SETUP_ADMIN_PASSWORD: ${SETUP_ADMIN_PASSWORD:-secret}
volumes:
- ./deployment:/deployment

However the command output as below:
[root@FogsCloud openremote]# docker exec -ti openremote_manager_1 ls -lR /deployment
/deployment:
total 56
drwxr-xr-x 2 root root 4096 Oct 15 03:24 images
drwxr-xr-x 3 root root 4096 Oct 15 03:58 manager
drwxr-xr-x 2 root root 4096 Oct 18 03:34 map
-rw-r–r-- 1 root root 37944 Oct 22 02:04 openremote.log.0
-rw-r–r-- 1 root root 0 Oct 22 02:04 openremote.log.0.lck

/deployment/images:
total 12
-rw-r–r-- 1 root root 4661 Oct 15 03:24 manager_config.ison
-rw-r–r-- 1 root root 330 Oct 15 03:22 manager_config.old

/deployment/manager:
total 4
drwxr-xr-x 3 root root 4096 Oct 15 04:21 app

/deployment/manager/app:
total 12
drwxr-xr-x 2 root root 4096 Oct 15 03:59 images
-rw-r–r-- 1 root root 4661 Oct 15 04:21 manager_config.json

/deployment/manager/app/images:
total 0

/deployment/map:
total 161984
-rw-r–r-- 1 root root 165789696 Oct 15 03:41 mapdata.mbtiles
-rw-r–r-- 1 root root 75694 Oct 15 03:57 mapsettings.json

Please advise where should I have mistaken. Thanks.

Where the manager looks for map data (mapdata.mbtiles) and map settings (mapsettings.json) is controlled by the following environment variables in the manager container:

MAP_TILES_PATH (default: /deployment/map/mapdata.mbtiles)
MAP_SETTINGS_PATH (default: /deployment/map/mapsettings.json)

So you have /deployment volume mapped and provided map/mapdata.mbtiles and map/mapsettings.json exist in this volume mapped directory you should get your custom map.

You can run docker logs on the manager container to get more insight into what might be going wrong.

Hi, Rich,
Thank you for your advise. I did tried to get the log and it is given as below. However I don’t know how to read it out to finger out the source of the problem. Please advice again. Thanks.

# docker logs --since=2021-10-22T09:16:45Z openremote_manager_1
2021-10-22 11:51:22.870  INFO    [main                          ] .camel.impl.DefaultStreamCachingStrategy : StreamCaching in use with spool directory: /tmp/camel/camel-tmp-7784535a-7160-45c9-84a7-f25adf5e03f8 and rules: [Spool > 512K body size]
2021-10-22 11:51:22.881  INFO    [main                          ] apache.camel.component.seda.SedaEndpoint : Endpoint seda://PersistenceTopic?concurrentConsumers=1&discardIfNoConsumers=true&limitConcurrentConsumers=false&multipleConsumers=true&purgeWhenStopping=true&size=25000&waitForTaskToComplete=NEVER is using shared queue: seda://PersistenceTopic with size: 25000
2021-10-22 11:51:22.905  INFO    [main                          ] apache.camel.component.seda.SedaEndpoint : Endpoint seda://ClientEventTopic?concurrentConsumers=1&discardIfNoConsumers=true&limitConcurrentConsumers=false&multipleConsumers=true&purgeWhenStopping=true&size=1000&waitForTaskToComplete=NEVER is using shared queue: seda://ClientEventTopic with size: 1000
2021-10-22 11:51:22.906  INFO    [main                          ] apache.camel.component.seda.SedaEndpoint : Endpoint seda://MqttClientQueue?discardIfNoConsumers=false&purgeWhenStopping=true&size=25000&timeout=10000&waitForTaskToComplete=IfReplyExpected is using shared queue: seda://MqttClientQueue with size: 25000
2021-10-22 11:51:22.921  INFO    [main                          ] apache.camel.component.seda.SedaEndpoint : Endpoint seda://AssetQueue?discardIfNoConsumers=false&purgeWhenStopping=true&size=25000&timeout=10000&waitForTaskToComplete=IfReplyExpected is using shared queue: seda://AssetQueue with size: 25000
2021-10-22 11:51:22.938  INFO    [main                          ] apache.camel.component.seda.SedaEndpoint : Endpoint seda://NotificationQueue?discardIfNoConsumers=false&purgeWhenStopping=true&size=25000&timeout=10000&waitForTaskToComplete=IfReplyExpected is using shared queue: seda://NotificationQueue with size: 25000
2021-10-22 11:51:22.940  INFO    [main                          ] apache.camel.component.seda.SedaEndpoint : Endpoint seda://ClientEventQueue?discardIfNoConsumers=true&multipleConsumers=false&purgeWhenStopping=true&size=25000&waitForTaskToComplete=NEVER is using shared queue: seda://ClientEventQueue with size: 25000
2021-10-22 11:51:23.139  INFO    [main                          ] .container.web.DefaultWebsocketComponent : Deploying websocket endpoint: /websocket/events
2021-10-22 11:51:23.593  INFO    [main                          ] org.jboss.threads                        : JBoss Threads version 3.1.0.Final
2021-10-22 11:51:23.676  INFO    [main                          ] emote.container.security.IdentityService : Securing web deployment: /websocket
2021-10-22 11:51:23.787  INFO    [main                          ] io.undertow.websockets.jsr               : UT026005: Adding programmatic server endpoint class org.openremote.container.web.socket.WebsocketAdapter for path /websocket/events
2021-10-22 11:51:23.932  INFO    [main                          ] io.moquette.broker.Server                : Configuring message interceptors...
2021-10-22 11:51:23.943  INFO    [main                          ] .moquette.interception.BrokerInterceptor : Initializing broker interceptor. InterceptorIds=[org.openremote.manager.mqtt.ORInterceptHandler]
2021-10-22 11:51:23.945  INFO    [main                          ] .moquette.interception.BrokerInterceptor : Adding MQTT message interceptor. InterceptorId=org.openremote.manager.mqtt.ORInterceptHandler, handledMessageTypes=[class io.moquette.interception.messages.InterceptConnectMessage, class io.moquette.interception.messages.InterceptDisconnectMessage, class io.moquette.interception.messages.InterceptConnectionLostMessage, class io.moquette.interception.messages.InterceptSubscribeMessage, class io.moquette.interception.messages.InterceptUnsubscribeMessage, class io.moquette.interception.messages.InterceptPublishMessage]
2021-10-22 11:51:23.946  INFO    [main                          ] io.moquette.broker.Server                : Using default SSL context creator
2021-10-22 11:51:23.957  INFO    [main                          ] subscriptions.CTrieSubscriptionDirectory : Initializing CTrie
2021-10-22 11:51:23.960  INFO    [main                          ] subscriptions.CTrieSubscriptionDirectory : Initializing subscriptions store...
2021-10-22 11:51:24.104  INFO    [main                          ] io.moquette.broker.NewNettyAcceptor      : Netty is using NIO
2021-10-22 11:51:24.509  INFO    [main                          ] io.moquette.broker.NewNettyAcceptor      : Server bound to host=0.0.0.0, port=1883, protocol=TCP MQTT
2021-10-22 11:51:24.528  INFO    [main                          ] io.moquette.broker.NewNettyAcceptor      : Property websocket_port has been setted to disabled. Websocket MQTT will be disabled
2021-10-22 11:51:24.528  INFO    [main                          ] io.moquette.broker.Server                : Moquette integration has been started successfully in 597 ms
2021-10-22 11:51:24.548  INFO    [main                          ] org.openremote.manager.map.MapService    : Starting map service with tile data: /deployment/map/mapdata.mbtiles
2021-10-22 11:51:24.870  WARNING [main                          ] ger.notification.PushNotificationHandler : FCM configuration invalid so cannot start
2021-10-22 11:51:24.951  INFO    [main                          ] apache.camel.component.seda.SedaEndpoint : Endpoint seda://SensorQueue?discardIfNoConsumers=false&purgeWhenStopping=true&size=25000&waitForTaskToComplete=NEVER is using shared queue: seda://SensorQueue with size: 25000
2021-10-22 11:51:25.005  INFO    [main                          ] rg.openremote.manager.rules.RulesService : GeoefenceAssetAdapters found: 1
2021-10-22 11:51:25.049  INFO    [main                          ] rg.openremote.manager.rules.RulesService : Deploying global rulesets
2021-10-22 11:51:25.071  INFO    [main                          ] rg.openremote.manager.rules.RulesService : Deploying tenant rulesets
2021-10-22 11:51:25.110  INFO    [main                          ] rg.openremote.manager.rules.RulesService : Deploying asset rulesets
2021-10-22 11:51:25.133  INFO    [main                          ] rg.openremote.manager.rules.RulesService : Loading all assets with fact attributes to initialize state of rules engines
2021-10-22 11:51:25.164  INFO    [main                          ] io.undertow                              : starting server: Undertow - 2.2.3.Final
2021-10-22 11:51:25.233  INFO    [main                          ] org.openremote.container.web.WebService  : Webserver ready on http://0.0.0.0:8080
2021-10-22 11:51:25.233  INFO    [main                          ] org.openremote.container.Container       : >>> Runtime container startup complete

FYI: Please use markdown quotes around code and logs, I’ve updated your post to make it readable.

That log looks OK.

Try loading the Manager UI and see if any errors appear in the docker logs also share any browser console errors (access the developer console using Ctrl+Shift+C).

Is it possible because the server lower RAM?
[root@FogsCloud ~]# free
total used free shared buff/cache available
Mem: 1844096 1263644 104980 135716 475472 298076

the server current RAM status as above.


the screen shot is attached. Please help to advise on it. Thanks again.

Won’t be a RAM issue if the built in map works fine then definitely a config issue.

I need to see the console errors of the browser, if you press Esc while the developers tool window is open the console panel should show along the bottom.

Also look at the network tab for any failed requests.

Please look at this picture I did from screenshot. Please advise if you found any reason. Thanks.

This is the same as the first, no console window or network tab which should look like this:

This is the two screenshot for your take a look as you required. Thanks.

Hi, rich,

Please take a look my issue and advise what else I can do on it. I have sent the screenshot on previous replied. I have no idea where is the problem until now. Thanks.

It appears that the map is initialising correctly but it is trying to load tiles which are not in the mapdata.mbtiles you have loaded.

Are you sure you’ve updated mapsettings.json with appropriate co-ordinates for your mapdata.mbtiles?

The manager docker logs might show more detail after you have tried loading the manager UI

Hi, Rich,
Thank you for your help. I can’t answer your question since I have no idea how to decide the mapsetting.json whether appropriate the mapdata file. I did the mapsetting.json from follow the instruction guide. I download the mapdata from the website where my country land. I do attach it here for your review. Thanks.

since the mapsetting.json is too big to attach here. I can’t show it for you. Please let me know if we can chat via another pipe or your can hand on to login my laptop via teamviewer. thus you can easy to finger out what is the reason of the issue.
the below link is where I download my country map from.
https://data.maptiler.com/downloads/tileset/osm/asia/malaysia-singapore-brunei/