[OpenLayers-Users] CSS (attempted) restyling . . .Ouch!!

Sergeant_york electronicpanda at gmail.com
Fri Nov 16 11:34:00 PST 2012


Hello there,

May I suggest you to completely hide the layer switcher and make your own?
There are several reasons for this suggestion:

*1- Layer switcher has so little functionality so easy to implement new one
for yourself:* All it does is to use .setBaseMap and .setVisibility
functions. You can get layers from map.layers and divide em into base and
overlay maps, otherwise going into its css spends -at least for me it was
like that- much more time than creating a new one
*2- Layer switcher has so little functionality so better to implement one
with more functionality: *Overlays and base maps also has "opacity" property
which is so useful for civil engineers and other users. All you have to do
is putting some sliders and binding the change opacity event to slider,
slider's event to changeOpacity. Also changing z-index etc can be
implemented for layers to pull one on another one.
*3- Layer switcher items are a bit ugly and hard to modify:* Checkboxes and
other things doesn't look so nice. Instead you might use some other elements
from some other frameworks. Also, layer switcher has a bit rigit structure
like popping from right and hiding to right, therefore it was not so easy to
move it to somewhere where you wanted. 

Your links are not working right now so I couldn't understand what you are
going to achieve.

I remember having hard times to override css elements and ending up writing
!important to everywhere in layerswitcher just to make styling work. 



--
View this message in context: http://osgeo-org.1560.n6.nabble.com/CSS-attempted-restyling-Ouch-tp5016967p5017001.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.


More information about the Users mailing list