Using Map Widgets

Reference:

When you generate a map, a set of map widgets is generated that let you interact with the map output. The following table describes each widget.

Widget Name

Image

Description

Default Extent

Toggles between the default extent (entire layer) and the extent that includes the majority of points for the layer.

Table of Contents

Opens a list of layers, their properties, and an icon for opening a set of layer tools. The tools differ depending on the type of layer. In the layer list, this widget toggles between showing the list and hiding the list.

Selection Tools

Provides selection tools and options based on the layer type.

Change Base Map

Opens thumbnails of the available map base layers and lets you select a new one, as shown in the following image.

Find my location (Geolocation widget)

Zooms the map to your current location.

Note: The Geolocation widget is removed by the Esri API if this feature is not supported by the browser or is not used in a secure (https) environment. For example, Chrome 50 or higher no longer supports obtaining the location using the HTML5 Geolocation API from pages delivered by non-secure connections. The widget also does not work in the run-time Esri Viewer with Safari browsers on mobile devices.

Zoom in

Increases the zoom level.

Zoom out

Decreases the zoom level.

Close

Closes the widget.

Reference: Layer Tools and Options

The following shows the options for a polygon layer in the table of contents:



The following shows the options for a point layer in the table of contents:



The visible icons when you first open this widget are:

  • A polygon or point, which identifies this layer as a layer with polygon or point geometry.
  • A check box for showing or hiding the layer on the map.
  • The layer name.
  • The Show Tools icon. Clicking this icon toggles the tools widgets on and off.

The following image shows the table of contents widget with the tools widgets toggled on:



Option Name

Image

Description

Show tools

Toggles the layer tools widgets on and off.

Toggle layer legend

Toggles the layer legend on and off. The layer legend shows the fields, markers, colors, and sizes represented on the map layer. For example:



Toggle options

Shows or hides the layer visualization options.

Zoom to layer extent

Zooms to the extent configured for the layer.

The following layer options are available.

Option Name

Image

Description

Opacity slider

Enables you to adjust the layer transparency.

Cluster (points only)

Click the button to invoke clustering (markers are combined into cluster markers, depending on the range of points they represent and the zoom).

A green button on the right shows that this option is selected, and an icon displays on the layer table of contents.

Heat layer (points only)

Click the button to draw a heat map depicting the concentration of points. The areas of highest concentration will be red, the next highest will be yellow.

A green button on the right shows that this option is selected.

The following image shows cluster markers. The points are categorized into ranges and the cluster markers are colored according to the range of points they represent.

The following image shows a heat layer.

Reference: Selection Tools and Options

The selection widget has a drop-down list for selecting the layer on which to make a selection.

The following image shows the selection tools for a polygon layer.



The following image shows the selection tools for a point layer.



The following selection tools and options are available.

Option Name

Image

Description

Zoom to layer extent

Zooms to the extent configured for the layer.

Select features within an extent

Selects map points or locations included in a rectangle. To draw a rectangle, drag from the starting position to the ending position on the map and release the mouse pointer.

Select features within a polygon

Selects map points or locations included in a polygon. To draw a polygon, click each position on the map where you want a vertex. Double-click to complete the polygon at the last vertex you want to add.

Select features within a distance (point geography only)

When this option is selected, a distance text box opens. You can select miles or kilometers from a drop-down list, and enter a distance. For information, see Creating an Esri Component on an HTML Page.

When you double-click a point, the map zooms to show the points at that distance around the selected point.

Note: There is no validation of the characters you enter in the text box. Make sure you enter valid numbers.

Select features intersecting a line (polygon geography only)

Selects polygons that intersect a line. To draw a line, click at the starting position, and double-click at the ending position.

Select features to delete

Deletes previously selected points or locations within a rectangle that you draw over selected points or locations.

Pan

Switches from making selections to panning when you click and drag on the map layer.

Clear selection

Clears all selections.

Note: If making selections triggers a report to run, you can specify whether the report should be rerun when the selections are cleared. For details, see Creating an Esri Component on an HTML Page.

Zoom to Selection

Identifies the number of points or locations selected. If you click this button, the map zooms in to the selection.

Reference: Changing Default Distance Settings From Miles to Kilometers

In the Esri Viewer Selection widget, you can select features within a distance of a point you select on the map, as shown in the following image.

Although you can select either the miles or kilometers distance unit from the drop-down list in the widget, the default unit in which the distance is shown is determined by your browser locale settings. For example, if your browser language is United States English, the distance will be shown as miles, but if your language is Australian English or United Kingdom English, the distance will be shown as kilometers.

For information about configuring locale settings in your browser, see the help content for your browser.