The My Location widget allows the network to detect your physical location and zoom the map to it. The location can be highlighted if necessary.
The widget takes advantage of HTML geolocation. When the app runs on desktops, it uses the browser on the network to detect the location. When the app runs on mobile devices, by default, it uses GPS on the device to determine your location. However, compared to the native apps, the accuracy of the location in the browser-based app varies based on the type of browser and device. This is a known limitation.
Caution:
There are security considerations to consider when working with geolocation. The My Location widget is only supported on secure web pages (HTTPS). All your content must be served via HTTPS, and you cannot mix HTTPS with non-HTTPS content. See Locate button for details.
Configure the My Location widget
- Hover over the My Location widget and click the small show or hide button to show or hide this widget in your application.
By default, the widgets included with a theme are visible.
- Hover over the widget and click the Configure this widget button to open the configuration properties dialog box.
- Check or uncheck the Highlight location check box.
When this check box is checked, the location highlights on the map.
- Check or uncheck the Watch for location changes check box.
- Check or uncheck the Show compass orientation check box.
When this check box is checked, a circular sector pointing to the direction that a mobile user is facing highlights on the map. The sector area represents the accuracy of the compass.
- Check or uncheck the Show location accuracy check box.
When this check box is checked, a light blue circle showing the location accuracy highlights on the map.
- Change the Timeout value if necessary.
The default timeout value is 15,000 milliseconds.
- Optionally, change the Zoom scale.
- Click OK to close this window.
Note:
You can opt to show compass orientation or location accuracy only when both highlight location and watch for location changes options are checked.
Use the My Location widget
When the application starts, the My Location widget is automatically enabled to access your physical location. Clicking Find my location zooms the map to your current location.
Tip:
You may get an error message after clicking Find my location. The error is often caused by the browser's security. Configure your browser's pop-up settings to allow sharing of your location. Click Yes to find your location.
Tip:
Make sure the system location settings and browser settings are set correctly for compass orientation or location accuracy (for example, Motion & Orientation Access in Safari browser settings for iOS devices).
Note:
Compass orientation is only available in certain map projections with WKID of 4326, 3857, 102113, and 102100. In addition, it is only available on mobile devices, while you can use location accuracy indicators also in desktops.