Articles in this section
Category / Section

How to integrate Mapbox in Flutter SfMaps?

1 min read

In Syncfusion® Flutter Maps, you can visualize the Mapbox and customize it easily. To add a Mapbox, you need to add a MapTileLayer to the list of layers in SfMaps and set the mapbox URL to the MapTileLayer.urlTemplate property.

 

To request tiles from the Mapbox provider, you must require a token key. By following the steps listed in this link, create your own token key and replace the word 'Your-Token' with the actual token in the code snippet below.

 

 
@override
Widget build(BuildContext context) {
  return Scaffold(
    body: SfMaps(
      layers: [
        MapTileLayer(
          urlTemplate:'https://api.mapbox.com/styles/v1/mapbox/streets-v11/tiles/{z}/{x}/{y}?access_token=Your_Token', 
        ),
      ],
    ),
  );
}
 

 

Note:

For android, make sure you have enabled internet permission in the android manifest file in release mode under android/app/src/main/AndroidManifest.xml

 

Screenshots:

Map

Description automatically generated

 

Check the below links for more features in tile layer of Syncfusion® Flutter Maps

 

Live samples

 

Package reference

 

 

 

Conclusion

Hope you enjoyed learning about how to integrate Mapbox in Flutter Maps.

You can refer to our Flutter Maps feature tour page to learn about its other groundbreaking feature representations. You can explore our Flutter Maps documentation to understand how to present and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other components.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please  to leave a comment
Access denied
Access denied