How to change pin icon when selecting a Map pin?

stesvisstesvis USMember ✭✭✭

Let's say I add a pin to my Xamarin.Forms.GoogleMaps:

var pin = new Pin
{
    Position = new Position(guide.Latitude.Value, guide.Longitude.Value),
    Label = guide.DisplayName,
    Icon = BitmapDescriptorFactory.FromBundle("ic_vg_guide_pin.png"),
    Address = guide.LocationName,
    Tag = guide.Id
};

Once i select the pin via PinClicked event, how can i change the icon to a "selected" icon?

Best Answer

Answers

  • stesvisstesvis USMember ✭✭✭

    Awesome! And it automatically goes back to the original icon if you tap somewhere else.
    Thanks @LandLu

Sign In or Register to comment.