Description
Class added v2.0.dojo.require("esri.dijit.OverviewMap");The OverviewMap widget displays the current extent of the map within the context of a larger area. The OverviewMap updates whenever the map map extent changes. The extent of the main map is represented in the overview map area as a rectangle. The extent rectangle can be dragged to modify the extent of the main map. The OverviewMap can be displayed several ways:
- Attach the overview map to a corner of the main map and hide when not in use.
- Render the overview map in a div element outside the main map window.
- Temporarily maximize the overview map for quick access to far away areas of interest.
Samples
Search for
samples that use this class.
Class hierarchy
esri.dijit.OverviewMap
Constructor
Methods
| destroy() |
none
|
Releases the resources used by the dijit. Call this method when an instance of this dijit is no longer needed. |
| startup() |
none
|
Finalizes the creation of the OverviewMap dijit. Call this method after the constructor for the dijit is called and before users interact with the dijit. |
Constructor Detail
esri.dijit.OverviewMap(params, srcNodeRef)
Creates a new OverviewMap object.
Parameters:
|
<Object>
params |
Required |
Parameters that define the functionality of the OverviewMap widget. See the parameters information for details.
|
|
<Object>
srcNodeRef |
Required |
HTML element where the widget should be rendered.
|
Options:
|
<String>
attachTo |
Specifies which corner of the map to attach the OverviewMap dijit. Valid values are: "top-right","bottom-right","bottom-left" and "top-left". The default value is "top-right".
|
|
<Layer>
baseLayer |
Specify the base layer for the overview map. Note that the specified layer must be loaded, verify this using the layer's loaded property. If a base layer is not specified the dijit will use a copy of the main map's base layer. Valid layers are ArcGISDynamicMapServiceLayer,ArcGISTiledMapServiceLayer, OpenStreetMapLayer and VETiledLayer.
|
|
<String>
color |
Fill color for the extent rectangle. The default value is #000000.
|
|
<Number>
expandFactor |
The ratio between the size of the overview map and the extent rectangle displayed on the overview map. The default value is 2, meaning the overview map will be at least twice the size of the extent rectangle.
|
|
<Number>
height |
Height of the overview map dijit in screen pixels. The default value is 1/4th the height of the map, unless the HTML element referred to by srcNodeRef has a valid size.
|
|
<String>
id |
Unique identifier for the dijit. If specified this can be used with dijit.byId to get a reference to the dijit, or with dojo.byId to get a reference to the DOM node associated with the dijit.
|
|
<Map>
map |
Reference to the map. The map parameter is required.
|
|
<Boolean>
maximizeButton |
Defines the visibility of the maximize/restore button. When true, the button is visible. The default value is false.
|
|
<Number>
opacity |
Opacity of the extent rectangle, defined as a number between 0 (invisible) and 1 (opaque). The default value is 0.5.
|
|
<Boolean>
visible |
Specifies the initial visibility of the overview map. The default value is false.
|
|
<Number>
width |
Width of the overview map dijit in screen pixels. The default value is 1/4th the width of the map, unless the HTML element referred to by srcNodeRef has a valid size.
|
Code snippets:
Default configuration of the OverviewMap dijit.
var overviewMapDijit = new esri.dijit.OverviewMap({
map:map
});
Define additional input paramters.
var overviewMapDijit = new esri.dijit.OverviewMap({
map:map,
attachTo:"bottom-right",
color:"#D84E13",
opacity:.40
});
Render the OverviewMap dijit outside the main map.
globals.overviewMapDijit = new esri.dijit.OverviewMap({
map:map
},dojo.byId('overviewMapDiv'));
Methods Detail
Releases the resources used by the dijit. Call this method when an instance of this dijit is no longer needed.
Return value: none
Finalizes the creation of the OverviewMap dijit. Call this method after the constructor for the dijit is called and before users interact with the dijit.
Return value: none
Code snippets:
var overviewMapDijit = new esri.dijit.OverviewMap({
map:map
});
overviewMapDijit.startup();