2

I have the following code, but geometryInstances is not showing up on my 3D model.

         propertyPlacemark.push(viewer.entities.add({
      geometryInstances : new Cesium.GeometryInstance({
              geometry : Cesium.BoxGeometry.fromDimensions({

                dimensions : new Cesium.Cartesian3(8.0, 5.0, 8.0)
              }),
              modelMatrix : Cesium.Matrix4.multiplyByTranslation(Cesium.Transforms.eastNorthUpToFixedFrame(
    Cesium.Cartesian3.fromDegrees(parseFloat(block[2]),parseFloat(block[1]))), new Cesium.Cartesian3(0.0, 0.0, 0.0), new Cesium.Matrix4()),
              attributes : {
                color : Cesium.ColorGeometryInstanceAttribute.fromColor(new Cesium.Color(1.0, 0.0, 0.0, 0.5)),

              },

            })
    }));

*parseFloat(block[2])= longitude
parseFloat(block[1])= latitude

Expected outcome: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.