Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Exemplo de como destacar uma região específica no mapa com Xamarin.Forms http://julianocustodio.com/regioes-maps-xamarin-forms
using Xamarin.Forms;
using Xamarin.Forms.Maps;
using Xamarin.Forms.Xaml;
namespace App
{
[XamlCompilation(XamlCompilationOptions.Compile)]
public partial class Square : ContentPage
{
public Square()
{
InitializeComponent();
/*Define área que será demonstrada no mapa*/
Mapa.MoveToRegion(MapSpan.FromCenterAndRadius(new Position(-23.4862658, -47.4443345), Distance.FromMiles(0.2)));
/*Define os pontos da região que será destacada*/
Mapa.ShapeCoordinates.Add(new Position(-23.486265, -47.444334));
Mapa.ShapeCoordinates.Add(new Position(-23.486836, -47.443764));
Mapa.ShapeCoordinates.Add(new Position(-23.487302, -47.444504));
Mapa.ShapeCoordinates.Add(new Position(-23.486667, -47.444994));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment