Skip to content
Drupal-Module for the integration of a swisstopo-map as a drupal-field
PHP JavaScript HTML CSS
Branch: master
Clone or download
Pull request Compare This branch is even with gridonic:master.
Latest commit 07681fd Sep 17, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
assets Add a backend-/settings-field to add your own map-marker. Seperated f… Sep 17, 2018
screenshots first commit with the existing module Sep 14, 2018
src Add a backend-/settings-field to add your own map-marker. Seperated f… Sep 17, 2018
templates Add a backend-/settings-field to add your own map-marker. Seperated f… Sep 17, 2018
README.md change image size Sep 17, 2018
composer.json
swisstopo.api.php
swisstopo.info.yml first commit with the existing module Sep 14, 2018
swisstopo.libraries.yml first commit with the existing module Sep 14, 2018
swisstopo.module Add a backend-/settings-field to add your own map-marker. Seperated f… Sep 17, 2018
swisstopo.services.yml first commit with the existing module Sep 14, 2018

README.md

Swisstopo Map Field

swisstopo module provides integration with the Map of Switzerland.

Output

The module provides to add a mapbox with the swisstopo map.

Zoom 500 of Bern

Zoom 1 of Wädenswil

Map-Field

The module provides a new field for setting the X- and Y-Coordinates in the swissgrid format: 2 600 000 / 1 200 000. Also you can choose the zoom-level to define which zoom the mapbox will have.

Installation

Since this module is not yet released on Drupal, we need to tell Composer where to find it:

Add the following entry in the repositories section of your composer.json:

"swisstopo": {
    "type": "vcs",
    "url": "https://github.com/gridonic/swisstopo"
}

Now you can use the field field_swisstopo and add it to paragraphs, on pages, wherever you want to use it.

Configuration

You can choose between two Output-Settings

Raw

Returns just the two Coordinates in the frontend.

Rendered Map

Renders a map-box

  • Center at the coordinates
  • Marker at the coordinates
  • Zoom-level as entered in the field
  • Height: 400px
  • Width: 100%

Licence

The Map-Api of swisstopo is free to use for non-commercial projects.

You have to register your website at admin.ch to use the API of swisstopo: Registration

This module is GPL-2.0+

You can’t perform that action at this time.