User Tools

Site Tools


en:api:layerslist

Data Layers

Base Layers and Non-Base Layers

The GeoAPI, as it is based on OpenLayers, has two types of map layers: base layers and overlays. This difference controls several aspects of how you interact with the GeoAPI.

Base Layers

Base Layers are mutually exclusive layers, meaning only one can be enabled at any iven time. Base Layers always display below overlay layers. Already there is always the orthophoto as background layer (can this be turned off ?, haven’t found out how yet ? ) Possible background layers (bg_layer):

  1. voidLayer (blank, either transparent or white)
  2. pixelsmaps-gray (topo map bw)
  3. pixelsmaps-colour (topo map color)
  4. streets (file named as jpeg and requested as jpeg, but returns png with transparency?)

Non Base Layers

Non base layers – sometimes called overlays – contain supplemental layers of information and multiple overlays can be enabled at a time. These layers can be switched on and off independantly and thus can be combined. Items are named inconsistently. Worth thinking about namespacing to group items, logically according to groups if possible. Todo : Create list of base and thematic layers, with more metadata.

To get a human readable list of layers available through the GeoAPI, go to the following page Layers listing

Adding a layer to the map

You can add GeoAPI layers to the map using the following code:

...
geo.addLayerToMap('roads');
...

Once the layer is added, you can get access to the OpenLayers Layer Object for that layer using the getLayersBy() method, using the layername property. For example to set the visibility:

...
geo.map.getLayersBy('layername','roads')[0].setVisibility(false);
...
en/api/layerslist.txt · Last modified: 2017/03/02 12:27 (external edit)