View on GitHub

Add a layer to visualize 3D tiles data that conforms to the OGC 3D Tiles specification.

Add 3D Tiles Layer

Use case

One possible use case is that, when added to a scene, a 3D tiles layer can assist in performing visual analysis, such as an exploratory line of sight analysis. An exploratory line of sight analysis can be used to assess whether a view is obstructed between an observer and a target.

How to use the sample

When loaded, the sample will display a scene with an Ogc3DTilesLayer. Pan around and zoom in to observe the scene of the Ogc3DTilesLayer. Notice how the layer’s level of detail changes as you zoom in and out from the layer.

How it works

  1. Create a scene.
  2. Create an Ogc3DTilesLayer with the URL to a 3D tiles layer service.
  3. Add the layer to the scene’s operational layers.

Relevant API

  • ArcGISSceneView
  • Ogc3DTilesLayer

About the data

A layer to visualize 3D tiles data that conforms to the OGC 3D Tiles specification. As of 200.4, it supports analyses like exploratory viewshed and exploratory line of sight, but does not support other operations like individual feature identification.

The 3D Tiles Open Geospatial Consortium (OGC) specification defines a spatial data structure and a set of tile formats designed for streaming and rendering 3D geospatial content. A 3D Tiles data set, known as a tileset, defines one or more tile formats organized into a hierarchical spatial data structure. For more information, see the OGC 3D Tiles specification.

Tags

3d tiles, layers, OGC, OGC API, scene, service

Sample code

add_3d_tiles_layer.dart
// Copyright 2026 Esri
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
import 'package:arcgis_maps/arcgis_maps.dart';
import 'package:arcgis_maps_sdk_flutter_samples/common/common.dart';
import 'package:flutter/material.dart';
class Add3dTilesLayer extends StatefulWidget {
const Add3dTilesLayer({super.key});
@override
State<Add3dTilesLayer> createState() => _Add3dTilesLayerState();
}
class _Add3dTilesLayerState extends State<Add3dTilesLayer>
with SampleStateSupport {
// Create a controller for the scene view.
final _sceneViewController = ArcGISSceneView.createController();
@override
Widget build(BuildContext context) {
return Scaffold(
// Add a scene view to the widget tree and set the controller.
body: ArcGISSceneView(
controllerProvider: () => _sceneViewController,
onSceneViewReady: onSceneViewReady,
),
);
}
void onSceneViewReady() {
// Add the scene to the view controller.
_sceneViewController.arcGISScene = _setupScene();
}
ArcGISScene _setupScene() {
// Create a Scene with the ArcGIS DarkGray basemap style.
final scene = ArcGISScene.withBasemapStyle(BasemapStyle.arcGISDarkGray);
// Set the scene's initial viewpoint.
scene.initialViewpoint = Viewpoint.withPointScaleCamera(
center: ArcGISPoint(x: 0, y: 0),
scale: 1,
camera: Camera.withLatLong(
latitude: 48.84553,
longitude: 9.16275,
altitude: 350,
heading: 0,
pitch: 75,
roll: 0,
),
);
// Add surface elevation to the scene.
final elevationSource = ArcGISTiledElevationSource.withUri(
Uri.parse(
'https://elevation3d.arcgis.com/arcgis/rest/services/WorldElevation3D/Terrain3D/ImageServer',
),
);
scene.baseSurface.elevationSources.add(elevationSource);
// Add 3D tiles to the scene.
final stuttgart3DtilesLayer = Ogc3DTilesLayer.withUri(
Uri.parse(
'https://tiles.arcgis.com/tiles/ZQgQTuoyBrtmoGdP/arcgis/rest/services/Stuttgart/3DTilesServer/tileset.json',
),
);
scene.operationalLayers.add(stuttgart3DtilesLayer);
return scene;
}
}