I'm currently using the screen space layout for declutering but it is not exactly what I'm looking for. My goal is that POIs close to the camera(max ~2 km) are rendered with a large icon and text, POIs further away with only a small symbol (max ~10 km) and POIs even further away should be culled.
The culling > 10 km somewhat works when I enable tiling and use a small batch size. The screen space declutering does remove the text and shrink the icon but only based on overlapping and not camera distance.
Re: Style features in model layer depending on camera distance
It's not possible to access camera distance from a script. That is because the script gets evaluated when the features are read and compiled into geometry, not at cull/render time when the camera comes into play. Aside from what you have already done -- set up a layout with a style tied to a maximum range -- there isn't anything else built into osgEarth to do what you want. You would need to author something custom.