Geo Json Layer
A class that allows the developer to import GeoJSON data, style it and interact with the imported data.
To create a new GeoJsonLayer from a resource stored locally GeoJsonLayer layer = new GeoJsonLayer(getMap(), R.raw.resource,
getApplicationContext());
To render the imported GeoJSON data onto the layer layer.addLayerToMap();
To remove the rendered data from the layer layer.removeLayerFromMap();
Constructors
Link copied to clipboard
constructor(map: GoogleMap, geoJsonFile: JSONObject, markerManager: MarkerManager, polygonManager: PolygonManager, polylineManager: PolylineManager, groundOverlayManager: GroundOverlayManager)
Creates a new GeoJsonLayer object.
constructor(map: GoogleMap, resourceId: Int, context: Context, markerManager: MarkerManager, polygonManager: PolygonManager, polylineManager: PolylineManager, groundOverlayManager: GroundOverlayManager)
Creates a new GeoJsonLayer object.
Creates a new GeoJsonLayer object.
Creates a new GeoJsonLayer object.
Functions
Link copied to clipboard
Adds a GeoJsonFeature to the layer.
Link copied to clipboard
Adds all the GeoJsonFeature objects parsed from the given GeoJSON data onto the map
Link copied to clipboard
Gets the LatLngBounds containing the coordinates of the bounding box for the FeatureCollection.
Link copied to clipboard
Link copied to clipboard
Gets the default style used to render GeoJsonLineStrings.
Link copied to clipboard
Gets the default style used to render GeoJsonPoints.
Link copied to clipboard
Gets the default style used to render GeoJsonPolygons.
Link copied to clipboard
Retrieves a corresponding Feature instance for the given Object Allows maps with multiple layers to determine which layer the Object belongs to.
Link copied to clipboard
Gets an iterable of all Feature elements that have been added to the layer
Link copied to clipboard
Checks if the current layer has been added to the map
Link copied to clipboard
Removes the given GeoJsonFeature from the layer
Link copied to clipboard
Removes all the data from the map and clears all the stored placemarks
Link copied to clipboard
Sets a single click listener for the entire GoogleMap object, that will be called with the corresponding Feature object when an object on the map (Polygon, Marker, Polyline) is clicked.