ol-cesium icon indicating copy to clipboard operation
ol-cesium copied to clipboard

VectorImageLayer with cluster in OLCESIUM

Open fjacupar opened this issue 7 months ago • 3 comments

Hello,

I have an Openlayers map with a VectorImageLayer with clusters of points. Is there some way or workaround to show the clusters in the OLCS globe when you switch from Openlayers to Cesium?

On the other hand, I have a TileLayer with Google Layer Source. So, does OLCS allow you to see the Google layer of the Openlayers map in Cesium 3D?

Thanks in advance,

fjacupar avatar Jun 03 '25 20:06 fjacupar

Hi @fjacupar ,

There is no real support for VectorImageLayer in OL-Cesium, even more so for clusters of points. The best approach highly depends on the number of features in your source. Have you seen https://sandcastle.cesium.com/index.html?src=Clustering.html ? Alternatively, you could use billboards and custom logics to hide some billboards depending on the camera distance.

There is no support either for Google source. However there are several occurrences of Google integration in Cesium https://cesium.com/learn/cesiumjs/ref-doc/global.html?classFilter=google . Does one of these match what you are using with OpenLayers? If yes it can probably be added to the existing OL-Cesium synchronizers.

gberaudo avatar Jun 06 '25 13:06 gberaudo

Hi @gberaudo,

Thanks for your reply. Last week, seeing the API, I realized there wasn't any support for VectorImageLayer and cluster points in OLCESIUM. I have implemented the cluster following the example that you provided with Cesium. The thing is, I have thousands of points (around 50000) and when I switch from Openlayers (2D) to Cesium (3D), I have to loop all the Openlayers features and create the cesium entities as points so it decreases the performance and takes several seconds to accomplish this. Is there any option to handle this situation to have a better performance and speed it up? Maybe with primitives?

Thanks in advance.

fjacupar avatar Jun 09 '25 18:06 fjacupar

Hi @fjacupar , instead of creating all entities in 1 operation, you can try to spilt that in smaller chunks, in different frames. If it does not work you can try creating billboards yourself with distanceDisplayCondition.

gberaudo avatar Jun 16 '25 07:06 gberaudo