The Coordinates widget displays coordinate values for 2D web maps and 3D web scenes. You can configure the widget with a variety of output coordinate systems and transformations. When connected to a 3D web scene, the widget also displays elevation and camera altitude values if available. Users can get coordinates based on the pointer's location or by adding points.
Use this widget to support app design requirements such as the following:
- You want to allow users to click a location on a map and get coordinates.
- You want to continuously show coordinates based on where users hover over.
- You want to provide a way for users to copy output coordinates.
This widget requires connection to a Map widget. To display elevation and altitude values, the Map widget must be connected to a 3D data source, either a global or local web scene.
When you include this widget in an app, the widget provides users with the following tools:
- Enable clicking the map to get the coordinates—Enable clicking the map to place a point and get coordinates.
- Copy—Copy the currently displayed coordinates.
- Select the output coordinate system—Choose an output coordinate system.
The Coordinates widget includes the following settings:
Select a Map widget—Select a Map widget.
Style—Choose a layout for the widget, either Classic or Modern.
Output coordinate system—Add, configure, or remove output coordinate systems. Coordinate systems added here appear in the Select the output coordinate system drop-down menu at runtime.
Output coordinate system well-known ID—Specify an output coordinate system by entering its well-known ID (WKID).
Display units—Choose a display unit for the latitude and longitude values. The default unit and the number of units available in the drop-down menu depend on the coordinate system.
Elevation unit (3D)—Choose a unit system (either metric or imperial) for ground elevation and eye altitude if available.
Datum transformation (Available when the configured output geographic coordinate system is different from the one used by the data source)—Provide a valid datum transformation. A geographic datum transformation is a calculation used to convert between two geographic coordinate systems to ensure that data is properly aligned. Projected coordinate systems always include an underlying geographic coordinate system.
Display options—Set the display options.
- Number of decimal places for coordinates—Choose the number of decimal places (between 0 and 10) for the longitude and latitude values.
- Number of decimal places for altitude (3D)—Choose the number of decimal places (between 0 and 10) for the altitude value.
- Show thousand separators—Choose to include thousand separators for values greater than or equal to 1,000.
- Display order—List the longitude value or latitude value first in the coordinate set.
Coordinate system and transformation PDFs
Each coordinate system and transformation is defined by both a well-known ID and well-known textual definition (WKT1 and WKT2). For a complete list of IDs and their corresponding definition strings, see Using spatial references.