You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, I'm using your library for a project at work, I'm using ol-cesium 2.20 and angular 18 in a custom angular library.
For a task I need to adjust the visibility of some vector layer points in 3d view to hide them if they are positioned behind a building, is that possobile in ol-cesium? with Cesium is possible to use the property "disableDepthTestDistance: Number.POSITIVE_INFINITY" when creating a marker or a pointGrapthic entity, I'm using clamp to ground for the vector layer but I can't use "scene.testDepthAgainstTerrain=true" because it messes with the rendering of google 3d building tileset that i'm using.
If it isn't possible can I take each drawn primitive (> 10000 points) and change its properties for my needs or use another method to solve this problem?
`
//this is how i create the vector layer
createEmptyVector(layer: Layer2dList) {
const vectorSource = new VectorSource({
format: new GeoJSON({
dataProjection: layer.crs,
featureProjection: 'EPSG:3857',
}),
wrapX: false,
strategy: bboxStrategy,
overlaps: false,
});
const vectorLayer = new VectorLayer({
source: vectorSource,
style: (layer.styles as any)[0].rules
});
this.setAttributesToOlLayer(layer, vectorLayer);
vectorLayer.set('altitudeMode', 'clampToGround');
return vectorLayer;
}
`
`//this is how i add the features because the vector layer didn't update properly when using ol-cesium in stack mode
//so i'.ve used a WMS in 2d and a vector in 3d to show thousends points
sync3dLayers(map3d: OLCesium, map2d: Map) {
if (!!map3d) {
map3d.getCesiumScene().camera.moveEnd.addEventListener(() => {
let bbox = this.getBoundingBoxFromCamera(map3d)
let polygon = this.featureService.bboxToPolygon(bbox!)
const mapLayers = map2d.getAllLayers()
this.layers3dVector.forEach((l) => {
let vectorLayer = mapLayers.find((lay) => lay.get('id') === l.uuid)!
let originalLayer = mapLayers.find((lay) => lay.get('id') === l.associated_layer)!
if (originalLayer.getSource() instanceof TileWMS) {
let source = vectorLayer.getSource()! as Vector
this.featureService.getFeatureFromWMSLayerByMultiPolygon(originalLayer, new MultiPolygon([polygon])).subscribe(
features => {
let existing = source.getFeatures() as Feature<Geometry>[]
let filtered: Feature<Geometry>[] = features.filter((f) => !existing.some((e) => e.get('id') === f.get('id')));
filtered = filtered.map((feature) => {
const geometry = feature.getGeometry();
if (geometry) {
geometry.transform(
'EPSG:4326', 'EPSG:3857'
);
}
return feature;
})
source.addFeatures(filtered)
}
)
}
})
})
}
//this is how i add the google tileset to the map:
addTileset(tileset: Cesium3DTileset, map3d: OLCesium) {
const scene = map3d.getCesiumScene()
scene.primitives.add(
tileset
);
}`
Thank you in advance for your help and thank you for your awesome library
The text was updated successfully, but these errors were encountered:
Hi, I'm using your library for a project at work, I'm using ol-cesium 2.20 and angular 18 in a custom angular library.
For a task I need to adjust the visibility of some vector layer points in 3d view to hide them if they are positioned behind a building, is that possobile in ol-cesium? with Cesium is possible to use the property "disableDepthTestDistance: Number.POSITIVE_INFINITY" when creating a marker or a pointGrapthic entity, I'm using clamp to ground for the vector layer but I can't use "scene.testDepthAgainstTerrain=true" because it messes with the rendering of google 3d building tileset that i'm using.
If it isn't possible can I take each drawn primitive (> 10000 points) and change its properties for my needs or use another method to solve this problem?
`
//this is how i create the vector layer
createEmptyVector(layer: Layer2dList) {
}
`
`//this is how i add the features because the vector layer didn't update properly when using ol-cesium in stack mode
//so i'.ve used a WMS in 2d and a vector in 3d to show thousends points
sync3dLayers(map3d: OLCesium, map2d: Map) {
if (!!map3d) {
map3d.getCesiumScene().camera.moveEnd.addEventListener(() => {
//this is how i add the google tileset to the map:
addTileset(tileset: Cesium3DTileset, map3d: OLCesium) {
const scene = map3d.getCesiumScene()
scene.primitives.add(
tileset
);
}`
Thank you in advance for your help and thank you for your awesome library
The text was updated successfully, but these errors were encountered: