Cesium for Unity 1.23.0
Loading...
Searching...
No Matches
CesiumForUnity.CesiumGeoJsonDocument Class Reference

Represents a parsed GeoJSON document. More...

Public Member Functions

partial bool IsValid ()
 Checks whether this GeoJSON document is valid.
 
partial CesiumGeoJsonObject GetRootObject ()
 Gets the root object of this GeoJSON document.
 

Static Public Member Functions

static CesiumGeoJsonDocument Parse (string geoJsonString)
 Parses a GeoJSON document from a string.
 
static async Task< CesiumGeoJsonDocumentLoadFromUrlAsync (string url)
 Loads a GeoJSON document from a URL asynchronously.
 
static async Task< CesiumGeoJsonDocumentLoadFromCesiumIonAsync (long ionAssetId, string ionAccessToken="", CesiumIonServer ionServer=null)
 Loads a GeoJSON document from Cesium ion asynchronously.
 

Detailed Description

Represents a parsed GeoJSON document.

A GeoJSON document contains a hierarchy of GeoJSON objects starting with a root object. This class provides methods to load GeoJSON from various sources and access the parsed content.

Definition at line 19 of file CesiumGeoJsonDocument.cs.

Member Function Documentation

◆ GetRootObject()

partial CesiumGeoJsonObject CesiumForUnity.CesiumGeoJsonDocument.GetRootObject ( )

Gets the root object of this GeoJSON document.

Returns
The root GeoJSON object, or null if the document is invalid.

◆ IsValid()

partial bool CesiumForUnity.CesiumGeoJsonDocument.IsValid ( )

Checks whether this GeoJSON document is valid.

Returns
True if the document is valid and has been successfully parsed; false otherwise.

◆ LoadFromCesiumIonAsync()

static async Task< CesiumGeoJsonDocument > CesiumForUnity.CesiumGeoJsonDocument.LoadFromCesiumIonAsync ( long ionAssetId,
string ionAccessToken = "",
CesiumIonServer ionServer = null )
inlinestatic

Loads a GeoJSON document from Cesium ion asynchronously.

Parameters
ionAssetIdThe Cesium ion asset ID.
ionAccessTokenThe Cesium ion access token. If empty, the default token will be used.
ionServerThe Cesium ion server to use. If null, the default server will be used.
Returns
A task that resolves to the loaded CesiumGeoJsonDocument, or null if loading failed.

Definition at line 89 of file CesiumGeoJsonDocument.cs.

◆ LoadFromUrlAsync()

static async Task< CesiumGeoJsonDocument > CesiumForUnity.CesiumGeoJsonDocument.LoadFromUrlAsync ( string url)
inlinestatic

Loads a GeoJSON document from a URL asynchronously.

Parameters
urlThe URL to load the GeoJSON from.
Returns
A task that resolves to the loaded CesiumGeoJsonDocument, or null if loading failed.

Definition at line 65 of file CesiumGeoJsonDocument.cs.

◆ Parse()

static CesiumGeoJsonDocument CesiumForUnity.CesiumGeoJsonDocument.Parse ( string geoJsonString)
inlinestatic

Parses a GeoJSON document from a string.

Parameters
geoJsonStringThe GeoJSON string to parse.
Returns
A new CesiumGeoJsonDocument, or null if parsing failed.

Definition at line 45 of file CesiumGeoJsonDocument.cs.


The documentation for this class was generated from the following file: