Geo JSONSource Descriptor
Configuration for a GeoJSON-backed source. At runtime, com.xweather.mapsgl.map.MapController.addSource creates a com.xweather.mapsgl.sources.GeoJSONSource; use com.xweather.mapsgl.map.MapController.getSource and cast to that type to set com.xweather.mapsgl.sources.GeoJSONSource.data or adjust com.xweather.mapsgl.sources.GeoJSONSource.url after registration.
Provide GeoJSON in one of three ways:
bundledAssetPath — path under the host app's
src/main/assets/(loaded on com.xweather.mapsgl.map.MapController.addSource).Assign com.xweather.mapsgl.sources.GeoJSONSource.data after addSource (inline JSON via com.mapbox.geojson.FeatureCollection.fromJson, or an asset path via com.xweather.mapsgl.sources.GeoJSONSource.parseJsonOrAsset).
url — remote GeoJSON endpoint template.
Constructors
In-memory GeoJSON only — set com.xweather.mapsgl.sources.GeoJSONSource.data after com.xweather.mapsgl.map.MapController.addSource. Prefer this constructor over default-arg GeoJSONSourceDescriptor(id = …) when linking against a minified AAR.
Loads GeoJSON from bundledAssetPath under the host app's src/main/assets/ when the source is added. Example: GeoJSONSourceDescriptor("countries", "geojson/conus.geojson").
Properties
Optional Android asset path packaged under src/main/assets/ (app or MapsGL SDK AAR). When set, com.xweather.mapsgl.map.MapController.addSource loads the GeoJSON into com.xweather.mapsgl.sources.GeoJSONSource.data automatically.
Discriminator matching com.xweather.mapsgl.sources.DataSource.kind after registration.