I'm currently working with the QuadtreePrimitive and a tile provider based on the DemoTileProvider (from the Sandcastle).
I'm trying to move to the new Entities API while keeping the DemoTileProvider structure and I'm running into some issues:
With the primitive API, on `DemoTileProvider.prototype.showTileThisFrame` it called update on the primitive collection, but now there is no update function on entity/entityCollection.
So I created a DataSourceDisplay and pushed my entities into a GeoJsonDataSource, but it seems to put all of the primitives/entities into the `scene._primitives`, which makes them constantly visible, and by that loses the power of the QuadtreePrimitive.
Is there anyway to make them work together?
Thanks.
I haven’t tried it, but if I were going to do this, I’d try creating a separate GeoJsonDataSource per tile. In QuadtreeTileProvider.showTileThisFrame, add the data source to the DataSourceDisplay if it’s not already there. In QuadtreeTileProvider.endUpdate, remove any data sources for which showTIleThisFrame was not called this frame. I’m pretty sure this will work, but I don’t know how the performance will be.
Kevin’s approach is the best way to do it (for now).
With a few tweaks, we could probably make it so that you can provide a PrimitiveCollection to the underlying visualizers rather than assuming scene.collection. That would give us one primitive per-tile that we could opt not to update as needed.