Is there a way to draw a line scaling with different factor on different zooms

There is a scenario, that I need to draw one road on the map with Cesium, but I want to display the road with different width on different zooms. I did some research and didn’t find any API that provides that mechanism. Anyone can help me with this?

How are you drawing this line? Polylines in CesiumJS are designed to be a constant width on screen regardless of camera zoom. It sounds like you might want to create a polygon/rectangle spanning your road so it stays “fixed in the world” as you zoom in or out. If you need to control the width another way, you’ll need to create a dynamic polyline with a callback property:

This example moves the polyline over time, but any property, such as width, can be dynamic in the same way.

Hi Omar,

Thanks for the reply, the sample gives me some ideas, thanks again.