umap-project 1.14.0a1__py3-none-any.whl → 1.14.0a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of umap-project might be problematic. Click here for more details.
- umap/__init__.py +1 -1
- umap/static/.gitignore +0 -0
- umap/static/umap/base.css +994 -0
- umap/static/umap/bitbucket.png +0 -0
- umap/static/umap/content.css +395 -0
- umap/static/umap/favicons/apple-touch-icon.png +0 -0
- umap/static/umap/favicons/favicon.ico +0 -0
- umap/static/umap/favicons/icon-192.png +0 -0
- umap/static/umap/favicons/icon-512.png +0 -0
- umap/static/umap/favicons/icon.svg +5 -0
- umap/static/umap/font/FiraSans-Light.woff +0 -0
- umap/static/umap/font/FiraSans-Light.woff2 +0 -0
- umap/static/umap/font/FiraSans-LightItalic.woff +0 -0
- umap/static/umap/font/FiraSans-LightItalic.woff2 +0 -0
- umap/static/umap/font/FiraSans-SemiBold.woff +0 -0
- umap/static/umap/font/FiraSans-SemiBold.woff2 +0 -0
- umap/static/umap/font.css +33 -0
- umap/static/umap/github.png +0 -0
- umap/static/umap/img/16-white.svg +190 -0
- umap/static/umap/img/16.svg +182 -0
- umap/static/umap/img/24-white.svg +62 -0
- umap/static/umap/img/24.svg +90 -0
- umap/static/umap/img/edit.svg +7 -0
- umap/static/umap/img/icon-bg.png +0 -0
- umap/static/umap/img/logo.svg +4 -0
- umap/static/umap/img/logo_filigree.png +0 -0
- umap/static/umap/img/logo_small.svg +14 -0
- umap/static/umap/img/marker.png +0 -0
- umap/static/umap/img/opensource.svg +7 -0
- umap/static/umap/img/osm.svg +7 -0
- umap/static/umap/img/search.gif +0 -0
- umap/static/umap/img/source/16-white.svg +980 -0
- umap/static/umap/img/source/16.svg +201 -0
- umap/static/umap/img/source/24-white.svg +83 -0
- umap/static/umap/img/source/24.svg +110 -0
- umap/static/umap/js/components/fragment.js +13 -0
- umap/static/umap/js/modules/global.js +8 -0
- umap/static/umap/js/modules/urls.js +29 -0
- umap/static/umap/js/umap.autocomplete.js +336 -0
- umap/static/umap/js/umap.browser.js +148 -0
- umap/static/umap/js/umap.controls.js +1542 -0
- umap/static/umap/js/umap.core.js +851 -0
- umap/static/umap/js/umap.datalayer.permissions.js +72 -0
- umap/static/umap/js/umap.features.js +1216 -0
- umap/static/umap/js/umap.forms.js +1267 -0
- umap/static/umap/js/umap.icon.js +234 -0
- umap/static/umap/js/umap.importer.js +166 -0
- umap/static/umap/js/umap.js +2010 -0
- umap/static/umap/js/umap.layer.js +1636 -0
- umap/static/umap/js/umap.permissions.js +212 -0
- umap/static/umap/js/umap.popup.js +340 -0
- umap/static/umap/js/umap.share.js +254 -0
- umap/static/umap/js/umap.slideshow.js +165 -0
- umap/static/umap/js/umap.tableeditor.js +120 -0
- umap/static/umap/js/umap.ui.js +240 -0
- umap/static/umap/js/umap.xhr.js +304 -0
- umap/static/umap/locale/am_ET.js +447 -0
- umap/static/umap/locale/am_ET.json +445 -0
- umap/static/umap/locale/ar.js +447 -0
- umap/static/umap/locale/ar.json +445 -0
- umap/static/umap/locale/ast.js +447 -0
- umap/static/umap/locale/ast.json +445 -0
- umap/static/umap/locale/bg.js +447 -0
- umap/static/umap/locale/bg.json +445 -0
- umap/static/umap/locale/br.js +447 -0
- umap/static/umap/locale/br.json +445 -0
- umap/static/umap/locale/ca.js +447 -0
- umap/static/umap/locale/ca.json +445 -0
- umap/static/umap/locale/cs_CZ.js +447 -0
- umap/static/umap/locale/cs_CZ.json +445 -0
- umap/static/umap/locale/da.js +447 -0
- umap/static/umap/locale/da.json +445 -0
- umap/static/umap/locale/de.js +447 -0
- umap/static/umap/locale/de.json +445 -0
- umap/static/umap/locale/el.js +447 -0
- umap/static/umap/locale/el.json +445 -0
- umap/static/umap/locale/en.js +447 -0
- umap/static/umap/locale/en.json +445 -0
- umap/static/umap/locale/en_US.json +445 -0
- umap/static/umap/locale/es.js +447 -0
- umap/static/umap/locale/es.json +445 -0
- umap/static/umap/locale/et.js +447 -0
- umap/static/umap/locale/et.json +445 -0
- umap/static/umap/locale/eu.js +413 -0
- umap/static/umap/locale/eu.json +411 -0
- umap/static/umap/locale/fa_IR.js +447 -0
- umap/static/umap/locale/fa_IR.json +445 -0
- umap/static/umap/locale/fi.js +447 -0
- umap/static/umap/locale/fi.json +445 -0
- umap/static/umap/locale/fr.js +447 -0
- umap/static/umap/locale/fr.json +445 -0
- umap/static/umap/locale/gl.js +447 -0
- umap/static/umap/locale/gl.json +445 -0
- umap/static/umap/locale/he.js +447 -0
- umap/static/umap/locale/he.json +445 -0
- umap/static/umap/locale/hr.js +447 -0
- umap/static/umap/locale/hr.json +445 -0
- umap/static/umap/locale/hu.js +447 -0
- umap/static/umap/locale/hu.json +445 -0
- umap/static/umap/locale/id.js +447 -0
- umap/static/umap/locale/id.json +445 -0
- umap/static/umap/locale/is.js +447 -0
- umap/static/umap/locale/is.json +445 -0
- umap/static/umap/locale/it.js +447 -0
- umap/static/umap/locale/it.json +445 -0
- umap/static/umap/locale/ja.js +447 -0
- umap/static/umap/locale/ja.json +445 -0
- umap/static/umap/locale/ko.js +447 -0
- umap/static/umap/locale/ko.json +445 -0
- umap/static/umap/locale/lt.js +447 -0
- umap/static/umap/locale/lt.json +445 -0
- umap/static/umap/locale/ms.js +447 -0
- umap/static/umap/locale/ms.json +445 -0
- umap/static/umap/locale/nl.js +447 -0
- umap/static/umap/locale/nl.json +445 -0
- umap/static/umap/locale/no.js +447 -0
- umap/static/umap/locale/no.json +445 -0
- umap/static/umap/locale/pl.js +447 -0
- umap/static/umap/locale/pl.json +445 -0
- umap/static/umap/locale/pl_PL.json +445 -0
- umap/static/umap/locale/pt.js +447 -0
- umap/static/umap/locale/pt.json +445 -0
- umap/static/umap/locale/pt_BR.js +447 -0
- umap/static/umap/locale/pt_BR.json +445 -0
- umap/static/umap/locale/pt_PT.js +447 -0
- umap/static/umap/locale/pt_PT.json +445 -0
- umap/static/umap/locale/ro.js +447 -0
- umap/static/umap/locale/ro.json +445 -0
- umap/static/umap/locale/ru.js +447 -0
- umap/static/umap/locale/ru.json +445 -0
- umap/static/umap/locale/si.js +439 -0
- umap/static/umap/locale/si.json +437 -0
- umap/static/umap/locale/sk_SK.js +447 -0
- umap/static/umap/locale/sk_SK.json +445 -0
- umap/static/umap/locale/sl.js +447 -0
- umap/static/umap/locale/sl.json +445 -0
- umap/static/umap/locale/sr.js +447 -0
- umap/static/umap/locale/sr.json +445 -0
- umap/static/umap/locale/sv.js +447 -0
- umap/static/umap/locale/sv.json +445 -0
- umap/static/umap/locale/th_TH.js +447 -0
- umap/static/umap/locale/th_TH.json +445 -0
- umap/static/umap/locale/tr.js +447 -0
- umap/static/umap/locale/tr.json +445 -0
- umap/static/umap/locale/uk_UA.js +447 -0
- umap/static/umap/locale/uk_UA.json +445 -0
- umap/static/umap/locale/vi.js +447 -0
- umap/static/umap/locale/vi.json +445 -0
- umap/static/umap/locale/vi_VN.json +445 -0
- umap/static/umap/locale/zh.js +447 -0
- umap/static/umap/locale/zh.json +445 -0
- umap/static/umap/locale/zh_CN.json +445 -0
- umap/static/umap/locale/zh_TW.Big5.json +445 -0
- umap/static/umap/locale/zh_TW.js +447 -0
- umap/static/umap/locale/zh_TW.json +445 -0
- umap/static/umap/map.css +1843 -0
- umap/static/umap/nav.css +81 -0
- umap/static/umap/openstreetmap.png +0 -0
- umap/static/umap/test/.eslintrc +22 -0
- umap/static/umap/test/Choropleth.js +243 -0
- umap/static/umap/test/Controls.js +100 -0
- umap/static/umap/test/DataLayer.js +495 -0
- umap/static/umap/test/Feature.js +382 -0
- umap/static/umap/test/Map.Export.js +106 -0
- umap/static/umap/test/Map.Init.js +46 -0
- umap/static/umap/test/Map.js +342 -0
- umap/static/umap/test/Marker.js +122 -0
- umap/static/umap/test/Permissions.js +74 -0
- umap/static/umap/test/Polygon.js +367 -0
- umap/static/umap/test/Polyline.js +402 -0
- umap/static/umap/test/TableEditor.js +100 -0
- umap/static/umap/test/URLs.js +54 -0
- umap/static/umap/test/Util.js +549 -0
- umap/static/umap/test/_pre.js +460 -0
- umap/static/umap/test/index.html +135 -0
- umap/static/umap/theme.css +1 -0
- umap/static/umap/twitter.png +0 -0
- {umap_project-1.14.0a1.dist-info → umap_project-1.14.0a2.dist-info}/METADATA +1 -1
- {umap_project-1.14.0a1.dist-info → umap_project-1.14.0a2.dist-info}/RECORD +182 -6
- {umap_project-1.14.0a1.dist-info → umap_project-1.14.0a2.dist-info}/WHEEL +0 -0
- {umap_project-1.14.0a1.dist-info → umap_project-1.14.0a2.dist-info}/entry_points.txt +0 -0
- {umap_project-1.14.0a1.dist-info → umap_project-1.14.0a2.dist-info}/licenses/LICENSE +0 -0
|
@@ -0,0 +1,460 @@
|
|
|
1
|
+
window.assert = chai.assert
|
|
2
|
+
window.expect = chai.expect
|
|
3
|
+
|
|
4
|
+
var qs = function (selector, element) {
|
|
5
|
+
return (element || document).querySelector(selector)
|
|
6
|
+
}
|
|
7
|
+
var qsa = function (selector) {
|
|
8
|
+
return document.querySelectorAll(selector)
|
|
9
|
+
}
|
|
10
|
+
var qst = function (text, parent) {
|
|
11
|
+
// find element by its text content
|
|
12
|
+
var r = document.evaluate(
|
|
13
|
+
"descendant::*[contains(text(),'" + text + "')]",
|
|
14
|
+
parent || qs('#map'),
|
|
15
|
+
null,
|
|
16
|
+
XPathResult.UNORDERED_NODE_ITERATOR_TYPE,
|
|
17
|
+
null
|
|
18
|
+
),
|
|
19
|
+
count = 0
|
|
20
|
+
while (r.iterateNext()) console.log(++count)
|
|
21
|
+
return count
|
|
22
|
+
}
|
|
23
|
+
happen.at = function (what, x, y, props) {
|
|
24
|
+
this.once(
|
|
25
|
+
document.elementFromPoint(x, y),
|
|
26
|
+
L.Util.extend(
|
|
27
|
+
{
|
|
28
|
+
type: what,
|
|
29
|
+
clientX: x,
|
|
30
|
+
clientY: y,
|
|
31
|
+
screenX: x,
|
|
32
|
+
screenY: y,
|
|
33
|
+
which: 1,
|
|
34
|
+
button: 0,
|
|
35
|
+
},
|
|
36
|
+
props || {}
|
|
37
|
+
)
|
|
38
|
+
)
|
|
39
|
+
}
|
|
40
|
+
var resetMap = function () {
|
|
41
|
+
var mapElement = qs('#map')
|
|
42
|
+
mapElement.innerHTML = 'Done'
|
|
43
|
+
delete mapElement._leaflet_id
|
|
44
|
+
document.body.className = ''
|
|
45
|
+
}
|
|
46
|
+
var enableEdit = function () {
|
|
47
|
+
happen.click(qs('div.leaflet-control-edit-enable button'))
|
|
48
|
+
}
|
|
49
|
+
var disableEdit = function () {
|
|
50
|
+
happen.click(qs('.leaflet-control-edit-disable'))
|
|
51
|
+
}
|
|
52
|
+
var clickSave = function () {
|
|
53
|
+
happen.click(qs('.leaflet-control-edit-save'))
|
|
54
|
+
}
|
|
55
|
+
var clickCancel = function () {
|
|
56
|
+
var _confirm = window.confirm
|
|
57
|
+
window.confirm = function (text) {
|
|
58
|
+
return true
|
|
59
|
+
}
|
|
60
|
+
happen.click(qs('button.leaflet-control-edit-cancel'))
|
|
61
|
+
happen.once(document.body, { type: 'keypress', keyCode: 13 })
|
|
62
|
+
window.confirm = _confirm
|
|
63
|
+
}
|
|
64
|
+
var changeInputValue = function (input, value) {
|
|
65
|
+
input.value = value
|
|
66
|
+
happen.once(input, { type: 'input' })
|
|
67
|
+
happen.once(input, { type: 'blur' })
|
|
68
|
+
}
|
|
69
|
+
var changeSelectValue = function (path_or_select, value) {
|
|
70
|
+
if (typeof path_or_select === 'string') path_or_select = qs(path_or_select)
|
|
71
|
+
var found = false
|
|
72
|
+
for (var i = 0; i < path_or_select.length; i++) {
|
|
73
|
+
if (path_or_select.options[i].value === value) {
|
|
74
|
+
path_or_select.options[i].selected = true
|
|
75
|
+
found = true
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
happen.once(path_or_select, { type: 'change' })
|
|
79
|
+
if (!found)
|
|
80
|
+
throw new Error('Value ' + value + 'not found in select ' + path_or_select)
|
|
81
|
+
return path_or_select
|
|
82
|
+
}
|
|
83
|
+
var cleanAlert = function () {
|
|
84
|
+
L.DomUtil.removeClass(qs('#map'), 'umap-alert')
|
|
85
|
+
L.DomUtil.get('umap-alert-container').innerHTML = ''
|
|
86
|
+
UI_ALERT_ID = null // Prevent setTimeout to be called
|
|
87
|
+
}
|
|
88
|
+
var defaultDatalayerData = function (custom) {
|
|
89
|
+
var _default = {
|
|
90
|
+
iconClass: 'Default',
|
|
91
|
+
name: 'Elephants',
|
|
92
|
+
displayOnLoad: true,
|
|
93
|
+
id: 62,
|
|
94
|
+
pictogram_url: null,
|
|
95
|
+
weight: null,
|
|
96
|
+
fillColor: '',
|
|
97
|
+
color: '',
|
|
98
|
+
stroke: true,
|
|
99
|
+
smoothFactor: null,
|
|
100
|
+
dashArray: '',
|
|
101
|
+
fill: true,
|
|
102
|
+
}
|
|
103
|
+
return L.extend({}, _default, custom)
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
function initMap(options) {
|
|
107
|
+
default_options = {
|
|
108
|
+
type: 'Feature',
|
|
109
|
+
properties: {
|
|
110
|
+
umap_id: 42,
|
|
111
|
+
datalayers: [],
|
|
112
|
+
urls: {
|
|
113
|
+
map: '/map/{slug}_{pk}',
|
|
114
|
+
datalayer_view: '/datalayer/{pk}/',
|
|
115
|
+
map_update: '/map/{map_id}/update/settings/',
|
|
116
|
+
map_old_url: '/map/{username}/{slug}/',
|
|
117
|
+
map_clone: '/map/{map_id}/update/clone/',
|
|
118
|
+
map_short_url: '/m/{pk}/',
|
|
119
|
+
map_anonymous_edit_url: '/map/anonymous-edit/{signature}',
|
|
120
|
+
map_new: '/map/new/',
|
|
121
|
+
datalayer_update: '/map/{map_id}/datalayer/update/{pk}/',
|
|
122
|
+
map_delete: '/map/{map_id}/update/delete/',
|
|
123
|
+
map_create: '/map/create/',
|
|
124
|
+
logout: '/logout/',
|
|
125
|
+
datalayer_create: '/map/{map_id}/datalayer/create/',
|
|
126
|
+
login_popup_end: '/login/popupd/',
|
|
127
|
+
login: '/login/',
|
|
128
|
+
datalayer_delete: '/map/{map_id}/datalayer/delete/{pk}/',
|
|
129
|
+
datalayer_versions: '/map/{map_id}/datalayer/{pk}/versions/',
|
|
130
|
+
datalayer_version: '/datalayer/{pk}/{name}',
|
|
131
|
+
pictogram_list_json: '/pictogram/json/',
|
|
132
|
+
map_update_permissions: '/map/{map_id}/update/permissions/',
|
|
133
|
+
map_download: '/map/{map_id}/download/',
|
|
134
|
+
},
|
|
135
|
+
default_iconUrl: '../src/img/marker.png',
|
|
136
|
+
zoom: 6,
|
|
137
|
+
share_statuses: [
|
|
138
|
+
[1, 'Tout le monde (public)'],
|
|
139
|
+
[2, 'Quiconque a le lien'],
|
|
140
|
+
[3, 'Éditeurs uniquement'],
|
|
141
|
+
],
|
|
142
|
+
tilelayers: [
|
|
143
|
+
{
|
|
144
|
+
attribution: '\u00a9 OSM Contributors',
|
|
145
|
+
name: 'OpenStreetMap',
|
|
146
|
+
url_template: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
|
147
|
+
minZoom: 0,
|
|
148
|
+
maxZoom: 18,
|
|
149
|
+
id: 1,
|
|
150
|
+
selected: true,
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
attribution: 'HOT and friends',
|
|
154
|
+
name: 'HOT OSM-fr server',
|
|
155
|
+
url_template: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
|
156
|
+
rank: 99,
|
|
157
|
+
minZoom: 0,
|
|
158
|
+
maxZoom: 20,
|
|
159
|
+
id: 2,
|
|
160
|
+
},
|
|
161
|
+
],
|
|
162
|
+
tilelayer: {
|
|
163
|
+
attribution: 'HOT and friends',
|
|
164
|
+
name: 'HOT OSM-fr server',
|
|
165
|
+
url_template: 'http://{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png',
|
|
166
|
+
rank: 99,
|
|
167
|
+
minZoom: 0,
|
|
168
|
+
maxZoom: 20,
|
|
169
|
+
id: 2,
|
|
170
|
+
},
|
|
171
|
+
licences: {
|
|
172
|
+
'No licence set': {
|
|
173
|
+
url: '',
|
|
174
|
+
name: 'No licence set',
|
|
175
|
+
},
|
|
176
|
+
'Licence ouverte/Open Licence': {
|
|
177
|
+
url: 'http://www.data.gouv.fr/Licence-Ouverte-Open-Licence',
|
|
178
|
+
name: 'Licence ouverte/Open Licence',
|
|
179
|
+
},
|
|
180
|
+
'WTFPL': {
|
|
181
|
+
url: 'http://www.wtfpl.net/',
|
|
182
|
+
name: 'WTFPL',
|
|
183
|
+
},
|
|
184
|
+
'ODbl': {
|
|
185
|
+
url: 'http://opendatacommons.org/licenses/odbl/',
|
|
186
|
+
name: 'ODbl',
|
|
187
|
+
},
|
|
188
|
+
},
|
|
189
|
+
name: 'name of the map',
|
|
190
|
+
description: 'The description of the map',
|
|
191
|
+
locale: 'en',
|
|
192
|
+
editMode: 'advanced',
|
|
193
|
+
moreControl: true,
|
|
194
|
+
scaleControl: true,
|
|
195
|
+
miniMap: false,
|
|
196
|
+
datalayersControl: true,
|
|
197
|
+
displayCaptionOnLoad: false,
|
|
198
|
+
displayPopupFooter: false,
|
|
199
|
+
displayDataBrowserOnLoad: false,
|
|
200
|
+
permissions: {
|
|
201
|
+
share_status: 1,
|
|
202
|
+
owner: {
|
|
203
|
+
id: 1,
|
|
204
|
+
name: 'ybon',
|
|
205
|
+
url: '/en/user/ybon/',
|
|
206
|
+
},
|
|
207
|
+
editors: [],
|
|
208
|
+
},
|
|
209
|
+
user: {
|
|
210
|
+
id: 1,
|
|
211
|
+
name: 'foofoo',
|
|
212
|
+
url: '/en/me',
|
|
213
|
+
},
|
|
214
|
+
},
|
|
215
|
+
}
|
|
216
|
+
default_options.properties.datalayers.push(defaultDatalayerData())
|
|
217
|
+
options = options || {}
|
|
218
|
+
options.properties = L.extend({}, default_options.properties, options)
|
|
219
|
+
options.geometry = {
|
|
220
|
+
type: 'Point',
|
|
221
|
+
coordinates: [5.0592041015625, 52.05924589011585],
|
|
222
|
+
}
|
|
223
|
+
return new L.U.Map('map', options)
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
var RESPONSES = {
|
|
227
|
+
datalayer62_GET: {
|
|
228
|
+
crs: null,
|
|
229
|
+
type: 'FeatureCollection',
|
|
230
|
+
_umap_options: defaultDatalayerData(),
|
|
231
|
+
features: [
|
|
232
|
+
{
|
|
233
|
+
geometry: {
|
|
234
|
+
type: 'Point',
|
|
235
|
+
coordinates: [-0.274658203125, 52.57634993749885],
|
|
236
|
+
},
|
|
237
|
+
type: 'Feature',
|
|
238
|
+
id: 1807,
|
|
239
|
+
properties: { _umap_options: { color: 'OliveDrab' }, name: 'test' },
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
geometry: {
|
|
243
|
+
type: 'LineString',
|
|
244
|
+
coordinates: [
|
|
245
|
+
[-0.5712890625, 54.47642158429295],
|
|
246
|
+
[0.439453125, 54.610254981579146],
|
|
247
|
+
[1.724853515625, 53.44880683542759],
|
|
248
|
+
[4.163818359375, 53.98839506479995],
|
|
249
|
+
[5.306396484375, 53.533778184257805],
|
|
250
|
+
[6.591796875, 53.70971358510174],
|
|
251
|
+
[7.042236328124999, 53.35055131839989],
|
|
252
|
+
],
|
|
253
|
+
},
|
|
254
|
+
type: 'Feature',
|
|
255
|
+
id: 20,
|
|
256
|
+
properties: { _umap_options: { fill: false, opacity: 0.6 }, name: 'test' },
|
|
257
|
+
},
|
|
258
|
+
{
|
|
259
|
+
geometry: {
|
|
260
|
+
type: 'Polygon',
|
|
261
|
+
coordinates: [
|
|
262
|
+
[
|
|
263
|
+
[11.25, 53.585983654559804],
|
|
264
|
+
[10.1513671875, 52.9751081817353],
|
|
265
|
+
[12.689208984375, 52.16719363541221],
|
|
266
|
+
[14.084472656249998, 53.199451902831555],
|
|
267
|
+
[12.63427734375, 53.61857936489517],
|
|
268
|
+
[11.25, 53.585983654559804],
|
|
269
|
+
[11.25, 53.585983654559804],
|
|
270
|
+
],
|
|
271
|
+
],
|
|
272
|
+
},
|
|
273
|
+
type: 'Feature',
|
|
274
|
+
id: 76,
|
|
275
|
+
properties: { name: 'name poly' },
|
|
276
|
+
},
|
|
277
|
+
],
|
|
278
|
+
},
|
|
279
|
+
// This one is non browsable
|
|
280
|
+
datalayer63_GET: {
|
|
281
|
+
crs: null,
|
|
282
|
+
type: 'FeatureCollection',
|
|
283
|
+
_umap_options: defaultDatalayerData({ id: 63, browsable: false }),
|
|
284
|
+
features: [
|
|
285
|
+
{
|
|
286
|
+
geometry: {
|
|
287
|
+
type: 'Polygon',
|
|
288
|
+
coordinates: [
|
|
289
|
+
[
|
|
290
|
+
[5.545478, 45.068383],
|
|
291
|
+
[5.545907, 45.067277],
|
|
292
|
+
[5.548439, 45.067565],
|
|
293
|
+
[5.552516, 45.06752],
|
|
294
|
+
[5.553288, 45.068217],
|
|
295
|
+
[5.549405, 45.069247],
|
|
296
|
+
[5.548224, 45.071005],
|
|
297
|
+
[5.545907, 45.071096],
|
|
298
|
+
[5.545478, 45.068383],
|
|
299
|
+
],
|
|
300
|
+
],
|
|
301
|
+
},
|
|
302
|
+
type: 'Feature',
|
|
303
|
+
id: 76,
|
|
304
|
+
properties: { name: 'non browsable 1' },
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
type: 'Feature',
|
|
308
|
+
properties: {
|
|
309
|
+
_umap_options: {
|
|
310
|
+
color: 'SteelBlue',
|
|
311
|
+
},
|
|
312
|
+
name: 'non browsable 2',
|
|
313
|
+
},
|
|
314
|
+
geometry: {
|
|
315
|
+
type: 'Polygon',
|
|
316
|
+
coordinates: [
|
|
317
|
+
[
|
|
318
|
+
[5.550542, 45.071717],
|
|
319
|
+
[5.548182, 45.071051],
|
|
320
|
+
[5.549426, 45.069232],
|
|
321
|
+
[5.553331, 45.068171],
|
|
322
|
+
[5.554812, 45.070869],
|
|
323
|
+
[5.553396, 45.072384],
|
|
324
|
+
[5.550542, 45.071717],
|
|
325
|
+
],
|
|
326
|
+
],
|
|
327
|
+
},
|
|
328
|
+
},
|
|
329
|
+
],
|
|
330
|
+
},
|
|
331
|
+
// This one is not shown at load
|
|
332
|
+
datalayer64_GET: {
|
|
333
|
+
crs: null,
|
|
334
|
+
type: 'FeatureCollection',
|
|
335
|
+
_umap_options: defaultDatalayerData({
|
|
336
|
+
name: 'hidden',
|
|
337
|
+
id: 64,
|
|
338
|
+
displayOnLoad: false,
|
|
339
|
+
}),
|
|
340
|
+
features: [
|
|
341
|
+
{
|
|
342
|
+
geometry: {
|
|
343
|
+
type: 'Polygon',
|
|
344
|
+
coordinates: [
|
|
345
|
+
[
|
|
346
|
+
[5.545478, 45.068383],
|
|
347
|
+
[5.545907, 45.067277],
|
|
348
|
+
[5.548439, 45.067565],
|
|
349
|
+
[5.552516, 45.06752],
|
|
350
|
+
[5.553288, 45.068217],
|
|
351
|
+
[5.549405, 45.069247],
|
|
352
|
+
[5.548224, 45.071005],
|
|
353
|
+
[5.545907, 45.071096],
|
|
354
|
+
[5.545478, 45.068383],
|
|
355
|
+
],
|
|
356
|
+
],
|
|
357
|
+
},
|
|
358
|
+
type: 'Feature',
|
|
359
|
+
id: 76,
|
|
360
|
+
properties: { name: 'not shown at load 1' },
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
type: 'Feature',
|
|
364
|
+
properties: {
|
|
365
|
+
_umap_options: {
|
|
366
|
+
color: 'AliceBlue',
|
|
367
|
+
},
|
|
368
|
+
name: 'not shown at load 2',
|
|
369
|
+
},
|
|
370
|
+
geometry: {
|
|
371
|
+
type: 'Polygon',
|
|
372
|
+
coordinates: [
|
|
373
|
+
[
|
|
374
|
+
[5.550542, 45.071717],
|
|
375
|
+
[5.548182, 45.071051],
|
|
376
|
+
[5.549426, 45.069232],
|
|
377
|
+
[5.553331, 45.068171],
|
|
378
|
+
[5.554812, 45.070869],
|
|
379
|
+
[5.553396, 45.072384],
|
|
380
|
+
[5.550542, 45.071717],
|
|
381
|
+
],
|
|
382
|
+
],
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
],
|
|
386
|
+
},
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
sinon.fakeServer.flush = function () {
|
|
390
|
+
this.responses = []
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
var kml_example =
|
|
394
|
+
'<?xml version="1.0" encoding="UTF-8"?>' +
|
|
395
|
+
'<kml xmlns="http://www.opengis.net/kml/2.2">' +
|
|
396
|
+
'<Placemark>' +
|
|
397
|
+
'<name>Simple point</name>' +
|
|
398
|
+
'<description>Here is a simple description.</description>' +
|
|
399
|
+
'<Point>' +
|
|
400
|
+
'<coordinates>-122.0822035425683,37.42228990140251,0</coordinates>' +
|
|
401
|
+
'</Point>' +
|
|
402
|
+
'</Placemark>' +
|
|
403
|
+
'<Placemark>' +
|
|
404
|
+
'<name>Simple path</name>' +
|
|
405
|
+
'<description>Simple description</description>' +
|
|
406
|
+
'<LineString>' +
|
|
407
|
+
'<coordinates>-112.2550785337791,36.07954952145647,2357 -112.2549277039738,36.08117083492122,2357 -112.2552505069063,36.08260761307279,2357</coordinates>' +
|
|
408
|
+
'</LineString>' +
|
|
409
|
+
'</Placemark>' +
|
|
410
|
+
'<Placemark>' +
|
|
411
|
+
'<name>Simple polygon</name>' +
|
|
412
|
+
'<description>A description.</description>' +
|
|
413
|
+
'<Polygon>' +
|
|
414
|
+
'<outerBoundaryIs>' +
|
|
415
|
+
'<LinearRing>' +
|
|
416
|
+
'<coordinates>' +
|
|
417
|
+
' -77.05788457660967,38.87253259892824,100 ' +
|
|
418
|
+
' -77.05465973756702,38.87291016281703,100 ' +
|
|
419
|
+
' -77.05315536854791,38.87053267794386,100 ' +
|
|
420
|
+
' -77.05788457660967,38.87253259892824,100 ' +
|
|
421
|
+
'</coordinates>' +
|
|
422
|
+
'</LinearRing>' +
|
|
423
|
+
'</outerBoundaryIs>' +
|
|
424
|
+
'</Polygon>' +
|
|
425
|
+
'</Placemark>' +
|
|
426
|
+
'</kml>'
|
|
427
|
+
|
|
428
|
+
var gpx_example =
|
|
429
|
+
'<gpx' +
|
|
430
|
+
' version="1.1"' +
|
|
431
|
+
' creator="GPSBabel - http://www.gpsbabel.org"' +
|
|
432
|
+
' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"' +
|
|
433
|
+
' xmlns="http://www.topografix.com/GPX/1/1"' +
|
|
434
|
+
' xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">' +
|
|
435
|
+
' <wpt lat="45.44283" lon="-121.72904"><ele>1374</ele><name>Simple Point</name><desc>Simple description</desc></wpt>' +
|
|
436
|
+
' <trk>' +
|
|
437
|
+
' <name>Simple path</name>' +
|
|
438
|
+
' <desc>Simple description</desc>' +
|
|
439
|
+
' <trkseg>' +
|
|
440
|
+
' <trkpt lat="45.4431641" lon="-121.7295456"></trkpt>' +
|
|
441
|
+
' <trkpt lat="45.4428615" lon="-121.7290800"></trkpt>' +
|
|
442
|
+
' <trkpt lat="45.4425697" lon="-121.7279085"></trkpt>' +
|
|
443
|
+
' </trkseg>' +
|
|
444
|
+
' </trk>' +
|
|
445
|
+
'</gpx>'
|
|
446
|
+
|
|
447
|
+
var csv_example =
|
|
448
|
+
'Foo,Latitude,Longitude,title,description\n' +
|
|
449
|
+
'bar,41.34,122.86,a point somewhere,the description of this point'
|
|
450
|
+
|
|
451
|
+
// Make Sinon log readable
|
|
452
|
+
sinon.format = function (what) {
|
|
453
|
+
if (typeof what === 'object') {
|
|
454
|
+
return JSON.stringify(what, null, 4)
|
|
455
|
+
} else if (typeof what === 'undefined') {
|
|
456
|
+
return ''
|
|
457
|
+
} else {
|
|
458
|
+
return what.toString()
|
|
459
|
+
}
|
|
460
|
+
}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<title>Umap front Tests</title>
|
|
5
|
+
<meta charset="utf-8" />
|
|
6
|
+
<script type="module" src="../js/modules/global.js" defer></script>
|
|
7
|
+
<script src="../vendors/editable/Path.Drag.js" defer></script>
|
|
8
|
+
<script src="../vendors/editable/Leaflet.Editable.js" defer></script>
|
|
9
|
+
<script src="../vendors/hash/leaflet-hash.js" defer></script>
|
|
10
|
+
<script src="../vendors/i18n/Leaflet.i18n.js" defer></script>
|
|
11
|
+
<script src="../vendors/editinosm/Leaflet.EditInOSM.js" defer></script>
|
|
12
|
+
<script src="../vendors/minimap/Control.MiniMap.js" defer></script>
|
|
13
|
+
<script src="../vendors/csv2geojson/csv2geojson.js" defer></script>
|
|
14
|
+
<script src="../vendors/togeojson/togeojson.js" defer></script>
|
|
15
|
+
<script src="../vendors/osmtogeojson/osmtogeojson.js" defer></script>
|
|
16
|
+
<script src="../vendors/contextmenu/leaflet.contextmenu.js" defer></script>
|
|
17
|
+
<script src="../vendors/loading/Control.Loading.js" defer></script>
|
|
18
|
+
<script src="../vendors/markercluster/leaflet.markercluster-src.js" defer></script>
|
|
19
|
+
<script src="../vendors/photon/leaflet.photon.js" defer></script>
|
|
20
|
+
<script src="../vendors/heat/leaflet-heat.js" defer></script>
|
|
21
|
+
<script src="../vendors/fullscreen/Leaflet.fullscreen.js" defer></script>
|
|
22
|
+
<script src="../vendors/toolbar/leaflet.toolbar-src.js" defer></script>
|
|
23
|
+
<script src="../vendors/formbuilder/Leaflet.FormBuilder.js" defer></script>
|
|
24
|
+
<script src="../vendors/measurable/Leaflet.Measurable.js" defer></script>
|
|
25
|
+
<script src="../vendors/locatecontrol/L.Control.Locate.js" defer></script>
|
|
26
|
+
<script src="../vendors/dompurify/purify.js" defer></script>
|
|
27
|
+
<script src="../vendors/togpx/togpx.js" defer></script>
|
|
28
|
+
<script src="../vendors/tokml/tokml.js" defer></script>
|
|
29
|
+
<script src="../vendors/iconlayers/iconLayers.js" defer></script>
|
|
30
|
+
<script src="../vendors/simple-statistics/simple-statistics.min.js" defer></script>
|
|
31
|
+
<script src="../vendors/colorbrewer/colorbrewer.js" defer></script>
|
|
32
|
+
<script src="../js/umap.core.js" defer></script>
|
|
33
|
+
<script src="../js/umap.autocomplete.js" defer></script>
|
|
34
|
+
<script src="../js/umap.popup.js" defer></script>
|
|
35
|
+
<script src="../js/umap.xhr.js" defer></script>
|
|
36
|
+
<script src="../js/umap.forms.js" defer></script>
|
|
37
|
+
<script src="../js/umap.icon.js" defer></script>
|
|
38
|
+
<script src="../js/umap.features.js" defer></script>
|
|
39
|
+
<script src="../js/umap.layer.js" defer></script>
|
|
40
|
+
<script src="../js/umap.controls.js" defer></script>
|
|
41
|
+
<script src="../js/umap.slideshow.js" defer></script>
|
|
42
|
+
<script src="../js/umap.tableeditor.js" defer></script>
|
|
43
|
+
<script src="../js/umap.permissions.js" defer></script>
|
|
44
|
+
<script src="../js/umap.datalayer.permissions.js" defer></script>
|
|
45
|
+
<script src="../js/umap.browser.js" defer></script>
|
|
46
|
+
<script src="../js/umap.importer.js" defer></script>
|
|
47
|
+
<script src="../js/umap.share.js" defer></script>
|
|
48
|
+
<script src="../js/umap.js" defer></script>
|
|
49
|
+
<script src="../js/umap.ui.js" defer></script>
|
|
50
|
+
<link rel="stylesheet" href="../vendors/leaflet/leaflet.css" />
|
|
51
|
+
<link rel="stylesheet" href="../vendors/minimap/Control.MiniMap.css" />
|
|
52
|
+
<link rel="stylesheet" href="../vendors/editinosm/Leaflet.EditInOSM.css" />
|
|
53
|
+
<link rel="stylesheet" href="../vendors/markercluster/MarkerCluster.css" />
|
|
54
|
+
<link rel="stylesheet"
|
|
55
|
+
href="../vendors/markercluster/MarkerCluster.Default.css" />
|
|
56
|
+
<link rel="stylesheet"
|
|
57
|
+
href="../vendors/contextmenu/leaflet.contextmenu.css" />
|
|
58
|
+
<link rel="stylesheet" href="../vendors/toolbar/leaflet.toolbar.css" />
|
|
59
|
+
<link rel="stylesheet" href="../vendors/measurable/Leaflet.Measurable.css" />
|
|
60
|
+
<link rel="stylesheet" href="../vendors/iconlayers/iconLayers.css" />
|
|
61
|
+
<link rel="stylesheet" href="../../umap/font.css" />
|
|
62
|
+
<link rel="stylesheet" href="../../umap/base.css" />
|
|
63
|
+
<link rel="stylesheet" href="../../umap/content.css" />
|
|
64
|
+
<link rel="stylesheet" href="../../umap/nav.css" />
|
|
65
|
+
<link rel="stylesheet" href="../../umap/map.css" />
|
|
66
|
+
<link rel="stylesheet" href="../../umap/theme.css" />
|
|
67
|
+
<script src="../../../../node_modules/sinon/pkg/sinon.js"></script>
|
|
68
|
+
<script src="../../../../node_modules/mocha/mocha.js"></script>
|
|
69
|
+
<script src="../../../../node_modules/chai/chai.js"></script>
|
|
70
|
+
<script src="../../../../node_modules/happen/happen.js"></script>
|
|
71
|
+
<link rel="stylesheet" href="../../../../node_modules/mocha/mocha.css" />
|
|
72
|
+
<script type="text/javascript">
|
|
73
|
+
mocha.setup({
|
|
74
|
+
ui: 'bdd',
|
|
75
|
+
bail: window.location.search.indexOf('failfast') !== -1,
|
|
76
|
+
ignoreLeaks: true,
|
|
77
|
+
})
|
|
78
|
+
chai.config.includeStack = true
|
|
79
|
+
</script>
|
|
80
|
+
<script src="./_pre.js" defer></script>
|
|
81
|
+
<script src="./Map.js" defer></script>
|
|
82
|
+
<script src="./Map.Init.js" defer></script>
|
|
83
|
+
<script src="./Map.Export.js" defer></script>
|
|
84
|
+
<script src="./DataLayer.js" defer></script>
|
|
85
|
+
<script src="./TableEditor.js" defer></script>
|
|
86
|
+
<script src="./Feature.js" defer></script>
|
|
87
|
+
<script src="./Marker.js" defer></script>
|
|
88
|
+
<script src="./Polyline.js" defer></script>
|
|
89
|
+
<script src="./Polygon.js" defer></script>
|
|
90
|
+
<script src="./Util.js" defer></script>
|
|
91
|
+
<script src="./Controls.js" defer></script>
|
|
92
|
+
<script src="./Permissions.js" defer></script>
|
|
93
|
+
<script src="./Choropleth.js" defer></script>
|
|
94
|
+
<script type="module" src="./URLs.js" defer></script>
|
|
95
|
+
<style type="text/css">
|
|
96
|
+
#mocha {
|
|
97
|
+
position: absolute;
|
|
98
|
+
top: 0;
|
|
99
|
+
bottom: 0;
|
|
100
|
+
left: 0;
|
|
101
|
+
right: 0;
|
|
102
|
+
z-index: 10000;
|
|
103
|
+
background-color: white;
|
|
104
|
+
box-shadow: 0px 0px 8px 0px black;
|
|
105
|
+
overflow-y: auto;
|
|
106
|
+
display: none;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
#mocha-stats {
|
|
110
|
+
position: absolute;
|
|
111
|
+
}
|
|
112
|
+
</style>
|
|
113
|
+
</head>
|
|
114
|
+
<body>
|
|
115
|
+
<div id="mocha"></div>
|
|
116
|
+
<div id="map"></div>
|
|
117
|
+
<script>
|
|
118
|
+
var runner = (window.mochaPhantomJS || window.mocha).run(function (failures) {
|
|
119
|
+
if (window.location.search.indexOf('debug') === -1)
|
|
120
|
+
qs('#mocha').style.display = 'block'
|
|
121
|
+
console.log(failures)
|
|
122
|
+
})
|
|
123
|
+
if (window.location.search.indexOf('debug') !== -1) {
|
|
124
|
+
runner.on('fail', function (test, err) {
|
|
125
|
+
console.log(test.title, test.err)
|
|
126
|
+
console.log(test.err.expected, test.err.actual)
|
|
127
|
+
console.log(test.err.stack)
|
|
128
|
+
})
|
|
129
|
+
sinon.log = function (message) {
|
|
130
|
+
console.log(message)
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
</script>
|
|
134
|
+
</body>
|
|
135
|
+
</html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/* Override this file for theming uMap easily */
|
|
Binary file
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: umap-project
|
|
3
|
-
Version: 1.14.
|
|
3
|
+
Version: 1.14.0a2
|
|
4
4
|
Summary: Create maps with OpenStreetMap layers in a minute and embed them in your site.
|
|
5
5
|
Author-email: Yohan Boniface <yb@enix.org>
|
|
6
6
|
Maintainer-email: David Larlet <david@larlet.fr>
|