Xamarin.Android App with Bing Maps

Asked

Viewed 164 times

0

I saw that the Bing Map API does not provide an SDK for Android. How I could create an app Xamarin.Android with Bing Maps?

  • Do you need to use Bing Maps or could it be a Google Maps, for example? Or another SDK?

  • I’m struggling in Bing map for being a Microsoft solution and certainly have a better integration with other tools (visual studio, . net, Xamarin, etc)

  • Okay, but you don’t have to worry about that. I’ve already used the Google Maps API for Xamarin.Android and it worked perfectly. I currently use another SDK that in my opinion is even better than Google. I will put a response.

1 answer

3

After a quick exchange of information with Matheus (author of the question), I realized that there is no explicit need for the use of Bing Maps. Then I will present two map Apis to Xamarin.Android which, in my opinion, are the best and most reliable currently.

  • Google Maps API
  • Mapbox API

Google Maps API

Use the application Maps It’s great, but sometimes you want to include maps directly in your app. In addition to the built-in map app, Google also offers a native mapping API for Android. The Google Maps API is suitable for cases where you want to maintain more control over the mapping experience. Things possible with the Google Maps API include:

  • Programmatically change the point of view of the map;
  • Add and customize markers;
  • Marking a map with overlays.

Unlike the now-disabled Google Maps API for Android v1, Google Maps v2’s Android API is part of Google Play Services. Therefore, you need to meet some required prerequisites before you can use the Google Maps API for Android in an app Xamarin.Android.

Besides the packages NuGet necessary for the Google Maps API, it is also necessary to install the Google Play Services.

The perhaps more complicated part is to set up your app to receive the Google Maps API. You need to create a Google Apis account, generate a key, and link the same with your app. But don’t be alarmed, it has all well documented.

Must-read

Mapbox API

The Mapbox Maps SDK for Android is a set of open source tools to create mapping applications for Android devices with great flexibility for visual style and customization.

With Mapbox Studio, you can customize every aspect of the map, from adjusting colors to hiding or displaying specific layers, to deciding what information you want to display on the map.

Choose a map style or completely customize your own map and data. Maps are rendered at a super high frame rate - allowing maps to respond fluidly to user comments or scripted events.

The Mapbox API for Xamarin.Android is an option as good as (in my opinion even better than) the Google Maps API.

I say this because I have needed some features that Google Maps does not offer in its SDK for Xamarin, such as the use of a map offline no expiration date and advanced map customization that the Mapbox API offers.

The only obstacle I found was that version for Xamarin.Android of the Mapbox API did not have all the methods implemented due to the fact that it was done by the Xamarin development team and they forgot to port all the functionalities.

Exchanging emails with the team responsible for the API (Xamarin), they informed me of the existence of another library that was ported by another company and that works perfectly at first. The link to this API/SDK is in the "required reading" item below.

Must-read

Still want to use Bing Maps?

If you still want to use Bing Maps in your app, the only change you’ll need to make is to change your project Xamarin.Android for a project Xamarin.Forms.

There is a Bing Maps API available for Xamarin.Forms using the Google API together.

Must-read

Completion

Given the experience I have had with both Apis, I recommend using Mapbox. In addition to being much more customizable than the Google Maps API, the company’s support in case of questions and problems is very good and the API documentation is very complete.

I’ve been using Mapbox for two years and the API maps are both in one application Xamarin.Android as in an application . NET Core. So far I have not gotten any kind of problem, quite the contrary, only praise.

Source (in addition to those previously reported)

  • 1

    Very good. Great references! + 1 because you can’t +10

  • 1

    @Diegorafaelsouza Thank you so much for the feedback. Comments like this motivate us even more to help the community.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.