File: customization

package info (click to toggle)
openlayers 2.11%2Bds1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd, wheezy
  • size: 60,144 kB
  • ctags: 10,906
  • sloc: xml: 7,435; python: 778; sh: 68; makefile: 30
file content (49 lines) | stat: -rw-r--r-- 1,360 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
Customizing OpenLayers
======================

OpenLayers is designed to fit many needs -- fitting in alongside all kinds of
various applications which are currently in use. 

Currently, OpenLayers supports a 'theme' option when creating a map. This 
theme option allows you to specify the location of a CSS theme which should
be included.

A default theme is available as an example in the theme/ directory: the setup
is:

 * theme/
 * theme/default/
 * theme/default/style.css
 * theme/default/img/

Currently, the OpenLayers code does not support class names, and therefore,
it is not possible to control many aspects of OpenLayers code with CSS 
classes. However, with this framework in place, we expect to invest time 
to make existing features and new features use the CSS theming framework
where apropriate. 


Class Naming
============
Elements should have class names which are descriptive of the Javascript
class from which they come. For example, the main layer switcher element
in the OpenLayers.Control.LayerSwitcher would be classed:

  olControlLayerSwitcher

This would allow users to add to their style.css class in their theme,
changing, for example: 

::
  
  .olControlLayerSwitcher input {
    width:10px;
  }

Sub elements of a particular control can add to the class name:

::

  .olControlLayerSwitcherBaseLabel {
      color: red;
  }