Created
October 11, 2017 15:00
-
-
Save juucustodio/f1af98e93cef8e026b4d9c8cfba3faa7 to your computer and use it in GitHub Desktop.
Exemplo de como destacar uma região específica no mapa com Xamarin.Forms http://julianocustodio.com/regioes-maps-xamarin-forms
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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