diff options
author | Ivo van Dongen <info@ivovandongen.nl> | 2016-10-04 14:26:04 +0200 |
---|---|---|
committer | Ivo van Dongen <ivovandongen@users.noreply.github.com> | 2016-10-05 12:15:15 +0200 |
commit | dd7713f6ee55a15b4ec5228a46a13c184dfdc01f (patch) | |
tree | dcd6afde3062995c25e7cdf5ab964a7b48103f9c /platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/GeoJsonSource.java | |
parent | 93166aef482ea5835d87231f88d369449398ccdf (diff) | |
download | qtlocation-mapboxgl-dd7713f6ee55a15b4ec5228a46a13c184dfdc01f.tar.gz |
[android] javadoc - inter-link style properties properly
Diffstat (limited to 'platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/GeoJsonSource.java')
-rw-r--r-- | platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/GeoJsonSource.java | 36 |
1 files changed, 29 insertions, 7 deletions
diff --git a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/GeoJsonSource.java b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/GeoJsonSource.java index a66e0a4adc..80730d143c 100644 --- a/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/GeoJsonSource.java +++ b/platform/android/MapboxGLAndroidSDK/src/main/java/com/mapbox/mapboxsdk/style/sources/GeoJsonSource.java @@ -8,7 +8,7 @@ import java.util.ArrayList; import java.util.HashMap; /** - * A GeoJson source. + * A GeoJson source. Exposes a {@link FeatureCollection} from Json. * * @see <a href="https://www.mapbox.com/mapbox-gl-style-spec/#sources-geojson">the style specification</a> */ @@ -16,6 +16,8 @@ public class GeoJsonSource extends Source { /** * Internal use + * + * @param nativePtr - pointer to native peer */ public GeoJsonSource(long nativePtr) { super(nativePtr); @@ -32,7 +34,7 @@ public class GeoJsonSource extends Source { } /** - * Create an empty GeoJsonSource + * Create an empty GeoJsonSource with non-default {@link GeoJsonOptions} * * @param id the source id * @param options options @@ -46,7 +48,7 @@ public class GeoJsonSource extends Source { * Create a GeoJsonSource from a raw json string * * @param id the source id - * @param geoJson raw Json body + * @param geoJson raw Json FeatureCollection */ public GeoJsonSource(String id, String geoJson) { if (geoJson == null || geoJson.startsWith("http")) { @@ -57,7 +59,7 @@ public class GeoJsonSource extends Source { } /** - * Create a GeoJsonSource from a raw json string + * Create a GeoJsonSource from a raw json string and non-default {@link GeoJsonOptions} * * @param id the source id * @param geoJson raw Json body @@ -83,7 +85,7 @@ public class GeoJsonSource extends Source { } /** - * Create a GeoJsonSource from a remote geo json file + * Create a GeoJsonSource from a remote geo json file and non-default {@link GeoJsonOptions} * * @param id the source id * @param url remote json file @@ -95,7 +97,7 @@ public class GeoJsonSource extends Source { } /** - * Create a GeoJsonSource from a FeatureCollection + * Create a GeoJsonSource from a {@link FeatureCollection} * * @param id the source id * @param features the features @@ -106,7 +108,7 @@ public class GeoJsonSource extends Source { } /** - * Create a GeoJsonSource from a FeatureCollection + * Create a GeoJsonSource from a {@link FeatureCollection} and non-default {@link GeoJsonOptions} * * @param id the source id * @param features the features @@ -117,21 +119,41 @@ public class GeoJsonSource extends Source { setGeoJson(features); } + /** + * Updates the GeoJson + * + * @param features the GeoJSON {@link FeatureCollection} + */ public void setGeoJson(FeatureCollection features) { checkValidity(); setGeoJson(features.toJson()); } + /** + * Updates the GeoJson + * + * @param json the raw GeoJson FeatureCollection string + */ public void setGeoJson(String json) { checkValidity(); setRawJson(json); } + /** + * Updates the url + * + * @param url the GeoJSON FeatureCollection url + */ public void setUrl(URL url) { checkValidity(); setUrl(url.toExternalForm()); } + /** + * Updates the url + * + * @param url the GeoJSON FeatureCollection url + */ public void setUrl(String url) { checkValidity(); nativeSetUrl(url); |