Configuration for an alternative map / location providing service.
Your use case
What would you like to do?
I would like to have the possibility to display Map and location data from my own hosted Mapserver.
Why would you like to do it?
Im running the App and the Matrix service inside of a closed environment, like an Intranet. Therefore it is not possible to reach out to online services.
How would you like to achieve it?
Via an extra input inside the setting menu, maybe a conf. file like on the desktop Client if it's more viable.
Have you considered any alternatives?
No response
Additional context
I don't know if this feature already exists, if so, I'm very sorry for creating this request.
My plan was to use my company's internal offline network to host a private messaging service including my own map server. After I set everything up, I could connect with the device and use it. That was no problem since I can configure the location of the matrix service. What I could not do, was set the location for a custom map service, since, as far as I know, there is no option for it.
Everything that happens when I'm switching to my offline environment is, that the map data simply will not be shown - as expected when the app does not know how to reach the service.
If anyone has experience with this topic or already archived this in a way i dont know about, I would be glad for some Information.
Are you willing to provide a PR?
No
It is possible, see:
- https://github.com/vector-im/element-web/blob/develop/docs/config.md#customisation--branding
- https://matrix.org/docs/legacy/map-tile-server/
You will need to replace the initialization URL used by the Map API with your own's (on your homeserver or directly in the code)
URL (mapStyleUrl) is used here: UrlMapProvider file
It expects a json file containing the map's styles. eg:
mapView.getMapAsync { map ->
map.setStyle("https://demotiles.maplibre.org/style.json")
}
https://maplibre.org/maplibre-native/docs/book/android/getting-started-guide.html