Prãshant Saraswat
Prãshant Saraswat

Reputation: 366

How to implement map navigation system inside Xamarin Forms app?

I am developing an app like Ola and Uber which will have navigation system and live tracking inside my Xamarin Forms app (For Android and iOS both platforms). So, can anyone please tell me the way to open the navigation map inside the app?

Upvotes: 1

Views: 1164

Answers (1)

Saamer
Saamer

Reputation: 5099

If you are trying develop an app like Ola/Uber which will have navigation system and live tracking inside the app, then you don't need to open the navigation map inside the app. You just need to display it on the page.

You can follow the official Xamarin.Forms documentation here, to add maps into your Xamarin Forms app. There's a full fledged map sample that you can also see to understand what needs to be done, but your XAML will look something like this:

<ContentPage ...
             xmlns:maps="clr-namespace:Xamarin.Forms.Maps;assembly=Xamarin.Forms.Maps">
    ...
    <maps:Map x:Name="map" />
    ...
</ContentPage>

The 3 dots indicate other controls you would like to add into the page and the layout that you have to put the Map control inside.

In fact you can also take a look at the sample code of several apps (RunAway, YellowClone, SmartHotel, BikeSharing, Movies, Evolve) in Javier Suarez's Good Looking UI curated collection.

Upvotes: 1

Related Questions