GeoJson flyTo datasource weighted to most objects


I’ve got a GeoJSON data source that draws a bunch of pins on a map and zooms to the data source. The problem is when I have a cluster of pins in say New York, then one in Korea, the map zooms into central Asia, which is technically the middle of the dataset, but, the more desirable behavior would be for the zoom to bias or weight toward the bulk of the objects. Is this possible without calculating this myself and manually telling the camera where to fly to?

Hi there,

I don’t think the Cesium API provides a direct way to do this. If you find a good way of computing this, let us know. I’m sure the community would love an example!


Will do!

1 Like