The Coordinate widget displays x,y coordinate, elevation, and camera altitude values in your 3D app. With the default coordinate system of the web scene, these values change dynamically when the pointer moves on the scene. Multiple spatial references can be configured, and the coordinate values display based on the spatial reference you choose.
Configure the Coordinate widget
By default, the Coordinate widget displays coordinates in the WGS_1984_Web_Mercator_Auxiliary_Sphere (WKID 3857) projection. To display coordinates in other projections or datums, add spatial references during the configuration.
- Hover over the Coordinate widget and click the small show or hide button to show or hide this widget in your app.
- Hover over the widget and click the Configure this widget button to open the configuration properties dialog box.
- Optionally click Add Output Coordinates System to display other projections.
- Provide a valid WKID in the Output Coordinate System WKID box, choose a display unit, and provide a valid WKID in the Datum Transformation WKID box if the datum of the output coordinate system is different from the default.
- Set the elevation and eye altitude in metric or English units.
- Click OK.
The spatial reference you just defined is added to the list. Repeat steps 1 through 5 to add other spatial references if necessary.
- Optionally click the edit button under Actions to edit the coordinate system.
- Choose the decimal places to which to round the coordinates.
- Choose the decimal places to which to round the eye altitude.
- Uncheck the box if you don't want to show the thousand separators.
- Click OK.
The widget setting window closes.
Use the Coordinate widget
When the app starts, it displays the coordinate system at the top of the Output Coordinate System Name list. For the default coordinate system of the web scene, the coordinates, elevation, and camera altitude values will change automatically when you move the pointer on the scene.
Click the coordinate system button to enable clicking the scene to get coordinates and elevation. In this way, you can add a point to the scene, highlight all the values, and make a copy of them.
Click the arrow on the widget to display a list of spatial references specified in the configuration. When you choose one from the list, it becomes active.
For most spatial references, except WKID 3857 and 4326, you have to click the coordinate system button again to display the coordinates and elevation by adding a point on the map. You can also highlight all the values and make a copy of them.