Using Thunderforest
'flutter_map' is in no way associated or related with Thunderforest (or Gravitystorm Limited).
Thunderstorm's home page: thunderforest.com Thunderstorm's pricing page: thunderforest.com/pricing Thunderstorm's documentation page: thunderforest.com/docs/map-tiles-api
We're writing documentation for the Thunderforest website, as you read this!
Once complete, we'll be replacing this page with a link to the appropriate docs page over on their site.
Thunderforest is a popular tiered-payment (with free tier) tile provider solution, especially for generic mapping applications. Setup with 'flutter_map' is relatively straightforward, but this page provides an example anyway. Note that this method uses up your 'Map Tiles API' requests.
Find the style you want. We'll be using OpenCycleMap to demonstrate.
Under 'Use this style' there should be a URL: copy this.
You should remove the 'apikey' (found at the end of the URL) from the URL for readability. Instead, pass it to additionalOptions.
FlutterMap(
options: MapOptions(
center: LatLng(51.5, -0.09),
zoom: 13.0,
),
children: [
TileLayer(
urlTemplate: "https://tile.thunderforest.com/cycle/{z}/{x}/{y}.png?apikey={apikey}",
additionalOptions: {
"apikey": "<API-KEY>",
},
userAgentPackageName: 'com.example.app',
),
],
);
Export as PDF
Copy link
Edit on GitHub