//-----------------------------------------------------------------------
//
// Copyright (c) 2016 Mapbox. All rights reserved.
//
//-----------------------------------------------------------------------
namespace Mapbox.Geocoding {
using System;
using System.Collections.Generic;
using Mapbox.Json;
using Mapbox.Utils;
using Mapbox.Utils.JsonConverters;
/// A GeoJSON FeatureCollection of points returned by geocoding API.
#if !WINDOWS_UWP
//http://stackoverflow.com/a/12903628
[Serializable]
#endif
public class Feature {
/// Gets or sets the id. Ids are unique in the Mapbox geocoder.
/// The id.
[JsonProperty("id")]
public string Id { get; set; }
///
/// Gets or sets feature type. One of country, region, postcode, place, locality, neighborhood, address, poi.
///
/// The type.
[JsonProperty("type")]
public string Type { get; set; }
///
/// Gets or sets the text.
///
/// The text.
[JsonProperty("text")]
public string Text { get; set; }
///
/// Gets or sets the name of the place.
///
/// The name of the place.
[JsonProperty("place_name")]
public string PlaceName { get; set; }
///
/// Gets or sets the relevance.
///
/// The relevance.
[JsonProperty("relevance")]
public double Relevance { get; set; }
///
/// Gets or sets the properties.
///
/// The properties.
[JsonProperty("properties")]
public Dictionary Properties { get; set; }
///
/// Gets or sets the bbox.
///
/// The bbox.
[JsonProperty("bbox", NullValueHandling = NullValueHandling.Ignore)]
[JsonConverter(typeof(BboxToVector2dBoundsConverter))]
public Vector2dBounds? Bbox { get; set; }
///
/// Gets or sets the center.
///
/// The center.
[JsonProperty("center")]
[JsonConverter(typeof(LonLatToVector2dConverter))]
public Vector2d Center { get; set; }
///
/// Gets or sets the geometry.
///
/// The geometry.
[JsonProperty("geometry")]
public Geometry Geometry { get; set; }
///
/// Gets or sets the address.
///
[JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)]
public string Address { get; set; }
///
/// Gets or sets the context.
///
/// The context.
[JsonProperty("context", NullValueHandling = NullValueHandling.Ignore)]
public List> Context { get; set; }
}
}