Xgenious/ docs
Products
Get support

Custom Tile Server

If you prefer a provider other than tile.openstreetmap.org — e.g. Mapbox, Stamen, or a self-hosted tile server — change the urlTemplate.

Mapbox example

TileLayer(
  urlTemplate: 'https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}',
  additionalOptions: const {
    'accessToken': 'YOUR_MAPBOX_ACCESS_TOKEN',
    'id': 'mapbox/streets-v11',
  },
  userAgentPackageName: 'com.yourdomain.prohandy',
)

Set additionalOptions.accessToken to your Mapbox access token and id to your style (e.g. mapbox/streets-v11 or a custom style).

Steps

  1. Replace urlTemplate and additionalOptions in the same files as OSM User Agentvisitor_map_header.dart and visitor_map_view.dart.
  2. Rebuild the app and verify tiles load at multiple zoom levels.
  3. Keep userAgentPackageName set even with Mapbox — some providers still check it.
Still stuck?
Our support team is ready to help you get set up.
Get support