My Location widget—ArcGIS Web AppBuilder | Documentation for ArcGIS Enterprise
Skip To Content

My Location widget

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

  1. Hover over the My Location widget and click the small show or hide button Show or hide widget to show or hide this widget in your application.

    By default, the widgets included with a theme are visible.

  2. Hover over the widget and click the Configure this widget button Configure this widget to open the configuration window.
    Note:

    If you need to add the widget to the app first, click a widget placeholder on the Widget tab. In the Choose Widget window that opens, select the widget and click OK.

  3. Check or uncheck the Highlight location check box.

    When this check box is checked, the location highlights on the map.

  4. Check or uncheck the Watch for location changes check box.
  5. 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.

  6. 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.

    Show location accuracy image

  7. Change the Timeout value if necessary.

    The default timeout value is 15,000 milliseconds.

  8. Optionally, change the Zoom scale.
  9. 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.

Find my 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.