Hello,
There seems to be a quirk when using the same LayerSceneProperties definition (variable) for multiple GraphicsOverlay.
If you define a single variable
let sceneProps = LayerSceneProperties(surfacePlacement: SurfacePlacement.relative)
and then configure all the GraphicsOverlay to use it
let o1 = GraphicsOverlay()
o1.sceneProperties = sceneProps
o1.addGraphics(g1)
let o2 = GraphicsOverlay()
o2.sceneProperties = sceneProps
o2.addGraphics(g2)
let o3 = GraphicsOverlay()
o3.sceneProperties = sceneProps
o3.addGraphics(g3)
it does not seem to apply it to the other layers, and you get the following result:

However, if you don't use a variable, and set it directly for each layer, it seems to work:
let o1 = GraphicsOverlay()
o1.sceneProperties = LayerSceneProperties(surfacePlacement: SurfacePlacement.relative)
o1.addGraphics(g1)
let o2 = GraphicsOverlay()
o2.sceneProperties = LayerSceneProperties(surfacePlacement: SurfacePlacement.relative)
o2.addGraphics(g2)
let o3 = GraphicsOverlay()
o3.sceneProperties = LayerSceneProperties(surfacePlacement: SurfacePlacement.relative)
o3.addGraphics(g3)
See image:

Full code to reproduce attached as .txt files.
(basically this)
private class Model: ObservableObject {
let scene = {
let x = ArcGIS.Scene(basemapStyle: .arcGISTopographic)
x.initialViewpoint = Viewpoint(
latitude: .nan,
longitude: .nan,
scale: .nan,
camera: Camera(
latitude: 33.997037,
longitude: -118.4970704,
altitude: 231,
heading: 357,
pitch: 80,
roll: 0
)
)
return x
}
let graphicsOverlays: [GraphicsOverlay] = {
let red = SimpleMarkerSceneSymbol(style: .sphere, color: .red, height: 50, width: 50, depth: 50, anchorPosition: .center)
let yellow = SimpleMarkerSceneSymbol(style: .sphere, color: .yellow, height: 50, width: 50, depth: 50, anchorPosition: .center)
let blue = SimpleMarkerSceneSymbol(style: .sphere, color: .blue, height: 50, width: 50, depth: 50, anchorPosition: .center)
let p1 = [
Point(x: -118.4978, y: 34.0086, z: 110, spatialReference: .wgs84),
Point(x: -118.4968, y: 34.0096, z: 140, spatialReference: .wgs84),
Point(x: -118.4958, y: 34.0106, z: 170, spatialReference: .wgs84),
]
let g1 = p1.map { p in
return Graphic(geometry: p, symbol: red)
}
let p2 = [
Point(x: -118.4977, y: 34.0056, z: 120, spatialReference: .wgs84),
Point(x: -118.4978, y: 34.0066, z: 180, spatialReference: .wgs84),
Point(x: -118.4979, y: 34.0076, z: 220, spatialReference: .wgs84),
]
let g2 = p2.map { p in
return Graphic(geometry: p, symbol: yellow)
}
let p3 = [
Point(x: -118.4957, y: 34.0056, z: 100, spatialReference: .wgs84),
Point(x: -118.4958, y: 34.0066, z: 150, spatialReference: .wgs84),
Point(x: -118.4959, y: 34.0076, z: 200, spatialReference: .wgs84),
]
let g3 = p3.map { p in
return Graphic(geometry: p, symbol: blue)
}
let o1 = GraphicsOverlay()
o1.sceneProperties = LayerSceneProperties(surfacePlacement: SurfacePlacement.relative)
o1.addGraphics(g1)
let o2 = GraphicsOverlay()
o2.sceneProperties = LayerSceneProperties(surfacePlacement: SurfacePlacement.relative)
o2.addGraphics(g2)
let o3 = GraphicsOverlay()
o3.sceneProperties = LayerSceneProperties(surfacePlacement: SurfacePlacement.relative)
o3.addGraphics(g3)
return [
o1,
o2,
o3,
]
}()
}
struct DisplaySceneView: View {
/// A scene with imagery basemap style and a tiled elevation source.
@StateObject private var model = Model()
var body: some View {
// Creates a scene view with the scene.
SceneView(scene: model.scene(), graphicsOverlays: model.graphicsOverlays)
}
}
This example is using arcgis-maps-sdk-swift 300.1, on iOS 26.5.
Not sure if this is intentional or not. Just leaving it here, if others can't figure out why the other layers do not respect `z` and place all the items at the bottom of z.