The GeoAdmin Javascript API ("JS API") extends OpenLayers with Swiss specific configurations and layers.
For more details, see the GeoAdmin JS API specs.
::: warning
The GeoAdmin JS API is about to be decommissioned and is not updated anymore. The default version is based on OpenLayers 3.6.0 from 2015. We strongly recommend using a different web mapping framework implementing the OGC WMTS, like Leaflet or plain OpenLayers as in these examples for the XYZ service. :::
The version of the GeoAdmin JS API corresponds to the version of OpenLayers it extends. The following versions of the GeoAdmin JS API are available:
- Versions using LV95:
- Versions using LV03:
- 4.3.2 → https://api3.geo.admin.ch/loader.js?version=4.3.2
- 3.18.2 → https://api3.geo.admin.ch/loader.js?version=3.18.2
- 3.6.0 (default) → https://api3.geo.admin.ch/loader.js