Dynamic polygons and adaptive labels


I have a 2D map application that I'd want to migrate to Cesium. I've gone through this forum, the examples and some documentation trying to find out the best answers to the following questions I still have:

What is the best way to dynamically serve vector data (polygons in my case) that are fetched and displayed based on camera view and zoom level (essentially the bounding box of the mapview in leaflet 2D)? CZML definitely seems to be dynamic in the sense that it even supports fetching a continuous stream of data but I essentially want to fetch and reorganize the entire vector layer based on camera movement, rather than update stuff based on the fourth dimension. In my current application i fetch a block of GeoJSON based on map events. I've seen that GeoJSON is around the corner for Cesium - will that fit my use case better than CZML?

I found a Cesium example that sort of looks like it's doing at least parts of what I'm after:

I want that, but with polygons that load and change based on camera movement and zoom level.

While on the camera view vs. bonding box thing. Is it possible to establish a similar user experience in Cesium, i.e. similar to "onDragDop/onZoomChange -> updateMapWithRelevantVectorData". Are camera view changes discrete enough, or would I have to create a discrete model on top of the smooth movement typically involved in camera movement? I could live with a "update view"-button, but then at least the camera view has to be similar enough to the good old 2D view bounding box.

Is it possible to dynamically size labels/billboards based on zoom level? I assume this can be done with callback-code, but will it be efficient enough to provide a decent user experience? Have the same font-size for labels with vastly different zoom-levels is seldom very user friendly.



(1) Since your handling the loading, CZML vs. GeoJSON vs. using the Cesium API directly is up to you. If you already have GeoJSON, then I would go with that when it is ready (or lend a hand to help finish it). Keep an eye on the GeoJSON branch.

(2) Movement is continuous in Cesium. You can discretize it however you like, e.g., viewer altitude, every x-number of meters, what’s in view, etc.

(3) Label.setScale is pretty efficient. However, if there are 1,000s of labels, you will notice a performance hit. We plan to move this work to the GPU, where it will be very fast. Keep at an on #287.