Hi, I have a couple of questions about the minimum pixel size property for models.
First of can I set this property in czml?
Can it be set to billborads ?
Can it be set up to a particular zoom ?
I mean; i have a plane and i wan to see it all the time at list at the size of lets say, 80 pixels.
But when the user gets to far, those 80 pixels are the earth!
So i have a plane the size of the earth on it.
In outer words I would like to make a plane at list 80 pixels, as long as the user is in a particular zoom, lets say 5 out of 19 zoom levels.
or specify a maximum size in proportion to the size of the earth on screen.
for example, the plane will not be more then 2% of the size of the earth at max.
Is any of this possible or planed ?
Thanks!
Hi
First of can I set this property in czml?
Yes, see minimumPixelSize.
Can it be set to billborads ?
Not exactly, but Billboard.scaleByDistance may work for you.
Can it be set up to a particular zoom ?
This is something we call “display conditions”, where we can show/hide a primitive based on a criteria like the viewer’s altitude or distance to the object. It will be a little while before Cesium officially has this feature, but it should be straightforward for you to, for example, change the model’s show property in the Scene.preRender callback based on the distance to the model.
Patrick
hi, Thanks for the quick replay.
I'm trying to access the billboards trough the scene, but cant seem to find how, the primitives collection is empty, although I have some billboards on screen.
If billboards are shown on the screen, scene.primitives should not be empty. If it is, please submit an issue on github with a small test case reproducing it.
With that said, billboards should not be added directly to scene.primitives; a billboard collection should be added to scene.primitives and then billboards are added to the billboard collection.
Patrick