Class LonLatToVector2dConverter
Bbox to geo coordinate bounds converter.
Inheritance
System.Object
LonLatToVector2dConverter
Namespace:Mapbox.Utils.JsonConverters
Assembly:Mapbox.Utils.dll
Syntax
public class LonLatToVector2dConverter : CustomCreationConverter<Vector2d>
Properties
CanWrite
Gets a value indicating whether this Mapbox.LonLatToVector2dConverter can write.
Declaration
public override bool CanWrite { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Methods
Create(Type)
Create the specified objectType.
Declaration
public override Vector2d Create(Type objectType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | objectType | Object type. |
Returns
| Type | Description |
|---|---|
| Vector2d | A Vector2d. |
Create(Type, JArray)
Create the specified objectType and jArray.
Declaration
public Vector2d Create(Type objectType, JArray val)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | objectType | Object type. |
| JArray | val | Jarray representing a two length array of coordinates. |
Returns
| Type | Description |
|---|---|
| Vector2d | A Vector2d. |
ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the json.
Declaration
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonReader | reader | A reader. |
| Type | objectType | Object type. |
| System.Object | existingValue | Existing value. |
| JsonSerializer | serializer | A |
Returns
| Type | Description |
|---|---|
| System.Object | The serialized object. |
WriteJson(JsonWriter, Object, JsonSerializer)
Writes the json.
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonWriter | writer | A |
| System.Object | value | The value to serialize. |
| JsonSerializer | serializer | A |