[OpenLayers-Users] olControlPanPanel not responding to a bottom property

bmahf bmahf at hotmail.com
Fri Apr 5 04:33:13 PDT 2013


So I found the problem.  First I wasn't setting top to auto.  Since it was set in the style.css file to 10px, and when I changed it in the style.css file it to auto the bottom worked.  But then my css file wasn't working.  I found an OpenLayers example for Pan and Zoom, and eventually found that the difference between what I was doing and what they were doing was that I hadn't loaded the style.css file explicitly at the beginning of the page.  So it seems that the OpenLayers Map, when it is created, causes the style.css file to be read late, after my css was read, and so it overrode my override.  When I did an early load (beginning of the page) it worked perfectly.
Seems that the attribution control, created when I create a map Layer, must read the current CSS, since the map hasn't yet been created on the page, and so it never needed for me to do the early load.  If I remove the early load, it still takes the changes made from my css file.  But removing the early load causes the Pan and Zoom controls to no longer respond to my changes, so I assume this means that the Map object is reading the styling after the late load of the style.css file, which at that point has already overridden my css.
Go figure...

Date: Thu, 4 Apr 2013 01:38:55 -0700
From: ml-node+s1560n5044499h48 at n6.nabble.com
To: bmahf at hotmail.com
Subject: Re: olControlPanPanel not responding to a bottom property



	






Im my application it gives me this class on the zoom controller: 






<div id="OpenLayers.Control.PanZoomBar_4" style="position: absolute; left: 4px; bottom: 0px; z-index: 1003;" class="olControlPanZoomBar olControlNoSelect" unselectable="on">






So the name could be wrong? And also, i don't know why as i haven't investigated on the issue. But there seems to be some sort of hidden area below the map. So i had to set the bottom offset to something like 200px before it appeared on the map.





Med vennlig hilsen / Kind regards,
 
Christer Nordbø




On 03.04.13 18:17, "bmahf" <[hidden email]> wrote:




I am trying to move my PanPanel and ZoomPanel controls from top left to
bottom left.  I tried adding my own css as follows:



.olControlPanPanel
{
    bottom: 0px!important;
}



.olControlZoomPanel
{
    bottom: 0px!important;
}



But nothing changed.  Turns out I'm facing two issues:



1) Changes in my own css file don't seem to have an effect on either of
them.
2) If I, just for testing purposes, make the same change in styles.css, I
see the difference.   The only problem is, the bottom property still does
not have the desired effect.  It seems only to reposition the pan panel to
the bottom of the zoom panel, rather than the window, and the zoom panel
doesn't move at all.



I'm not sure what's up why my css file doesn't at least show these same
results.  And I am trying to figure out why the bottom option doesn't work
when it works well with say olControlAttribution.



Ideas would help.









--
View this message in context: 
http://osgeo-org.1560.n6.nabble.com/olControlPanPanel-not-responding-to-a-bottom-property-tp5044353.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/openlayers-users










_______________________________________________

Users mailing list

[hidden email]

http://lists.osgeo.org/mailman/listinfo/openlayers-users


	
	
	
	

	

	
	
		If you reply to this email, your message will be added to the discussion below:
		http://osgeo-org.1560.n6.nabble.com/olControlPanPanel-not-responding-to-a-bottom-property-tp5044353p5044499.html
	
	
		
		To unsubscribe from olControlPanPanel not responding to a bottom property, click here.

		NAML
	 		 	   		  



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/olControlPanPanel-not-responding-to-a-bottom-property-tp5044353p5044788.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/openlayers-users/attachments/20130405/e7062b89/attachment-0001.html>


More information about the Users mailing list