I have a map which want to add from VM. I tried to add command when you click on button MapType will be changed.but it does not working.I know how to make it in codebehind.but I need VM
ContentView
AbsoluteLayout.LayoutBounds="0, 0, 1, 1"
AbsoluteLayout.LayoutFlags="All"
Content="{Binding Map}" />
VM
public Map Map { get; set; }
public Command StandartMapCommand { get; set; }
public Command SatelliteMapCommand { get; set; }
public Command HybridMapCommand { get; set; }
public MasterPageVM()
{
Map = new Map();
StandartMapCommand = new Command(StandardSelected);
SatelliteMapCommand = new Command(SatelliteSelected);
HybridMapCommand = new Command(HybridSelected);
}
public void StandardSelected()
{
Map.MapType = Xamarin.Forms.Maps.MapType.Street;
}
public void HybridSelected()
{
Map.MapType = Xamarin.Forms.Maps.MapType.Hybrid;
}
public void SatelliteSelected()
{
Map.MapType = Xamarin.Forms.Maps.MapType.Satellite;
}
When I click on button map does not change MapType.pls help