Articles in this section
Category / Section

How to visualize the Bing Maps using Flutter Maps?

1 min read

In Syncfusion® Flutter Maps, you can visualize the Bing Maps and customize it easily.

To add Bing Maps, you must set the urlTemplate property of MapTileLayer in SfMaps as mentioned below.

 

Step 1: For Bing Maps, subscription key is needed to request tiles. Create your own Bing Maps key by following the steps mentioned in this link and replace the “YOUR_KEY” in the below code snippet with actual key.

 

Step 2: Then, convert the above URL into the required Bing Maps URL format using the top-level getBingUrlTemplate method and set the URL returned from this method to the urlTemplate property.

 

@override
Widget build(BuildContext context) {
   return Scaffold(
      body: FutureBuilder(
        future: getBingUrlTemplate( 'https://dev.virtualearth.net/REST/V1/Imagery/Metadata/RoadOnDemand?output=json&uriScheme=https&include=ImageryProviders&key=YOUR_KEY'),
        builder: (BuildContext context, AsyncSnapshot<dynamic> snapshot) {
          if (snapshot.hasData) {
             return SfMaps(
               layers: [
                 MapTileLayer(
                   urlTemplate: snapshot.data as String,
                 ),
              ],
           );
         }
         return CircularProgressIndicator();
       }
     ),
  );
}

 

Note:

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

 

Screenshot:

Map

Description automatically generated

 

Check the below links for more features in tile layer.

Live samples,

Package reference,


Conclusion

Hope you enjoyed learning about how to visualize the Bing Maps using 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