PolygonField class
PolygonField
The incoming data looks like this:
[
{
"type": "Polygon",
"coordinates": [
[
102.0,
2.0
,
103.0,
2.0
,
103.0,
3.0
,
102.0,
3.0
,
102.0,
2.0
]
]
},
{
"type": "Polygon",
"coordinates": [
[
102.0,
2.0
,
103.0,
2.0
,
103.0,
3.0
,
102.0,
3.0
,
102.0,
2.0
]
]
}
]
Constructors
-
PolygonField({required String type, required List<
List< coordinates})List< >double> > -
const
-
PolygonField.fromJson(Map<
String, dynamic> json) -
Parse the incoming json and return a PolygonField
Usage, assuming that u parse a incoming json source, then the runtime type is a _InternalLinkedHashMap:
PolygonField.fromJson(Map<String, dynamic>.from(elem
'location'
))factory
Properties
-
coordinates
→ List<
List< List< >double> > -
The coordinates of the PolygonField.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → String
-
The type of the Field, to reconstruct the incoming json data.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited