Esempio n. 1
0
 public static GeoJsonFeature FromCombinedRecord(CombinedRecord record, string colour, string action)
 {
     return(new GeoJsonFeature
     {
         Properties = new Dictionary <string, string> {
             { "marker-color", colour },
             { "marker-size", "medium" },
             { "address", record.DisplayAddress },
             { "action", action }
         },
         Geometry = GeoJsonPoint.FromCombinedRecord(record)
     });
 }
Esempio n. 2
0
        public static GeoJsonPoint FromCombinedRecord(CombinedRecord record)
        {
            double lon = 0;
            double lat = 0;

            double.TryParse(record.Longitude, out lon);
            double.TryParse(record.Latitude, out lat);
            return(new GeoJsonPoint
            {
                Coordinates = new List <double> {
                    lon, lat
                },
            });
        }