GeoJsonLayer

constructor(map: GoogleMap, geoJsonFile: JSONObject, markerManager: MarkerManager, polygonManager: PolygonManager, polylineManager: PolylineManager, groundOverlayManager: GroundOverlayManager)

Creates a new GeoJsonLayer object. Default styles are applied to the GeoJsonFeature objects. addLayerToMap() must be called to trigger rendering onto a map. Use this constructor with shared object managers in order to handle multiple layers with their own event handlers on the map.

Parameters

map

map where the layer is to be rendered

geoJsonFile

GeoJSON data to add to the layer

markerManager

marker manager to create marker collection from

polygonManager

polygon manager to create polygon collection from

polylineManager

polyline manager to create polyline collection from

groundOverlayManager

ground overlay manager to create ground overlay collection from


constructor(map: GoogleMap, resourceId: Int, context: Context, markerManager: MarkerManager, polygonManager: PolygonManager, polylineManager: PolylineManager, groundOverlayManager: GroundOverlayManager)

Creates a new GeoJsonLayer object. Default styles are applied to the GeoJsonFeature objects. addLayerToMap() must be called to trigger rendering onto a map. Use this constructor with shared object managers in order to handle multiple layers with their own event handlers on the map.

Parameters

map

map where the layer is to be rendered

resourceId

GeoJSON file to add to the layer

context

context of the application, required to open the GeoJSON file

markerManager

marker manager to create marker collection from

polygonManager

polygon manager to create polygon collection from

polylineManager

polyline manager to create polyline collection from

groundOverlayManager

ground overlay manager to create ground overlay collection from

Throws

if the file cannot be open for read

if the JSON file has invalid syntax and cannot be parsed successfully


constructor(map: GoogleMap, geoJsonFile: JSONObject)

Creates a new GeoJsonLayer object. Default styles are applied to the GeoJsonFeature objects. addLayerToMap() must be called to trigger rendering onto a map.

Parameters

map

map where the layer is to be rendered

geoJsonFile

GeoJSON data to add to the layer


constructor(map: GoogleMap, resourceId: Int, context: Context)

Creates a new GeoJsonLayer object. Default styles are applied to the GeoJsonFeature objects. addLayerToMap() must be called to trigger rendering onto a map.

Parameters

map

map where the layer is to be rendered

resourceId

GeoJSON file to add to the layer

context

context of the application, required to open the GeoJSON file

Throws

if the file cannot be open for read

if the JSON file has invalid syntax and cannot be parsed successfully