public void DisplayInMap() { var spots = DummySpotsData.Read(); foreach (var spot in spots) { try { var position = new Xamarin.Forms.Maps.Position(spot.Latitude, spot.Longitude); var pin = new Xamarin.Forms.Maps.Pin() { Type = Xamarin.Forms.Maps.PinType.SavedPin, Position = position, Label = spot.Name }; map.Pins.Add(pin); } catch (NullReferenceException nre) { } catch (Exception ex) { } } }
public List <Spot> GetSpots(SpotCategory category) { return(DummySpotsData.Read(category)); }