Index

Finding your way around

The GeoAdmin API is an extension of OpenLayers 3 which adds only a few classes and configuration files to OpenLayers 3, to make it easier to use with the swiss grid and the layers provided by the swiss confederation and cantons.

See the class list to the left and especially take a look at ga.Map and the method ga.layer.create to add predefined layers.

In general every use of OpenLayers starts by initializing a map, then adding the required layers. Controls and interactions can be added to change the behavior of the map.

MapViewLayers

A map is made of layers, a view to visualize them, interactions to modify map content and controls with UI components.

Overview
Creation
Events

The view manages the visual parameters of the map view, like resolution or rotation.

ol.View with center, projection, resolution and rotation

Layers are lightweight containers that get their data from sources.

ol.layer.Tile
ol.layer.Image
ol.layer.Vector
ControlsInteractionsSources and formats
Map default controls
All controls
Map default interactions
Interactions for vector features All interactions
Tile sources for ol.layer.Tile
Image sources for ol.layer.Image
Vector sources for ol.layer.Vector
Formats for reading/writing vector data
ol.format.WMSCapabilities
Projections2-way bindingsOther components

GeoAdmin API map uses the swiss grid (EPSG:21781). All coordinates and extents need to be provided in this view projection. To transform, use ol.proj.transform() and ol.extent.applyTransform().

ol.proj

Objects can be kept in sync using the bindTo() method.

A DOM Input class is available to bind Object properties to HTML Input elements.

ol.DeviceOrientation
ol.Geolocation
ol.Overlay
ol.FeatureOverlay

Contributing

See CONTRIBUTING.md for instructions on building and testing OpenLayers. The file does also describe how to commit your changes to OpenLayers or GeoAdmin API. When making a Pull Request, be attentive that the appropriate project (OpenLayers 3 or GeoAdmin API) is used.