GeoJsonDataSource
A DataSource which processes both GeoJSON and TopoJSON data. simplestyle-spec properties will also be used if they are present.
const viewer = new Viewer('cesiumContainer');
viewer.dataSources.add(GeoJsonDataSource.load('../../SampleData/ne_10m_us_states.topojson', {
stroke: Color.HOTPINK,
fill: Color.PINK,
strokeWidth: 3,
markerSymbol: '?'
}));
See also
Properties
Gets an event that will be raised when the underlying data changes.
This DataSource only defines static data, therefore this property is always undefined.
Gets or sets the clustering options for this data source. This object can be shared between multiple data sources.
Gets the collection of Entity instances.
Gets an event that will be raised if an error is encountered during processing.
Gets an event that will be raised when the data source either starts or stops loading.
Functions
Asynchronously loads the provided GeoJSON or TopoJSON data, replacing any existing data.
Asynchronously loads the provided GeoJSON or TopoJSON data, without replacing any existing data.
Updates the data source to the provided time. This function is optional and is not required to be implemented. It is provided for data sources which retrieve data based on the current animation time or scene state. If implemented, update will be called by DataSourceDisplay once a frame.