| Name | Type | Description |
|---|---|---|
options |
GeoJsonPrimitiveConstructorOptions | optional |
Example:
const loader = await Cesium.GeoJsonPrimitive.fromUrl("./data.geojson");
viewer.scene.primitives.add(loader);
loader.points; // BufferPointCollection | undefined
loader.polylines; // BufferPolylineCollection | undefined
loader.polygons; // BufferPolygonCollection | undefined
loader.ids; // source feature IDs
loader.properties; // source feature properties
Experimental
This feature is not final and is subject to change without Cesium's standard deprecation policy.
Members
Feature count represented by the loaded collections.
Lookup table from integer ID generated by GeoJsonPrimitive, to integer or string Feature ID from GeoJSON source.
readonly points : BufferPointCollection|undefined
Buffer point collection for point geometries.
readonly polygons : BufferPolygonCollection|undefined
Buffer polygon collection for polygon geometries.
readonly polylines : BufferPolylineCollection|undefined
Buffer polyline collection for linestring geometries.
Source GeoJSON properties, indexed by generated integer ID.
Loader source URL when created via
GeoJsonPrimitive.fromUrl.
Methods
static Cesium.GeoJsonPrimitive.fromGeoJson(geoJson, options) → GeoJsonPrimitive
Creates a loader directly from a parsed GeoJSON object.
| Name | Type | Description |
|---|---|---|
geoJson |
object | |
options |
GeoJsonPrimitiveConstructorOptions | optional |
Returns:
async static Cesium.GeoJsonPrimitive.fromUrl(url, options) → Promise.<GeoJsonPrimitive>
Loads GeoJSON from a URL or
Resource.
| Name | Type | Description |
|---|---|---|
url |
Resource | string | |
options |
GeoJsonPrimitiveConstructorOptions | optional |
Returns:
| Name | Type | Description |
|---|---|---|
featureId |
number |
| Name | Type | Description |
|---|---|---|
featureId |
number |
