I have a custom map implementation in xamrin.froms . am able to customize the pin icon to custom icons (image). i have different pins and those pin have different icons . am not able to bind the different icons to the map. Its always same icons even i have added the conditions .
'protected override MarkerOptions CreateMarker(Pin pin){
var marker = new MarkerOptions();
marker.SetPosition(new LatLng(pin.Position.Latitude, pin.Position.Longitude));
marker.SetTitle(pin.Label);
marker.SetSnippet(pin.Address);
customPins.ToList().ForEach(x =>{
switch ((x.PinType){
case PinTypeOptions.Vehicle:
marker.SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.Truck50));
break;
case PinTypeOptions.OperationLocation:
marker.SetIcon(BitmapDescriptorFactory.FromResource(Resource.Drawable.feuerwehrauto100));
break;
default:
break;
}
});
return marker;
}'