---
url: https://docs.geo.admin.ch/preview/renovate/node-26.x/map-viewer/javascript-api.md
---
# Javascript API

The GeoAdmin Javascript API ("JS API") extends OpenLayers with Swiss specific configurations and layers.

For more details, see [the GeoAdmin JS API specs](https://geoadmin.github.io/ol3/apidoc/).

::: 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](/visualize-data/xyz#openlayers).
:::

## Available Versions

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:
  * 4.4.2 → https://api3.geo.admin.ch/loader.js?version=4.4.2
* 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
