OverviewMap dijit

1172
7
06-02-2010 12:47 PM
JohnCartwright
Occasional Contributor
Hello All,

The new OverviewMap dijit is very nice!  A couple of questions about it's use:

1) how can one turn off the ESRI logo in the lower right?  I've turned off the logo in the esri.Map instance which is used the OverviewMap constructor but the logo still shows in the overview map dijit (but not in the main map window).

2) I'm trying to use the OverviewMap w/in an AccordianPane and it doesn't seem to be respecting the width, height parameters that I'm passing in the constructor, e.g.

overviewMapDijit = new esri.dijit.OverviewMap({map: map, width:250, height:250}, dojo.byId('overviewMapDiv'));
overviewMapDijit.startup();

...
   <div id="panel2" dojoType="dijit.layout.AccordionPane" title="Overview Map">
      <div id="overviewMapDiv"></div>
   </div>

Can someone please help me here?

Thanks!

--john
0 Kudos
7 Replies
derekswingley1
Frequent Contributor
For #1: 
 map = new esri.Map("map", {
   extent: initExtent,
  logo:false
 });


http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/map.htm#MapConst
0 Kudos
KellyHutchins
Esri Frequent Contributor
What behavior are you seeing with the width and height. I created a quick test that uses the accordion container and the width/height of the overview map worked. I've attached a zip file containing my test page.
0 Kudos
JohnCartwright
Occasional Contributor
Thanks Derek.  That's what I had used to turn off the logo on the main map, but the logo is still appearing on the overview map.

--john


For #1: 
 map = new esri.Map("map", {
   extent: initExtent,
  logo:false
 });


http://help.arcgis.com/en/webapi/javascript/arcgis/help/jsapi_start.htm#jsapi/map.htm#MapConst
0 Kudos
JohnCartwright
Occasional Contributor
What behavior are you seeing with the width and height. I created a quick test that uses the accordion container and the width/height of the overview map worked. I've attached a zip file containing my test page.


Thanks for your reply Kelly and for the example.  My issue is that the overview map is larger than my accordionpane and seems to be ignoring the width and height parameters I'm providing. Notice in the attached screenshot the scrollbars required to show the entire contents of the accordionpane.  Also, you'll see the logo on the overview map when is doesn't appear on the main map.

Looking over your example, I'm afraid I still don't see what I'm missing.  Is there some crucial style required to make overviewmap behave?

--john
0 Kudos
KellyHutchins
Esri Frequent Contributor
John,

I forgot to mention in my post yesterday that I submitted a bug for the issue with the overview map logo. As far as the sizing issue, have you tried setting the width and height on the div itself?
   <div id="ovMap" style="width:100%;height:100%;"></div>
If you are using Firefox, it might also be helpful to inspect the overview map using the 'Click an element in the page to inspect' tool. Then view the CSS for this element to see if any of the properties you've set are being overridden. I sometimes find it helpful to use the Layout tab (click the HTML tab first). This tab shows the width, height, border, padding and margin of the selected element. You can use the layout to modify the properties and immediately see the effect the new sizes have. Here's some info on using Layout:
http://getfirebug.com/layout

Kelly
0 Kudos
RichardDaniels
Occasional Contributor III
FYI - In the JavaScript API use


function init() {
        //set map extent
  var startExtent = new esri.geometry.Extent({"xmin":582544,"ymin":81879,"xmax":2550244,"ymax":1355630,"spatialReference":{"wkid":2286}});

        //create map
        var map = new esri.Map("mapDiv",{logo:false});
        map.setExtent(startExtent);

...
}
0 Kudos
AdrianMarsden
Occasional Contributor III
Did the lack of respect for width/height in accordianpanels get sorted?  As I recently raised the same/Similar issue

http://forums.arcgis.com/threads/65694-Overview-map-in-AccordianContainers?highlight=OverviewMap

C
heers

ACM
0 Kudos