-
Notifications
You must be signed in to change notification settings - Fork 30
/
qgis2leaf_layerlist.py
108 lines (106 loc) · 8.17 KB
/
qgis2leaf_layerlist.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# -*- coding: utf-8 -*-
"""
/***************************************************************************
qgis2leaf @ Social Planing Council of the City of Ottawa
A QGIS plugin
QGIS to Leaflet creation programm
-------------------
begin : 2014-04-29
copyright : (C) 2013 by Riccardo Klinger
email : riccardo.klinger@geolicious.com
***************************************************************************/
/***************************************************************************
INSTRUCTION ON FILE USAGE:
***************************************************************************/
"""
# To add a line to the layer list you might use this dictionary python variable.
# its first element is the basemap service name which will be displayed in the GUI
# The second entry marked with "META" is the metadata for the leaflet. pleasy
# respect copyrights and licenses
# After you've added a basemap service, the plugin needs to be reinstalled.
#
"""
/***************************************************************************
* *
* 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. *
* *
***************************************************************************/
"""
def layerlist():
dictionary = [{
'OSM Standard':'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\
'META': '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'OSM Black & White':'http://{s}.www.toolserver.org/tiles/bw-mapnik/{z}/{x}/{y}.png',\
'META': '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'Stamen Toner':'http://a.tile.stamen.com/toner/{z}/{x}/{y}.png',\
'META': 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data: © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'OSM DE':'http://{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png',\
'META': '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'OSM HOT':'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',\
'META': '© <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Tiles courtesy of <a href="http://hot.openstreetmap.org/" target="_blank">Humanitarian OpenStreetMap Team</a>'
},{
'OpenSeaMap':'http://tiles.openseamap.org/seamark/{z}/{x}/{y}.png',\
'META': 'Map data: © <a href="http://www.openseamap.org">OpenSeaMap</a> contributors'
},{
'Thunderforest Cycle':'http://{s}.tile.thunderforest.com/cycle/{z}/{x}/{y}.png',\
'META': '© <a href="http://www.opencyclemap.org">OpenCycleMap</a>, © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'Thunderforest Transport':'http://{s}.tile.thunderforest.com/transport/{z}/{x}/{y}.png',\
'META': '© <a href="http://www.opencyclemap.org">OpenCycleMap</a>, © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'Thunderforest Landscape':'http://{s}.tile.thunderforest.com/landscape/{z}/{x}/{y}.png',\
'META': '© <a href="http://www.opencyclemap.org">OpenCycleMap</a>, © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'Thunderforest Outdoors':'http://{s}.tile.thunderforest.com/outdoors/{z}/{x}/{y}.png',\
'META': '© <a href="http://www.opencyclemap.org">OpenCycleMap</a>, © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'OpenMapSurfer Roads':'http://openmapsurfer.uni-hd.de/tiles/roads/x={x}&y={y}&z={z}',\
'META': 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data: © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'OpenMapSurfer adminb':'http://openmapsurfer.uni-hd.de/tiles/adminb/x={x}&y={y}&z={z}',\
'META': 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data: © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'OpenMapSurfer roadsg':'http://openmapsurfer.uni-hd.de/tiles/roadsg/x={x}&y={y}&z={z}',\
'META': 'Imagery from <a href="http://giscience.uni-hd.de/">GIScience Research Group @ University of Heidelberg</a> — Map data: © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'MapQuestOpen OSM':'http://otile1.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpeg',\
'META': 'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> — Map data: © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'MapQuestOpen Aerial':'http://otile1.mqcdn.com/tiles/1.0.0/sat/{z}/{x}/{y}.jpg',\
'META': 'Tiles Courtesy of <a href="http://www.mapquest.com/">MapQuest</a> — Portions Courtesy NASA/JPL-Caltech and U.S. Depart. of Agriculture, Farm Service Agency'
},{
'Stamen Terrain':'http://a.tile.stamen.com/terrain/{z}/{x}/{y}.png',\
'META': 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data: © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'Stamen Watercolor':'http://a.tile.stamen.com/watercolor/{z}/{x}/{y}.png',\
'META': 'Map tiles by <a href="http://stamen.com">Stamen Design</a>, <a href="http://creativecommons.org/licenses/by/3.0">CC BY 3.0</a> — Map data: © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors,<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>'
},{
'OpenWeatherMap Clouds':'http://{s}.tile.openweathermap.org/map/clouds/{z}/{x}/{y}.png',\
'META': 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>'
},{
'OpenWeatherMap Precipitation':'http://{s}.tile.openweathermap.org/map/precipitation/{z}/{x}/{y}.png',\
'META': 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>'
},{
'OpenWeatherMap Rain':'http://{s}.tile.openweathermap.org/map/rain/{z}/{x}/{y}.png',\
'META': 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>'
},{
'OpenWeatherMap Pressure':'http://{s}.tile.openweathermap.org/map/pressure/{z}/{x}/{y}.png',\
'META': 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>'
},{
'OpenWeatherMap Wind':'http://{s}.tile.openweathermap.org/map/wind/{z}/{x}/{y}.png',\
'META': 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>'
},{
'OpenWeatherMap Temp':'http://{s}.tile.openweathermap.org/map/temp/{z}/{x}/{y}.png',\
'META': 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>'
},{
'OpenWeatherMap Snow':'http://{s}.tile.openweathermap.org/map/snow/{z}/{x}/{y}.png',\
'META': 'Map data © <a href="http://openweathermap.org">OpenWeatherMap</a>'
}]
return dictionary