Class PolylineToVector2dListConverter
Bbox to geo coordinate bounds converter.
Inheritance
System.Object
PolylineToVector2dListConverter
Namespace:Mapbox.Utils.JsonConverters
Assembly:Mapbox.Utils.dll
Syntax
public class PolylineToVector2dListConverter : CustomCreationConverter<List<Vector2d>>
Properties
CanWrite
Gets a value indicating whether this Mapbox.PolylineToVector2dListConverter can write.
Declaration
public override bool CanWrite { get; }
Property Value
| Type | Description |
|---|---|
| System.Boolean |
|
Methods
Create(Type)
Create the specified objectType.
Declaration
public override List<Vector2d> Create(Type objectType)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | objectType | Object type. |
Returns
| Type | Description |
|---|---|
| List<Vector2d> | A List of Vector2d. |
Create(Type, String)
Create the specified objectType and jArray.
Declaration
public List<Vector2d> Create(Type objectType, string polyLine)
Parameters
| Type | Name | Description |
|---|---|---|
| Type | objectType | Object type. |
| System.String | polyLine | String representation of a polyLine. |
Returns
| Type | Description |
|---|---|
| List<Vector2d> | A List of Vector2d. |
ReadJson(JsonReader, Type, Object, JsonSerializer)
Reads the json. Must be a linestring.
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 as an encoded polyline.
Declaration
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
Parameters
| Type | Name | Description |
|---|---|---|
| JsonWriter | writer | A |
| System.Object | value | The original value. |
| JsonSerializer | serializer | A |