Extend GeoJson data source

We use a GeoJson data source to import some data into Cesium but w’d like to support more styling options and object types than the ones provided by default.

We wonder how we could the more easily “extend” the data source. Indeed it seems that only the load() method is exposed and all other helper functions are private, e.g. exposing the geoJsonObjectTypes map would make it easy to replace specific code and utility functions such as createPoint() more easy to reuse base behavior.

At the current moment it seems that we need to almost reimplement the whole data source to simply add support for a new property e.g. in style. As a workaround we now post-process the entities that have been created by the data source to manage our specific properties but the code is not so clean that way. Moreover it sometimes require that we destroy the entity/graphics to recreate a new one.

Our Cesium version is 1.50.


Post-processing the entities after creation has been my approach as well. Are you imagining that the GeoJsonDataSource class would allow you to pass function callbacks that override the default createPoint, createPolygon etc…? That could be a really flexible system, although I’m not sure how many people have this use case.

For example, are the extensions you want to make something others would benefit from as well? If so, it would be great to get a code contribution in (see https://github.com/AnalyticalGraphicsInc/cesium/blob/master/CONTRIBUTING.md#opening-a-pull-request) !