View Original: ArcGIS for JavaScript API Overview map--Eagle Eye/Overview Map
Describe:
This example shows how to add a terrain bottom layer to your application and use the Overviewmap Dijit to display the overview in the upper-right corner of the main map. The Dijit of the overview is initially published in ESRI's code base as a sample and added to the 2.0 version of the Arcgisjavascript API. To add an overview map to your application, the following code adds the OnLoad event to the map:
var overviewmapdijit=new esri.dijit.OverviewMap ({map:map});
Overviewmapdijit.startup ();
The code above adds the default location in the general map (upper-right corner). You can modify this using the Attachto parameter. Using this parameter, you can specify that the overview will be appended to one of the following locations: Bottom-right,bottom-left, top-right or Top-left
Online Demo: http://help.arcgis.com/en/webapi/javascript/arcgis/samples/widget_overviewmap/index.html
Reference reference: http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/widget_overviewmap
The code is as follows:
<! DOCTYPE html>
The effect chart is as follows:
If you need to place the Eagle's eye map outside the map, you can use the layout, and then use the following methods to
var overviewmapdijit=new esri.dijit.OverviewMap ({map:map}, Dojo.byid (' Overviewmapdiv ');
Overviewmapdijit.startup ();
Reference join: http://help.arcgis.com/en/webapi/javascript/arcgis/jssamples/#sample/widget_overviewmapexternal
Online Demo: http://help.arcgis.com/en/webapi/javascript/arcgis/samples/widget_overviewmapexternal/index.html