Skip to content

Commit bfa556b

Browse files
authored
Update Add scene layer with elevation service (#1785)
1 parent 0340456 commit bfa556b

7 files changed

Lines changed: 15 additions & 15 deletions

File tree

src/MAUI/Maui.Samples/Samples/Layers/AddSceneLayerWithElevation/AddSceneLayerWithElevation.xaml.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public partial class AddSceneLayerWithElevation : ContentPage
2626

2727
// URL for the scene layer.
2828
private readonly Uri _serviceUri = new Uri(
29-
"https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Portland/SceneServer");
29+
"https://www.arcgis.com/home/item.html?id=b8fec5af7dfe4866b1b8ac2d2800f282");
3030

3131
public AddSceneLayerWithElevation()
3232
{
@@ -54,11 +54,11 @@ private async Task Initialize()
5454
// Load the layer.
5555
await sceneLayer.LoadAsync();
5656

57-
// Get the center of the scene layer.
58-
MapPoint center = (MapPoint)sceneLayer.FullExtent.GetCenter().Project(SpatialReferences.Wgs84);
57+
// Create a center point in Portland, Oregon.
58+
MapPoint center = new MapPoint(-122.670, 45.517, 175.0, SpatialReferences.Wgs84);
5959

6060
// Create a camera with coordinates showing layer data.
61-
Camera camera = new Camera(center.Y, center.X, 225, 220, 80, 0);
61+
Camera camera = new Camera(center, 215, 75, 0);
6262

6363
// Assign the Scene to the SceneView.
6464
MySceneView.Scene = myScene;

src/MAUI/Maui.Samples/Samples/Layers/AddSceneLayerWithElevation/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Pan and zoom to explore the scene.
3030

3131
## About the data
3232

33-
This sample shows a [Portland, Oregon USA Scene](https://www.arcgis.com/home/item.html?id=2b721b9e7bef45e2b7ff78a398a33acc) hosted on ArcGIS Online.
33+
This sample shows data from [Esri 3D Buildings](https://www.arcgis.com/home/item.html?id=b8fec5af7dfe4866b1b8ac2d2800f282) in Portland, Oregon.
3434

3535
## Tags
3636

src/WPF/WPF.Viewer/Samples/Layers/AddSceneLayerWithElevation/AddSceneLayerWithElevation.xaml.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public partial class AddSceneLayerWithElevation
2929

3030
// URL for the scene layer.
3131
private readonly Uri _serviceUri = new Uri(
32-
"https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Portland/SceneServer");
32+
"https://www.arcgis.com/home/item.html?id=b8fec5af7dfe4866b1b8ac2d2800f282");
3333

3434
public AddSceneLayerWithElevation()
3535
{
@@ -57,11 +57,11 @@ private async Task Initialize()
5757
// Load the layer.
5858
await sceneLayer.LoadAsync();
5959

60-
// Get the center of the scene layer.
61-
MapPoint center = (MapPoint)GeometryEngine.Project(sceneLayer.FullExtent.GetCenter(), SpatialReferences.Wgs84);
60+
// Create a center point in Portland, Oregon.
61+
MapPoint center = new MapPoint(-122.670, 45.517, 175.0, SpatialReferences.Wgs84);
6262

6363
// Create a camera with coordinates showing layer data.
64-
Camera camera = new Camera(center.Y, center.X, 225, 220, 80, 0);
64+
Camera camera = new Camera(center, 215, 75, 0);
6565

6666
// Assign the Scene to the SceneView.
6767
MySceneView.Scene = myScene;

src/WPF/WPF.Viewer/Samples/Layers/AddSceneLayerWithElevation/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Pan and zoom to explore the scene.
3030

3131
## About the data
3232

33-
This sample shows a [Portland, Oregon USA Scene](https://www.arcgis.com/home/item.html?id=2b721b9e7bef45e2b7ff78a398a33acc) hosted on ArcGIS Online.
33+
This sample shows data from [Esri 3D Buildings](https://www.arcgis.com/home/item.html?id=b8fec5af7dfe4866b1b8ac2d2800f282) in Portland, Oregon.
3434

3535
## Tags
3636

56.8 KB
Loading

src/WinUI/ArcGIS.WinUI.Viewer/Samples/Layers/AddSceneLayerWithElevation/AddSceneLayerWithElevation.xaml.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ public partial class AddSceneLayerWithElevation
2828

2929
// URL for the scene layer.
3030
private readonly Uri _serviceUri = new Uri(
31-
"https://tiles.arcgis.com/tiles/P3ePLMYs2RVChkJx/arcgis/rest/services/Buildings_Portland/SceneServer");
31+
"https://www.arcgis.com/home/item.html?id=b8fec5af7dfe4866b1b8ac2d2800f282");
3232

3333
public AddSceneLayerWithElevation()
3434
{
@@ -56,11 +56,11 @@ private async Task Initialize()
5656
// Load the layer.
5757
await sceneLayer.LoadAsync();
5858

59-
// Get the center of the scene layer.
60-
MapPoint center = (MapPoint)sceneLayer.FullExtent.GetCenter().Project(SpatialReferences.Wgs84);
59+
// Create a center point in Portland, Oregon.
60+
MapPoint center = new MapPoint(-122.670, 45.517, 175.0, SpatialReferences.Wgs84);
6161

6262
// Create a camera with coordinates showing layer data.
63-
Camera camera = new Camera(center.Y, center.X, 225, 220, 80, 0);
63+
Camera camera = new Camera(center, 215, 75, 0);
6464

6565
// Assign the Scene to the SceneView.
6666
MySceneView.Scene = myScene;

src/WinUI/ArcGIS.WinUI.Viewer/Samples/Layers/AddSceneLayerWithElevation/readme.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ Pan and zoom to explore the scene.
3030

3131
## About the data
3232

33-
This sample shows a [Portland, Oregon USA Scene](https://www.arcgis.com/home/item.html?id=2b721b9e7bef45e2b7ff78a398a33acc) hosted on ArcGIS Online.
33+
This sample shows data from [Esri 3D Buildings](https://www.arcgis.com/home/item.html?id=b8fec5af7dfe4866b1b8ac2d2800f282) in Portland, Oregon.
3434

3535
## Tags
3636

0 commit comments

Comments
 (0)