';
var cat1 = '', cat2 = '', cat3 = '', cat4 = '', cat5 = '';
conf.forEach(function(item) {
if (item.codepen) {
item.link = '//codepen.io/geoadmin/pen/' + item.codepen + '?editors=0010';
}
var link = tpl.replace('{link}', item.link).replace('{label}', item.label);
switch(item.cat) {
default:
break;
case 1:
cat1 += link;
break;
case 2 :
cat2 += link;
break;
case 3:
cat3 += link;
break;
case 4:
cat4 += link;
break;
case 5:
cat5 += link;
break;
};
});
document.getElementById('cat1').innerHTML = cat1;
document.getElementById('cat2').innerHTML = cat2;
document.getElementById('cat3').innerHTML = cat3;
document.getElementById('cat4').innerHTML = cat4;
document.getElementById('cat5').innerHTML = cat5;
```
--------------------------------
### Vectortiles Configuration Examples
Source: https://api3.geo.admin.ch/releasenotes/index
Examples of URLs pointing to vectortile configurations and styles, commonly used for map rendering and data access in web mapping applications.
```JSON
// Vectortiles set "base"
// https://vectortiles.geo.admin.ch/tiles/ch.swisstopo.base.vt/v1.0.0/tiles.json
```
```JSON
// Base Map Style
// https://vectortiles.geo.admin.ch/styles/ch.swisstopo.basemap.vt/style.json
```
```JSON
// Light Base Map Style
// https://vectortiles.geo.admin.ch/styles/ch.swisstopo.lightbasemap.vt/style.json
```
```JSON
// Imagery Base Map Style
// https://vectortiles.geo.admin.ch/styles/ch.swisstopo.imagerybasemap.vt/style.json
```
--------------------------------
### OpenLayers Example Links
Source: https://api3.geo.admin.ch/services/sdiservices
Links to external CodePen examples demonstrating the use of Geo Admin CH services with OpenLayers. These examples showcase specific functionalities like Cadastralwebmap as WMTS or Swissimage as XYZ.
```OpenLayers
http://codepen.io/geoadmin/pen/pyzwwL?editors=0010
http://codepen.io/geoadmin/pen/xVKLdV?editors=0010
http://codepen.io/geoadmin/pen/GZKEam?editors=0010
http://codepen.io/geoadmin/pen/MyYYXR?editors=0010
https://codepen.io/geoadmin/pen/xxYEwjQ
```
--------------------------------
### GeoAdmin API MapServer Endpoint Examples
Source: https://api3.geo.admin.ch/_sources/services/sdiservices.rst
Provides examples of common API requests to the GeoAdmin MapServer, including listing all layers, searching by text, and finding layers by GeoCat ID.
```APIDOC
API: GeoAdmin MapServer
Base URL: https://api3.geo.admin.ch/rest/services/api/MapServer
Methods:
1. **List all layers**
* **Description**: Retrieves a list of all available layers in the GeoAdmin API.
* **URL**: `GET /rest/services/api/MapServer`
* **Parameters**: None
* **Returns**: JSON object containing layer information.
* **Example**: `https://api3.geo.admin.ch/rest/services/api/MapServer`
2. **Find layers by text search**
* **Description**: Searches for layers where the specified text appears in their description or name.
* **URL**: `GET /rest/services/api/MapServer`
* **Parameters**:
* `searchText` (string, optional): The text to search for within layer descriptions.
* **Returns**: JSON object containing matching layer information.
* **Example**: `https://api3.geo.admin.ch/rest/services/api/MapServer?searchText=wasser`
3. **Find layer by GeoCat ID**
* **Description**: Retrieves information for a specific layer using its unique GeoCat metadata identifier.
* **URL**: `GET /rest/services/api/MapServer`
* **Parameters**:
* `searchText` (string, required): The GeoCat ID of the layer to find.
* **Returns**: JSON object containing the specific layer's information.
* **Example**: `https://api3.geo.admin.ch/rest/services/api/MapServer?searchText=f198f6f6-8efa-4235-a55f-99767ea0206c`
4. **Get Layer Attributes by BOD ID**
* **Description**: Exposes the attribute names specific to a layer, identified by its BOD ID. Useful when combined with the find service.
* **URL**: `GET /rest/services/api/MapServer/{layerBodId}`
* **Parameters**:
* `layerBodId` (string, required): The technical name or BOD ID of the layer.
* `lang` (string, optional): The language for the response. Supported values: de, fr, it, rm, en. Defaults to 'de'.
* **Returns**: JSON object detailing the layer's attributes.
* **Example**: `https://api3.geo.admin.ch/rest/services/api/MapServer/ch.bfs.gebaeude_adresse.gebaeude`
```
--------------------------------
### Example XYZ Tile URL
Source: https://api3.geo.admin.ch/services/sdiservices
An example URL for fetching a JPEG tile from the Swissimage layer using the XYZ tile service. It demonstrates the structure with specific values for projection, zoom, and tile coordinates.
```APIDOC
https://wmts.geo.admin.ch/1.0.0/ch.swisstopo.swissimage/default/current/3857/{z}/{x}/{y}.jpeg
```
--------------------------------
### XYZ GetTile Request Parameters
Source: https://api3.geo.admin.ch/services/sdiservices
Details the parameters required for a GET request to the XYZ tile service. It specifies the meaning and example values for Scheme, ServerName, Version, Layername, StyleName, Time, TileMatrixSet, and format extension.
```APIDOC
GET ://////