Xamarin.Forms.Maps.Pin Class
A marker on a Xamarin.Forms.Maps.Map.

See Also: Pin Members

Syntax

public sealed class Pin : Xamarin.Forms.BindableObject

Remarks

A Xamarin.Forms.Maps.Pin must have its Pin.Label property assigned before it is added to a map. If not, a ArgumentException is thrown.

C# Example

public static Page GetMapPage ()
{	
	var map = new Map (MapSpan.FromCenterAndRadius (new Position (37, -122), Distance.FromMiles (10)));

//If Label is not set, runtime exception
	var pin = new Pin () {
		Position = new Position (37, -122),
		Label = "Some Pin!"
	};
	map.Pins.Add (pin);

	var cp = new ContentPage { 
		Content = map, 
	};

	return cp;
}

          

Requirements

Namespace: Xamarin.Forms.Maps
Assembly: Xamarin.Forms.Maps (in Xamarin.Forms.Maps.dll)
Assembly Versions: 1.0.0.0, 1.1.0.0, 1.3.0.0