[OpenLayers-Users] Overview Map position in IE

Donal donal_regan10 at YAHOO.CO.UK
Wed Jan 10 02:44:41 EST 2007


Hello,

Has anyone else had this problem?

I am adding an overview map as follows 

var ov_wms = new OpenLayers.Layer.WMS( "Overview Map", 
                overview_url,
                 {layers: 'AreaBorder'} );
	var options = {
		layers: [ ov_wms]
	};
	var overview = new OpenLayers.Control.OverviewMap(options);
	myMap.addControl(overview);

and have the following css :

/*Overview Map*/
.olControlOverviewMapContainer {
    position: absolute;
    bottom: 0px;
    right: 0px;
}

.olControlOverviewMapElement {
    padding: 10px 18px 10px 10px;
    background-color: #00008B;
    -moz-border-radius: 1em 0 0 0;
}

.olControlOverviewMapMinimizeButton {
    right: 0px;
    bottom: 80px;
}    

.olControlOverviewMapMaximizeButton {
    right: 0px;
    bottom: 80px;
}

.olControlOverviewMapExtentRectangle {
    border: 2px dotted red;
}
/*end Overview Map*/

The overview map appears (minimized) as desired in the lower right corner of
my viewport in Firefox. 
In IE, however, the overview map was being positioned  in the top left
corner of my viewport without any buttons and maximized.

I fixed this by adding  a check for 

(this.div.parentNode.nodeType == 11)

 to the 
if(!this.div.parentNode  ||   (this.div.parentNode.className ==
'olMapViewport')) 

 line in the OverviewMap.js draw method.


Hope this is useful,

Donal

-- 
View this message in context: http://www.nabble.com/Overview-Map-position-in-IE-tf2951042.html#a8253311
Sent from the OpenLayers Users mailing list archive at Nabble.com.




More information about the Users mailing list