NAME
Template::Plugin::SwissTopo - SwissTopo plugin for Template Toolkit
SYNOPSIS
Usage in Template:
[% USE SwissTopo %]
[% SwissTopo.URL( lat => $lat, long => $long, zoom => 5, crosshair => "cross" ) %]
DESCRIPTION
Provides URL to SwissTopo map http://map.geo.admin.ch, as well as approximate conversion functions from WGS-84 (world latitude / longitude) to CH-1903 (swiss coordinate system).
METHODS
URL
Generate a SwissTopo URL. Returns an empty string if coordinates are not covered by the map.
Arguments:
- lat: WGS-84 latitude (mandatory)
- long: WGS-84 longitude (mandatory)
- zoom: zoom factor [0..13], defaults to 8
- crosshair: draw crosshair. supported values: "cross", "circle", "bowl" and "point"
- encode: if set, returns URL encoded string
Example:
[% SwissTopo.URL( $lat, $long, "cross" ) %]
AUTHOR
Axel Burri <axel@tty0.ch>
COPYRIGHT AND LICENSE
Copyright (c) 2011-2019 Axel Burri. All rights reserved.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
SEE ALSO
Swiss map projections:
http://www.swisstopo.admin.ch/internet/swisstopo/en/home/topics/survey/sys/refsys/projections.html
Scripts provided by SwissTopo:
http://www.swisstopo.admin.ch/internet/swisstopo/en/home/products/software/products/skripts.html
Template Toolkit Plugin Documentation:
http://www.template-toolkit.org/docs/modules/Template/Plugin.html