Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@openlayers-elements/swisstopo

0.2.0-beta.0 • Public • Published

swisstopo-elements

OpenLayers elements for adding swisstopo maps to openlayers-elements

See documentation and demos.

Quick start

To install run

yarn add @openlayers-elements/swisstopo @openlayers-elements/core

Then add the WMTS layer to your ol-map

<script type="module">
  import '@openlayers-elements/swisstopo/core/ol-map'
  import '@openlayers-elements/swisstopo/swisstopo-wmts'
</script> 
 
<ol-map zoom="7" lat="46.7985" lon="8.2318">
    <swisstopo-wmts layer-name="ch.swisstopo.pixelkarte-grau"></swisstopo-wmts>
</ol-map>
For valid layer names, check http://api3.geo.admin.ch/api/faq/index.html#which-layers-are-available

Note that these layers require to register with http://swisstopo.ch/webaccess

Running examples

For the reason mentioned above, the online demos don't work. You can run them locally (check the root readme). Here's a how the two sample maps look like in the browser when the map API is acessible:

swisstopo example

It is jus tas easy to overlay OpenStreetMap with a Swisstopo layer:

swisstopo OSM

Keywords

none

Install

npm i @openlayers-elements/swisstopo

DownloadsWeekly Downloads

0

Version

0.2.0-beta.0

License

none

Unpacked Size

1.37 MB

Total Files

13

Last publish

Collaborators

  • avatar