Geolocation locates the user on the map. The HTML5 Viewer supports the following geolocation options:
Find Me: Pans the map to the user's location and marks the location with an indicator.
Track Me: Tracks the user's location with an indicator, without panning the map.
Follow Me: Follows the user's location with an indicator and pans the map as the user's location changes.
Geolocation menu (), location indicator (
), accuracy circle (
), and geolocation coordinates (
)
It is not possible to use the Geolocate tool at the same time as another tool because geolocation may interfere with any tool that collects information from the user. For example, the map could move while the user is drawing a shape, leading to undesirable results.
Web browsers return geolocation results in WGS 84. If your map is not in Web Mercator or WGS 84, you must configure an ArcGIS geometry service so the geolocation map widget can project from latitude/longitude to the map's coordinates. For instructions on configuring a geometry service, see Geometry Services.
Each web browser handles geolocation differently. For example, as of Chrome 50.0, your site needs to be secured with HTTPS in order to use the Geolocation API. If you or your users intend to use geolocation, ensure that your preferred web browser uses geolocation and that it is compatible with your site. Here are two common scenarios where geolocation is not available to users:
Chrome 50+: Your site needs to be secured with HTTPS in order to use the Geolocation API.
Internet Explorer Enterprise Mode: Internet Explorer Enterprise Mode may emulate Internet Explorer 8, which does not support geolocation.
It is common for devices to ask permission before websites can use geolocation. If geolocation is not working, ensure that the viewer has been given sufficient geolocation privileges. Also ensure that the devices location services are enabled.
In order for an HTML5 viewer to perform geolocation operations, the user's device must have a built-in GPS (Global Positioning System), a Wi-Fi connection, or a wired connection. GPS provides the most accurate geolocation results. Wi-Fi is less accurate than GPS, and geolocation using a wired connection is less accurate than Wi-Fi.
Some devices use a mix of GPS and Wi-Fi to obtain a location. This can result in unpredictable readings. Accuracy is improved by setting the device to GPS-only mode, however, this drains the battery more quickly in some devices.
Geolocation is configured on the viewer's Geolocation page in Manager. You can configure additional geolocation settings in the Geolocate Module in the viewer's configuration files.
To open an HTML5 viewer's Geolocation page in Manager:
In beside the viewer.
In the side panel, click Geolocation.
The Geolocation page opens.
By default, the Geolocation page is set to configure the Desktop, Tablet, and Handheld interfaces separately. For more information, see Configure Multiple User Interfaces.
The Geolocation page has the following settings:
Geolocation:
Enable Single-Reading Geolocation: Select this checkbox if you want to make single-reading geolocation (Find Me) available in the Geolocation Options menu. The Find Me feature pans the map to the user's current location and marks the location with an indicator.
By default, this setting is enabled for the Tablet and Handheld interfaces, and disabled for the Desktop interface.
Enable Geolocation Tracking: Select this checkbox if you want to make tracking (Track Me) available in the Geolocation Options menu. The Track me feature tracks the user's location with an indicator, without panning the map.
By default, this setting is enabled for the Tablet and Handheld interfaces, and disabled for the Desktop interface.
Enable Geolocation Following: Select this checkbox if you want to make following (Follow Me) available in the Geolocation Options menu. The Follow Me feature follows the user's location with an indicator and pans the map as the user's location changes.
By default, this setting is enabled for the Tablet and Handheld interfaces, and disabled for the Desktop interface.
Display Geolocation Accuracy Circle: Select this checkbox if you want to display the geolocation accuracy circle. It is selected by default. When the checkbox is selected, the indicator for the user's position includes a surrounding circle that indicates the margin of error of the user's position. The user's actual position should lie somewhere within this circle.
Geolocation Indicator Image: The URL to the image that represents the geolocation indicator. Type the URL in the text box. Alternatively, click Browse to use an image on the server; if necessary, upload an image to the server by clicking Upload and selecting an image file to upload. The default is an image of a blue dot located at Resources/Images/Icons/geolocate-position-32.png
.
Zoom Upon Geolocation: Select this checkbox if you want to zoom to the user's location upon single-reading geolocation (Find Me) or following (Follow Me). The checkbox is selected by default.
Zoom Value: The scale to which to zoom when Zoom Upon Geolocation is selected. The default is 50000 (to 1).
Geolocation Coordinates:
Display Coordinates for Single-Reading Geolocation: Select this checkbox to display the coordinates of the user's location, in addition to showing the geolocation indicator, when the user performs a Find Me operation.
If you do not want to show the coordinates for Find Me operations, clear the checkbox.
Display Coordinates for Geolocation Tracking: Select this checkbox to display the coordinates of the user's location, in addition to showing the geolocation indicator, when the user performs a Track Me operation.
If you do not want to show the coordinates for Track Me operations, clear the checkbox.
Display Coordinates for Geolocation Following: Select this checkbox to display the coordinates of the user's location, in addition to showing the geolocation indicator, when the user performs a Follow Me operation.
If you do not want to show the coordinates for Follow Me operations, clear the checkbox.
Coordinate Format: Select the units to use for displaying the coordinates. The options are:
DDM: Degrees, Decimal Minutes
DMS: Degrees, Minutes, Seconds
Lat/Long: Latitude, Longitude
X/Y: X, Y (in the units of the coordinate system)
MGRS: Military Grid Reference System, if configured
USNG: United States National Grid, if configured
By default, X/Y coordinates are shown in the map's spatial reference. To change the spatial reference that is used for the coordinates, use the WKID setting to specify the well-known ID of the coordinate system that you want to use.
MGRS and USNG are not supported in offline mode.
Coordinate Decimal Precision: The number of decimal digits to show in the coordinates.
This precision setting cannot exceed the maximum representable IEEE 754 floating point. This is specified in the IEEE 754 standard. See double-precision floating-point format and significant figures for more information.
See also...