Version 3.0.345

This commit is contained in:
Oliver Hauff 2022-10-12 21:02:34 +02:00
parent 4476717f26
commit 48667b2660
17 changed files with 154 additions and 96 deletions

View file

@ -211,7 +211,7 @@ namespace TINK.ViewModel.Map
continue;
}
var l_oPin = new Pin
var pin = new Pin
{
Position = new Xamarin.Forms.GoogleMaps.Position(station.Position.Latitude, station.Position.Longitude),
@ -223,7 +223,7 @@ namespace TINK.ViewModel.Map
IsVisible = false, // Set to false to prevent showing default icons (flickering).
};
Pins.Add(l_oPin);
Pins.Add(pin);
}
}
@ -244,14 +244,14 @@ namespace TINK.ViewModel.Map
var colorPartPrefix = GetRessourceNameColorPart(stationsColorList[pinIndex]);
var l_iName = $"{indexPartPrefix.ToString().PadLeft(2, '0')}_{colorPartPrefix}{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
var name = $"{indexPartPrefix.ToString().PadLeft(2, '0')}_{colorPartPrefix}{(DeviceInfo.Platform == DevicePlatform.Android ? ".png" : string.Empty)}";
try
{
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(l_iName);
Pins[pinIndex].Icon = BitmapDescriptorFactory.FromBundle(name);
}
catch (Exception l_oException)
catch (Exception excption)
{
Log.ForContext<MapPageViewModel>().Error("Station icon {l_strName} can not be loaded. {@l_oException}.", l_oException);
Log.ForContext<MapPageViewModel>().Error("Station icon {name} can not be loaded. {@excption}.", name, excption);
Pins[pinIndex].Label = stationId.ToString();
Pins[pinIndex].Icon = BitmapDescriptorFactory.DefaultMarker(stationsColorList[pinIndex]);
}