Exemplo n.º 1
0
        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) { }
            }
        }
Exemplo n.º 2
0
 public List <Spot> GetSpots(SpotCategory category)
 {
     return(DummySpotsData.Read(category));
 }