GeoJsonSource

constructor(id: String?)(source)

Create an empty GeoJsonSource

Parameters

id

the source id


constructor(id: String?, options: GeoJsonOptions?)(source)

Create an empty GeoJsonSource with non-default GeoJsonOptions.

Parameters

id

the source id

options

options


constructor(id: String?, geoJson: String?)(source)

Create a GeoJsonSource from a raw json string

Parameters

id

the source id

geoJson

raw Json FeatureCollection


constructor(id: String?, geoJson: String?, options: GeoJsonOptions?)(source)

Create a GeoJsonSource from a raw json string and non-default GeoJsonOptions

Parameters

id

the source id

geoJson

raw Json body

options

options


constructor(id: String?, uri: URI)(source)

Create a GeoJsonSource from a geo json URI

An URI is a combination of a protocol and a resource path. The following URI protocol schemes are supported:

  • http://

  • load resources using HyperText Transfer Protocol

  • file://

  • load resources from the Android file system

  • asset://

  • load resources from the binary packaged assets folder

Parameters

id

the source id

uri

unique resource identifier


constructor(id: String?, uri: URI, options: GeoJsonOptions?)(source)

Create a GeoJsonSource from a geo json URI and non-default GeoJsonOptions

An URI is a combination of a protocol and a resource path. The following URI protocol schemes are supported:

  • http://

  • load resources using HyperText Transfer Protocol

  • file://

  • load resources from the Android file system

  • asset://

  • load resources from the binary packaged assets folder

Parameters

id

the source id

uri

remote json file

options

options


constructor(id: String?, features: FeatureCollection?)(source)

Create a GeoJsonSource from a FeatureCollection.

Parameters

id

the source id

features

the features


constructor(id: String?, features: FeatureCollection?, options: GeoJsonOptions?)(source)

Create a GeoJsonSource from a FeatureCollection and non-default GeoJsonOptions.

Parameters

id

the source id

features

the features

options

options


constructor(id: String?, feature: Feature?)(source)

Create a GeoJsonSource from a Feature

Parameters

id

the source id

feature

the feature


constructor(id: String?, feature: Feature?, options: GeoJsonOptions?)(source)

Create a GeoJsonSource from a Feature and non-default GeoJsonOptions

Parameters

id

the source id

feature

the feature

options

options


constructor(id: String?, geometry: Geometry?)(source)

Create a GeoJsonSource from a Geometry

Parameters

id

the source id

geometry

the geometry


constructor(id: String?, geometry: Geometry?, options: GeoJsonOptions?)(source)

Create a GeoJsonSource from a Geometry and non-default GeoJsonOptions

Parameters

id

the source id

geometry

the geometry

options

options


constructor(id: String?, url: URL)(source)

Deprecated

use {@link #GeoJsonSource(String, URI)} instead

Create a GeoJsonSource from a remote geo json file

Parameters

id

the source id

url

remote json file


constructor(id: String?, url: URL, options: GeoJsonOptions?)(source)

Deprecated

use {@link #GeoJsonSource(String, URI, GeoJsonOptions)} instead

Create a GeoJsonSource from a remote geo json file and non-default GeoJsonOptions

Parameters

id

the source id

url

remote json file

options

options