[OpenLayers-Users] changing fonts in the layerswitcher

P Kishor punk.kish at gmail.com
Fri Sep 11 09:02:40 EDT 2009


On Fri, Sep 11, 2009 at 1:13 AM, Andreas Hocevar <ahocevar at opengeo.org> wrote:
> P Kishor wrote:
>> is there a way to change the fonts in the layerswitcher control short
>> of fiddling with the hard coded styles in LayerSwitcher.js
>> loadContents method?
>>
>
> Unfortulately not. But patches to move these style definitions to css
> are more than welcome. One hint though: the LayerSwitcher control is
> intended for a simple way to control layers, and is not very
> configurable. If you need functionality beyond that, you may want to
> have a look at one of the libraries that build upon OpenLayers and
> provide richer UI components (e.g. http://geoext.org).


Thanks. I am a bit hesitant to layer another library on top of OL
which already uses a few libraries while I myself use and am a big fan
of jQuery. Is there any work with OL and jQuery?


>
> Regards,
> Andreas.
>
>>     loadContents: function() {
>>
>>         //configure main div
>>         this.div.style.position = "absolute";
>>         this.div.style.top = "25px";
>>         this.div.style.right = "0px";
>>         this.div.style.left = "";
>>         this.div.style.fontFamily = "sans-serif";
>>         this.div.style.fontWeight = "bold";
>>         this.div.style.marginTop = "3px";
>>         this.div.style.marginLeft = "3px";
>>         this.div.style.marginBottom = "3px";
>>         this.div.style.fontSize = "smaller";
>>         this.div.style.color = "white";
>>         this.div.style.backgroundColor = "transparent";
>>
>>
>>
>>
>>
>>
>
>
> --
> Andreas Hocevar
> OpenGeo - http://opengeo.org/
> Expert service straight from the developers.
>
>



-- 
Puneet Kishor h



More information about the Users mailing list