Package com.azure.maps.search.models
Class GeoJsonGeometry
java.lang.Object
com.azure.maps.search.models.GeoJsonObject
com.azure.maps.search.models.GeoJsonGeometry
- All Implemented Interfaces:
com.azure.json.JsonSerializable<GeoJsonObject>
A valid `GeoJSON` geometry object. The type must be one of the seven valid GeoJSON geometry types - Point,
MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. Please refer to [RFC
7946](https://tools.ietf.org/html/rfc7946#section-3.1) for details.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic GeoJsonGeometryfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of GeoJsonGeometry from the JsonReader.getType()Get the type property: Specifies the `GeoJSON` type.Set the bbox property: Bounding box.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter) Methods inherited from class com.azure.maps.search.models.GeoJsonObject
getBboxMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.azure.json.JsonSerializable
toJson, toJson, toJsonBytes, toJsonString
-
Constructor Details
-
GeoJsonGeometry
public GeoJsonGeometry()Creates an instance of GeoJsonGeometry class.
-
-
Method Details
-
getType
Get the type property: Specifies the `GeoJSON` type. Must be one of the nine valid GeoJSON object types - Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection, Feature and FeatureCollection.- Overrides:
getTypein classGeoJsonObject- Returns:
- the type value.
-
setBbox
Set the bbox property: Bounding box. Projection used - EPSG:3857. Please refer to [RFC 7946](https://datatracker.ietf.org/doc/html/rfc7946#section-5) for details.- Overrides:
setBboxin classGeoJsonObject- Parameters:
bbox- the bbox value to set.- Returns:
- the GeoJsonObject object itself.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<GeoJsonObject>- Overrides:
toJsonin classGeoJsonObject- Throws:
IOException
-
fromJson
Reads an instance of GeoJsonGeometry from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of GeoJsonGeometry if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IOException- If an error occurs while reading the GeoJsonGeometry.
-