public class GeoJsonSource extends Source
| Constructor and Description |
|---|
GeoJsonSource(long nativePtr)
Internal use
|
GeoJsonSource(java.lang.String id)
Create an empty GeoJsonSource
|
GeoJsonSource(java.lang.String id,
FeatureCollection features)
Create a GeoJsonSource from a
FeatureCollection |
GeoJsonSource(java.lang.String id,
FeatureCollection features,
GeoJsonOptions options)
Create a GeoJsonSource from a
FeatureCollection and non-default GeoJsonOptions |
GeoJsonSource(java.lang.String id,
GeoJsonOptions options)
Create an empty GeoJsonSource with non-default
GeoJsonOptions |
GeoJsonSource(java.lang.String id,
java.lang.String geoJson)
Create a GeoJsonSource from a raw json string
|
GeoJsonSource(java.lang.String id,
java.lang.String geoJson,
GeoJsonOptions options)
Create a GeoJsonSource from a raw json string and non-default
GeoJsonOptions |
GeoJsonSource(java.lang.String id,
java.net.URL url)
Create a GeoJsonSource from a remote geo json file
|
GeoJsonSource(java.lang.String id,
java.net.URL url,
GeoJsonOptions options)
Create a GeoJsonSource from a remote geo json file and non-default
GeoJsonOptions |
| Modifier and Type | Method and Description |
|---|---|
protected void |
finalize() |
protected void |
initialize(java.lang.String layerId,
java.lang.Object options) |
protected void |
nativeSetUrl(java.lang.String url) |
java.util.List<Feature> |
querySourceFeatures(Filter.Statement filter)
Queries the source for features.
|
void |
setGeoJson(FeatureCollection features)
Updates the GeoJson
|
protected void |
setRawJson(java.lang.String geoJson) |
void |
setUrl(java.lang.String url)
Updates the url
|
void |
setUrl(java.net.URL url)
Updates the url
|
checkValidity, getId, getNativePtr, invalidate, nativeGetIdpublic GeoJsonSource(long nativePtr)
nativePtr - - pointer to native peerpublic GeoJsonSource(java.lang.String id)
id - the source idpublic GeoJsonSource(java.lang.String id,
GeoJsonOptions options)
GeoJsonOptionsid - the source idoptions - optionspublic GeoJsonSource(java.lang.String id,
java.lang.String geoJson)
id - the source idgeoJson - raw Json FeatureCollectionpublic GeoJsonSource(java.lang.String id,
java.lang.String geoJson,
GeoJsonOptions options)
GeoJsonOptionsid - the source idgeoJson - raw Json bodyoptions - optionspublic GeoJsonSource(java.lang.String id,
java.net.URL url)
id - the source idurl - remote json filepublic GeoJsonSource(java.lang.String id,
java.net.URL url,
GeoJsonOptions options)
GeoJsonOptionsid - the source idurl - remote json fileoptions - optionspublic GeoJsonSource(java.lang.String id,
FeatureCollection features)
FeatureCollectionid - the source idfeatures - the featurespublic GeoJsonSource(java.lang.String id,
FeatureCollection features,
GeoJsonOptions options)
FeatureCollection and non-default GeoJsonOptionsid - the source idfeatures - the featuresoptions - optionspublic void setGeoJson(FeatureCollection features)
features - the GeoJSON FeatureCollectionpublic void setUrl(java.net.URL url)
url - the GeoJSON FeatureCollection urlpublic void setUrl(java.lang.String url)
url - the GeoJSON FeatureCollection urlpublic java.util.List<Feature> querySourceFeatures(Filter.Statement filter)
filter - an optional filter statement to filter the returned Featuresprotected void setRawJson(java.lang.String geoJson)
protected void initialize(java.lang.String layerId,
java.lang.Object options)
protected void nativeSetUrl(java.lang.String url)
protected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable