Click or drag to resize

MapPointX Property

Gets the X coordinate.

Namespace:  Esri.ArcGISRuntime.Geometry
Assembly:  Esri.ArcGISRuntime (in Esri.ArcGISRuntime.dll) Version: 100.11.0
public double X { get; }

Property Value

Type: Double


Example Name: SceneLayerUrl

Display an ArcGIS scene layer from a URL.

Code example screen shot.

// Copyright 2017 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:
// 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.

using Esri.ArcGISRuntime.Geometry;
using Esri.ArcGISRuntime.Mapping;
using System;
using System.Windows;

namespace ArcGISRuntime.WPF.Samples.SceneLayerUrl
        name: "Scene layer (URL)",
        category: "Layers",
        description: "Display an ArcGIS scene layer from a URL.",
        instructions: "Pan and zoom to explore the scene.",
        tags: new[] { "3D", "Portland", "URL", "buildings", "model", "scene", "service" })]
    public partial class SceneLayerUrl
        // URL for a service to use as an elevation source.
        private readonly Uri _elevationSourceUrl = new Uri(

        // URL for the scene layer.
        private readonly Uri _serviceUri = new Uri(

        public SceneLayerUrl()

        private async void Initialize()
            // Create new Scene.
            Scene myScene = new Scene {Basemap = new Basemap(BasemapStyle.ArcGISImageryStandard)};

            // Create and add an elevation source for the Scene.
            ArcGISTiledElevationSource elevationSrc = new ArcGISTiledElevationSource(_elevationSourceUrl);

            // Create new scene layer from the URL.
            ArcGISSceneLayer sceneLayer = new ArcGISSceneLayer(_serviceUri);

            // Add created layer to the operational layers collection.

                // Load the layer.
                await sceneLayer.LoadAsync();

                // Get the center of the scene layer.
                MapPoint center = (MapPoint)GeometryEngine.Project(sceneLayer.FullExtent.GetCenter(), SpatialReferences.Wgs84);

                // Create a camera with coordinates showing layer data.
                Camera camera = new Camera(center.Y, center.X, 225, 220, 80, 0);

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

                // Set view point of scene view using camera.
                await MySceneView.SetViewpointCameraAsync(camera);
            catch (Exception e)
                MessageBox.Show(e.ToString(), "Error");
    d:DesignHeight="300" d:DesignWidth="300">
        <esri:SceneView x:Name="MySceneView">
See Also
Additional Examples
Hyperlink to ExampleDescription
ChooseCameraControllerControl the behavior of the camera in a scene.
EditAndSyncFeaturesSynchronize offline edits with a feature service.
FeatureLayerSelectionSelect features in a feature layer.
GetElevationAtPointGet the elevation for a given point on a surface in a scene.
LineOfSightGeoElementShow a line of sight between two moving objects.
LineOfSightLocationPerform a line of sight analysis between two points in real time.
ListKmlContentsList the contents of a KML file.
ProjectProject a point from one spatial reference to another.
ProjectWithSpecificTransformationProject a point from one coordinate system to another using a specific transformation step.
SceneLayerSelectionIdentify features in a scene to select.
SceneLayerUrlDisplay an ArcGIS scene layer from a URL.
ShowCalloutShow a callout with the latitude and longitude of user-tapped points.
ViewshedLocationPerform a viewshed analysis from a defined vantage point.