Skip to content

Custom Map Tile Server for Mobile Clients

Note, this feature is available starting from Element Pro version 26.08.2.

Element Pro can be configured to use your own map tile server instead of the one we provide. This can be configured in your ESS Pro deployment by configuring the elementProConfig setting (ESS Pro 26.7.0 and later) or wellknownDelegation.additional.element (prior to ESS Pro 26.7.0):

elementProConfig: |
  {
    "map_tiler": {
      "base_url": "https://geo.example.com/maps",
      "api_key": "secret-key",
      "light_style_id": "0123456789",
      "dark_style_id": "9876543210"
    }
  }

Map styles and static map images are both requested with URLs whose layout follows the MapTiler Cloud Maps API and Static Maps API. The style.json file must be a MapLibre-compatible style document. In the example above, a light-mode style would be requested from https://geo.example.com/maps/0123456789/style.json?key=secret-key, and a static image from https://geo.example.com/maps/0123456789/static/{lon},{lat},{zoom}/{width}x{height}@2x.png?key=secret-key. A style ID may span multiple path segments, such as styles/base/light-01234. Any service implementing both APIs will work, including a self-hosted MapTiler Server.

All four values must be present within the map_tiler object. Please leave the API key as an empty string "" if you don't require one. You can pass the same value for both light_style_id and dark_style_id if you don't have distinct light and dark styles.

Note: Element Pro ignores the m.tile_server property in the /.well-known/matrix/client file. If you set a tile server there for other clients, you still need to set map_tiler in your elementProConfig.

There is an example fragment in charts/matrix-stack/ci/fragments/element-pro-map-tiler.yaml for further reference.