I’m using the feature style InstancedModel to represent database features with 3D objects, but all the models are loaded at 0m and I want them at different elevations. I’ve got accurate Z geometry in the database but models still load at 0m.
My script looks like this:
onFeature(function(feature, attributes) {
model='model';
let rotation = attributes.Bearing;
feature.style("InstancedModel", {
"url": model,
"scale": [ 3, 3, 3],
"rotation": rotation,
"altitudeMode":"relativeToGround"
});
Hi,
If each geometry in the database has a correct Z-value, then it should work. But if the Z-value is missing you can configure the source and use either elevation from source (to fetch it from a DTM) or elevation from attribute (if it exists in an attribute).
Keep in mind that altitudeMode does not work for the InstancedModel-style.
In order to assist you more and investigate it a bit further, I suggest sending us a support ticket via our Help section in the OCP interface, letting us know which Instance and source have the above issue.