Select to view content in your preferred language

Overview Map Attributes

954
4
11-02-2011 03:44 PM
SowjanyaSunkara
Emerging Contributor
Is it possible to set any attribute of the Overview Map Window so that the extent rectangle that is dragged around is a hollow rectangle(no fill) with a thick border instead of a fill?

Thanks,
SS
0 Kudos
4 Replies
KellyHutchins
Esri Notable Contributor
The Overview Map constructor options allow you to specify the color of the fill rectangle. You can define a fill and border color to use for the extent rectangle. Setting the color works if you want to change the default color of the extent rectangle. However in your case it sounds like you want a border but not a fill color. If so you can accomplish this using css, her'es a style that sets the border to a dark green color and the fill to transparent:

 
 .esriOverviewMap .ovwHighlight {
         border: solid 2px #004F00 !important;
         background-color: transparent !important;
   }


Here's a working demo that shows the above style in action:
http://jsfiddle.net/tR4RE/
0 Kudos
SowjanyaSunkara
Emerging Contributor
Thanks Kelly. It worked.
Is there any documentation about other options available for the Overview Map ( and other widgets) so I can set the styles?
Thanks!
0 Kudos
KellyHutchins
Esri Notable Contributor
Many of the widgets document the css classes that are available in the API reference. For example here's a link to the Attribute Inspector widget API doc - note that it has a CSS section with some doc:

http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/attributeinspector.htm

The easiest way to see the styles associated with a widget is to use either Chrome Developer tools or Firebug to inspect the application at run time. You can use these tools to view the styles and stylesheets. Here's some inf on using Firebug's CSS tab:

http://getfirebug.com/css
0 Kudos
SowjanyaSunkara
Emerging Contributor
Thanks much for the info! Appreciate it.
0 Kudos