openlayers / ol-cesium

OpenLayers - Cesium integration
http://openlayers.org/ol-cesium/
BSD 2-Clause "Simplified" License
968 stars 321 forks source link

altitudeMode: "clampToGround" #1161

Closed mulfvik closed 4 months ago

mulfvik commented 5 months ago

Hi, I used to be able to configure vector source to clampToGround in the OpenLayers library. This is not the case in newer version of OpenLayers so my points render below the terrain. If I remember correctly they used to clamp to the terrain surface. Also when using PointZ in PostGIS it doesnt use the altitude what it seems like.

Is this correct behavior and is there any solution for rendering points with altitude?

gberaudo commented 5 months ago

Hi @mulfvik, could you post a code snipped about what you did?

mulfvik commented 5 months ago

This was from around year 2021

import VectorLayer from 'ol/layer/Vector';

new VectorLayer({
  altitudeMode: 'clampToGround'
})
gberaudo commented 4 months ago

Hello @mulfvik , this is still supported. I have checked the examples: https://openlayers.org/ol-cesium/examples/vectors.html it looks like still working. Please double check and reopen with reproduction steps if you still have the issue.