[OpenLayers-Users] changing fonts in the layerswitcher
P Kishor
punk.kish at gmail.com
Fri Sep 11 09:00:43 EDT 2009
On Fri, Sep 11, 2009 at 1:51 AM, Lehtonen, Mika <mika at digikartta.net> wrote:
> Hi,
>
> I did some changes a while ago with the following style definition because I
> had too long layer names. I didn't have to mess up with the hardcode. Am I
> not understanding the question?
>
> .olControlLayerSwitcher {
> font-size: x-small !important;
> padding-right: 50px !important;
> }
That is exactly what I was looking for. I couldn't find those style
declarations in my stylesheet, so was not sure what to hit.
Many thanks,
> - mika -
>
> Andreas Hocevar kirjoitti:
>>
>> 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).
>>
>> 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";
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>
--
Puneet Kishor
More information about the Users
mailing list