Hi everyone,
I am using Appstudio to create a 3D GIS mobile app. I am using the SceneView to visualize 3D maps with elevations. I have a strange bug: sometimes the elevation seems to not work in Android, while it works in all the other platforms (Windows, iOS and Mac). The bug seems to be totally random and I cannot fully reproduce the behaviour every time (except during official presentations, where it never work!).
This is the demo code:
import QtQuick 2.13
import QtQuick.Controls 2.13
import ArcGIS.AppFramework 1.0
import Esri.ArcGISRuntime 100.15
Rectangle {
width: 800
height: 600
property real size: 0.01
property int maxZ: 1000
property var colors: []
// Create a scene view
SceneView {
id: sceneView
anchors.fill: parent
// create a scene...scene is a default property of sceneview
// and thus will get added to the sceneview
Scene {
// add a basemap
Basemap {
initStyle: Enums.BasemapStyleArcGISImageryStandard
}
// add a surface...surface is a default property of scene
Surface {
// add an arcgis tiled elevation source...elevation source is a default property of surface
ArcGISTiledElevationSource {
url: "https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer"
}
}
}
GraphicsOverlay {
id: graphicsOverlay
SimpleRenderer {
RendererSceneProperties {
extrusionMode: Enums.ExtrusionModeBaseHeight
extrusionExpression: "[height]"
}
SimpleFillSymbol{
style: Enums.SimpleFillSymbolStyleSolid;
color: "red"
}
}
}
Component.onCompleted: {
// Set the focus on SceneView to initially enable keyboard navigation
forceActiveFocus();
// set viewpoint to the specified camera
setViewpointCameraAndWait(camera);
}
}
// create the camera to be used as the scene view's viewpoint
Camera {
id: camera
location: Point {
x: 83.9
y: 28.4
z: 10010.0
spatialReference: SpatialReference { wkid: 4326 }
}
heading: 10.0
pitch: 80.0
roll: 0.0
}
}
I am using Cloud make to create Android builds.
Thanks in advance!