Skip to content

Instantly share code, notes, and snippets.

@dev-aritra
Created February 11, 2019 13:04
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save dev-aritra/298b745da83f14cdfefe3c77eb600d52 to your computer and use it in GitHub Desktop.
private void AddMarkers()
{
Position loc1 = new Position(17.430486, 78.341331);
Position loc2 = new Position(17.427579, 78.342017);
Pin marker1 = new Pin()
{
Address = "Gachibowli",
IsVisible = true,
Label = "Microsoft Hyderabad",
Icon = BitmapDescriptorFactory.FromBundle("type1"),
Position = loc1,
Type = PinType.Place
};
Pin marker2 = new Pin()
{
Address = "Gachibowli",
IsVisible = true,
Label = "Wipro Hyderabad",
Icon = BitmapDescriptorFactory.FromBundle("type2"),
Position = loc2,
Type = PinType.Place
};
mapView.Pins.Add(marker1);
mapView.Pins.Add(marker2);
mapView.MoveToRegion(MapSpan.FromCenterAndRadius(marker1.Position, Distance.FromMeters(1000)));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment