umap-project 3.0.3__py3-none-any.whl → 3.0.5__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/locale/el/LC_MESSAGES/django.mo +0 -0
- umap/locale/el/LC_MESSAGES/django.po +136 -56
- umap/locale/en/LC_MESSAGES/django.po +18 -18
- umap/locale/es/LC_MESSAGES/django.mo +0 -0
- umap/locale/es/LC_MESSAGES/django.po +136 -56
- umap/locale/nl/LC_MESSAGES/django.mo +0 -0
- umap/locale/nl/LC_MESSAGES/django.po +1 -1
- umap/models.py +1 -0
- umap/settings/base.py +1 -0
- umap/static/umap/css/bar.css +1 -1
- umap/static/umap/css/form.css +44 -44
- umap/static/umap/css/tooltip.css +13 -0
- umap/static/umap/js/modules/autocomplete.js +7 -8
- umap/static/umap/js/modules/browser.js +89 -94
- umap/static/umap/js/modules/caption.js +6 -4
- umap/static/umap/js/modules/data/features.js +1 -19
- umap/static/umap/js/modules/data/layer.js +100 -61
- umap/static/umap/js/modules/facets.js +1 -1
- umap/static/umap/js/modules/form/fields.js +1 -1
- umap/static/umap/js/modules/importer.js +1 -1
- umap/static/umap/js/modules/managers.js +46 -0
- umap/static/umap/js/modules/permissions.js +1 -1
- umap/static/umap/js/modules/rendering/controls.js +251 -0
- umap/static/umap/js/modules/rendering/layers/heat.js +5 -0
- umap/static/umap/js/modules/rendering/map.js +21 -10
- umap/static/umap/js/modules/rendering/ui.js +0 -1
- umap/static/umap/js/modules/rules.js +56 -46
- umap/static/umap/js/modules/schema.js +5 -1
- umap/static/umap/js/modules/share.js +2 -2
- umap/static/umap/js/modules/slideshow.js +1 -1
- umap/static/umap/js/modules/sync/engine.js +23 -9
- umap/static/umap/js/modules/ui/bar.js +2 -2
- umap/static/umap/js/modules/ui/base.js +13 -0
- umap/static/umap/js/modules/umap.js +70 -113
- umap/static/umap/js/umap.controls.js +0 -310
- umap/static/umap/js/umap.core.js +0 -40
- umap/static/umap/locale/am_ET.js +8 -3
- umap/static/umap/locale/am_ET.json +8 -3
- umap/static/umap/locale/ar.js +8 -3
- umap/static/umap/locale/ar.json +8 -3
- umap/static/umap/locale/ast.js +8 -3
- umap/static/umap/locale/ast.json +8 -3
- umap/static/umap/locale/bg.js +8 -3
- umap/static/umap/locale/bg.json +8 -3
- umap/static/umap/locale/br.js +8 -3
- umap/static/umap/locale/br.json +8 -3
- umap/static/umap/locale/ca.js +27 -22
- umap/static/umap/locale/ca.json +27 -22
- umap/static/umap/locale/cs_CZ.js +5 -2
- umap/static/umap/locale/cs_CZ.json +5 -2
- umap/static/umap/locale/da.js +8 -3
- umap/static/umap/locale/da.json +8 -3
- umap/static/umap/locale/de.js +5 -2
- umap/static/umap/locale/de.json +5 -2
- umap/static/umap/locale/el.js +92 -87
- umap/static/umap/locale/el.json +92 -87
- umap/static/umap/locale/en.js +5 -2
- umap/static/umap/locale/en.json +5 -2
- umap/static/umap/locale/en_US.json +8 -3
- umap/static/umap/locale/es.js +18 -15
- umap/static/umap/locale/es.json +18 -15
- umap/static/umap/locale/et.js +8 -3
- umap/static/umap/locale/et.json +8 -3
- umap/static/umap/locale/eu.js +5 -2
- umap/static/umap/locale/eu.json +5 -2
- umap/static/umap/locale/fa_IR.js +5 -2
- umap/static/umap/locale/fa_IR.json +5 -2
- umap/static/umap/locale/fi.js +8 -3
- umap/static/umap/locale/fi.json +8 -3
- umap/static/umap/locale/fr.js +5 -2
- umap/static/umap/locale/fr.json +5 -2
- umap/static/umap/locale/gl.js +5 -2
- umap/static/umap/locale/gl.json +5 -2
- umap/static/umap/locale/he.js +8 -3
- umap/static/umap/locale/he.json +8 -3
- umap/static/umap/locale/hr.js +8 -3
- umap/static/umap/locale/hr.json +8 -3
- umap/static/umap/locale/hu.js +5 -2
- umap/static/umap/locale/hu.json +5 -2
- umap/static/umap/locale/id.js +8 -3
- umap/static/umap/locale/id.json +8 -3
- umap/static/umap/locale/is.js +8 -3
- umap/static/umap/locale/is.json +8 -3
- umap/static/umap/locale/it.js +5 -2
- umap/static/umap/locale/it.json +5 -2
- umap/static/umap/locale/ja.js +8 -3
- umap/static/umap/locale/ja.json +8 -3
- umap/static/umap/locale/ko.js +8 -3
- umap/static/umap/locale/ko.json +8 -3
- umap/static/umap/locale/lt.js +8 -3
- umap/static/umap/locale/lt.json +8 -3
- umap/static/umap/locale/ms.js +8 -3
- umap/static/umap/locale/ms.json +8 -3
- umap/static/umap/locale/nl.js +7 -4
- umap/static/umap/locale/nl.json +7 -4
- umap/static/umap/locale/no.js +8 -3
- umap/static/umap/locale/no.json +8 -3
- umap/static/umap/locale/pl.js +8 -3
- umap/static/umap/locale/pl.json +8 -3
- umap/static/umap/locale/pl_PL.json +8 -3
- umap/static/umap/locale/pt.js +5 -2
- umap/static/umap/locale/pt.json +5 -2
- umap/static/umap/locale/pt_BR.js +8 -3
- umap/static/umap/locale/pt_BR.json +8 -3
- umap/static/umap/locale/pt_PT.js +5 -2
- umap/static/umap/locale/pt_PT.json +5 -2
- umap/static/umap/locale/ro.js +8 -3
- umap/static/umap/locale/ro.json +8 -3
- umap/static/umap/locale/ru.js +8 -3
- umap/static/umap/locale/ru.json +8 -3
- umap/static/umap/locale/sk_SK.js +8 -3
- umap/static/umap/locale/sk_SK.json +8 -3
- umap/static/umap/locale/sl.js +8 -3
- umap/static/umap/locale/sl.json +8 -3
- umap/static/umap/locale/sr.js +8 -3
- umap/static/umap/locale/sr.json +8 -3
- umap/static/umap/locale/sv.js +8 -3
- umap/static/umap/locale/sv.json +8 -3
- umap/static/umap/locale/th_TH.js +8 -3
- umap/static/umap/locale/th_TH.json +8 -3
- umap/static/umap/locale/tr.js +8 -3
- umap/static/umap/locale/tr.json +8 -3
- umap/static/umap/locale/uk_UA.js +8 -3
- umap/static/umap/locale/uk_UA.json +8 -3
- umap/static/umap/locale/vi.js +8 -3
- umap/static/umap/locale/vi.json +8 -3
- umap/static/umap/locale/vi_VN.json +8 -3
- umap/static/umap/locale/zh.js +8 -3
- umap/static/umap/locale/zh.json +8 -3
- umap/static/umap/locale/zh_CN.json +8 -3
- umap/static/umap/locale/zh_TW.Big5.json +8 -3
- umap/static/umap/locale/zh_TW.js +5 -2
- umap/static/umap/locale/zh_TW.json +5 -2
- umap/static/umap/map.css +11 -33
- umap/static/umap/vars.css +4 -0
- umap/static/umap/vendors/togeojson/togeojson.es.js +350 -177
- umap/static/umap/vendors/togeojson/togeojson.es.mjs.map +1 -1
- umap/templates/umap/design_system.html +355 -0
- umap/tests/base.py +2 -2
- umap/tests/fixtures/heatmap_data.json +1044 -0
- umap/tests/integration/test_browser.py +3 -3
- umap/tests/integration/test_conditional_rules.py +2 -2
- umap/tests/integration/test_datalayer.py +0 -1
- umap/tests/integration/test_edit_map.py +7 -7
- umap/tests/integration/test_facets_browser.py +2 -2
- umap/tests/integration/test_heatmap.py +41 -0
- umap/tests/integration/test_iframe.py +25 -0
- umap/tests/integration/test_import.py +58 -1
- umap/tests/integration/test_map.py +7 -8
- umap/tests/integration/test_optimistic_merge.py +12 -4
- umap/tests/integration/test_querystring.py +1 -1
- umap/tests/integration/test_remote_data.py +79 -0
- umap/tests/integration/test_websocket_sync.py +2 -2
- umap/urls.py +1 -0
- umap/views.py +7 -0
- {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/METADATA +8 -8
- {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/RECORD +161 -154
- {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/WHEEL +0 -0
- {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/entry_points.txt +0 -0
- {umap_project-3.0.3.dist-info → umap_project-3.0.5.dist-info}/licenses/LICENSE +0 -0
|
@@ -1,183 +1,3 @@
|
|
|
1
|
-
U.HomeControl = L.Control.extend({
|
|
2
|
-
options: {
|
|
3
|
-
position: 'topleft',
|
|
4
|
-
},
|
|
5
|
-
|
|
6
|
-
onAdd: (map) => {
|
|
7
|
-
const path = map._umap.getStaticPathFor('home.svg')
|
|
8
|
-
const container = U.Utils.loadTemplate(
|
|
9
|
-
`<a href="/" class="home-button" title="${L._('Back to home')}"><img src="${path}" alt="${L._('Home logo')}" width="38px" height="38px" /></a>`
|
|
10
|
-
)
|
|
11
|
-
return container
|
|
12
|
-
},
|
|
13
|
-
})
|
|
14
|
-
|
|
15
|
-
U.EditControl = L.Control.extend({
|
|
16
|
-
options: {
|
|
17
|
-
position: 'topright',
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
onAdd: function (map) {
|
|
21
|
-
const container = L.DomUtil.create('div', 'edit-enable')
|
|
22
|
-
const enableEditing = L.DomUtil.createButton(
|
|
23
|
-
'',
|
|
24
|
-
container,
|
|
25
|
-
L._('Edit'),
|
|
26
|
-
map._umap.enableEdit,
|
|
27
|
-
map._umap
|
|
28
|
-
)
|
|
29
|
-
L.DomEvent.on(
|
|
30
|
-
enableEditing,
|
|
31
|
-
'mouseover',
|
|
32
|
-
() => {
|
|
33
|
-
map._umap.tooltip.open({
|
|
34
|
-
content: map._umap.help.displayLabel('TOGGLE_EDIT'),
|
|
35
|
-
anchor: enableEditing,
|
|
36
|
-
position: 'bottom',
|
|
37
|
-
delay: 750,
|
|
38
|
-
duration: 5000,
|
|
39
|
-
})
|
|
40
|
-
},
|
|
41
|
-
this
|
|
42
|
-
)
|
|
43
|
-
|
|
44
|
-
return container
|
|
45
|
-
},
|
|
46
|
-
})
|
|
47
|
-
|
|
48
|
-
U.MoreControls = L.Control.extend({
|
|
49
|
-
options: {
|
|
50
|
-
position: 'topleft',
|
|
51
|
-
},
|
|
52
|
-
|
|
53
|
-
onAdd: function () {
|
|
54
|
-
const container = L.DomUtil.create('div', 'umap-control-text')
|
|
55
|
-
const moreButton = L.DomUtil.createButton(
|
|
56
|
-
'umap-control-more',
|
|
57
|
-
container,
|
|
58
|
-
L._('More controls'),
|
|
59
|
-
this.toggle,
|
|
60
|
-
this
|
|
61
|
-
)
|
|
62
|
-
const lessButton = L.DomUtil.createButton(
|
|
63
|
-
'umap-control-less',
|
|
64
|
-
container,
|
|
65
|
-
L._('Hide controls'),
|
|
66
|
-
this.toggle,
|
|
67
|
-
this
|
|
68
|
-
)
|
|
69
|
-
return container
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
toggle: function () {
|
|
73
|
-
const pos = this.getPosition()
|
|
74
|
-
const corner = this._map._controlCorners[pos]
|
|
75
|
-
const className = 'umap-more-controls'
|
|
76
|
-
if (L.DomUtil.hasClass(corner, className)) L.DomUtil.removeClass(corner, className)
|
|
77
|
-
else L.DomUtil.addClass(corner, className)
|
|
78
|
-
},
|
|
79
|
-
})
|
|
80
|
-
|
|
81
|
-
U.PermanentCreditsControl = L.Control.extend({
|
|
82
|
-
options: {
|
|
83
|
-
position: 'bottomleft',
|
|
84
|
-
},
|
|
85
|
-
|
|
86
|
-
initialize: function (map, options) {
|
|
87
|
-
this.map = map
|
|
88
|
-
L.Control.prototype.initialize.call(this, options)
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
onAdd: function () {
|
|
92
|
-
this.paragraphContainer = L.DomUtil.create(
|
|
93
|
-
'div',
|
|
94
|
-
'umap-permanent-credits-container text'
|
|
95
|
-
)
|
|
96
|
-
this.setCredits()
|
|
97
|
-
this.setBackground()
|
|
98
|
-
return this.paragraphContainer
|
|
99
|
-
},
|
|
100
|
-
|
|
101
|
-
setCredits: function () {
|
|
102
|
-
this.paragraphContainer.innerHTML = U.Utils.toHTML(this.map.options.permanentCredit)
|
|
103
|
-
},
|
|
104
|
-
|
|
105
|
-
setBackground: function () {
|
|
106
|
-
if (this.map.options.permanentCreditBackground) {
|
|
107
|
-
this.paragraphContainer.style.backgroundColor = '#FFFFFFB0'
|
|
108
|
-
} else {
|
|
109
|
-
this.paragraphContainer.style.backgroundColor = ''
|
|
110
|
-
}
|
|
111
|
-
},
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
L.Control.Button = L.Control.extend({
|
|
115
|
-
initialize: function (umap, options) {
|
|
116
|
-
this._umap = umap
|
|
117
|
-
L.Control.prototype.initialize.call(this, options)
|
|
118
|
-
},
|
|
119
|
-
|
|
120
|
-
getClassName: function () {
|
|
121
|
-
return this.options.className
|
|
122
|
-
},
|
|
123
|
-
|
|
124
|
-
onAdd: function (map) {
|
|
125
|
-
const container = L.DomUtil.create('div', `${this.getClassName()} umap-control`)
|
|
126
|
-
const button = L.DomUtil.createButton(
|
|
127
|
-
'',
|
|
128
|
-
container,
|
|
129
|
-
this.options.title,
|
|
130
|
-
this.onClick,
|
|
131
|
-
this
|
|
132
|
-
)
|
|
133
|
-
L.DomEvent.on(button, 'dblclick', L.DomEvent.stopPropagation)
|
|
134
|
-
this.afterAdd(container)
|
|
135
|
-
return container
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
afterAdd: (container) => {},
|
|
139
|
-
})
|
|
140
|
-
|
|
141
|
-
U.DataLayersControl = L.Control.Button.extend({
|
|
142
|
-
options: {
|
|
143
|
-
position: 'topleft',
|
|
144
|
-
className: 'umap-control-browse',
|
|
145
|
-
title: L._('Open browser'),
|
|
146
|
-
},
|
|
147
|
-
|
|
148
|
-
afterAdd: function (container) {
|
|
149
|
-
U.Utils.toggleBadge(container, this._umap.browser?.hasFilters())
|
|
150
|
-
},
|
|
151
|
-
|
|
152
|
-
onClick: function () {
|
|
153
|
-
this._umap.openBrowser()
|
|
154
|
-
},
|
|
155
|
-
})
|
|
156
|
-
|
|
157
|
-
U.CaptionControl = L.Control.Button.extend({
|
|
158
|
-
options: {
|
|
159
|
-
position: 'topleft',
|
|
160
|
-
className: 'umap-control-caption',
|
|
161
|
-
title: L._('About'),
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
onClick: function () {
|
|
165
|
-
this._umap.openCaption()
|
|
166
|
-
},
|
|
167
|
-
})
|
|
168
|
-
|
|
169
|
-
L.Control.Embed = L.Control.Button.extend({
|
|
170
|
-
options: {
|
|
171
|
-
position: 'topleft',
|
|
172
|
-
title: L._('Share and download'),
|
|
173
|
-
className: 'leaflet-control-embed umap-control',
|
|
174
|
-
},
|
|
175
|
-
|
|
176
|
-
onClick: function () {
|
|
177
|
-
this._umap.share.open()
|
|
178
|
-
},
|
|
179
|
-
})
|
|
180
|
-
|
|
181
1
|
/* Used in view mode to define the current tilelayer */
|
|
182
2
|
U.TileLayerControl = L.Control.IconLayers.extend({
|
|
183
3
|
initialize: function (map, options) {
|
|
@@ -238,128 +58,6 @@ U.TileLayerControl = L.Control.IconLayers.extend({
|
|
|
238
58
|
},
|
|
239
59
|
})
|
|
240
60
|
|
|
241
|
-
/* Used in edit mode to define the default tilelayer */
|
|
242
|
-
U.TileLayerChooser = L.Control.extend({
|
|
243
|
-
options: {
|
|
244
|
-
position: 'topleft',
|
|
245
|
-
},
|
|
246
|
-
|
|
247
|
-
initialize: function (map, options = {}) {
|
|
248
|
-
this.map = map
|
|
249
|
-
L.Control.prototype.initialize.call(this, options)
|
|
250
|
-
},
|
|
251
|
-
|
|
252
|
-
onAdd: function () {
|
|
253
|
-
const container = L.DomUtil.create('div', 'leaflet-control-tilelayers umap-control')
|
|
254
|
-
const changeMapBackgroundButton = L.DomUtil.createButton(
|
|
255
|
-
'',
|
|
256
|
-
container,
|
|
257
|
-
L._('Change map background'),
|
|
258
|
-
this.openSwitcher,
|
|
259
|
-
this
|
|
260
|
-
)
|
|
261
|
-
L.DomEvent.on(changeMapBackgroundButton, 'dblclick', L.DomEvent.stopPropagation)
|
|
262
|
-
return container
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
openSwitcher: function (options = {}) {
|
|
266
|
-
const container = L.DomUtil.create('div', 'umap-edit-tilelayers')
|
|
267
|
-
L.DomUtil.createTitle(container, L._('Change tilelayers'), 'icon-tilelayer')
|
|
268
|
-
this._tilelayers_container = L.DomUtil.create('ul', '', container)
|
|
269
|
-
this.buildList(options)
|
|
270
|
-
const panel = options.edit ? this.map._umap.editPanel : this.map._umap.panel
|
|
271
|
-
panel.open({ content: container, highlight: 'tilelayers' })
|
|
272
|
-
},
|
|
273
|
-
|
|
274
|
-
buildList: function (options) {
|
|
275
|
-
this.map.eachTileLayer(function (tilelayer) {
|
|
276
|
-
if (
|
|
277
|
-
window.location.protocol === 'https:' &&
|
|
278
|
-
tilelayer.options.url_template.indexOf('http:') === 0
|
|
279
|
-
)
|
|
280
|
-
return
|
|
281
|
-
this.addTileLayerElement(tilelayer, options)
|
|
282
|
-
}, this)
|
|
283
|
-
},
|
|
284
|
-
|
|
285
|
-
addTileLayerElement: function (tilelayer, options) {
|
|
286
|
-
const selectedClass = this.map.hasLayer(tilelayer) ? 'selected' : ''
|
|
287
|
-
const el = L.DomUtil.create('li', selectedClass, this._tilelayers_container)
|
|
288
|
-
const img = L.DomUtil.create('img', '', el)
|
|
289
|
-
const name = L.DomUtil.create('div', '', el)
|
|
290
|
-
img.src = U.Utils.template(
|
|
291
|
-
tilelayer.options.url_template,
|
|
292
|
-
this.map.options.demoTileInfos
|
|
293
|
-
)
|
|
294
|
-
img.loading = 'lazy'
|
|
295
|
-
name.textContent = tilelayer.options.name
|
|
296
|
-
L.DomEvent.on(
|
|
297
|
-
el,
|
|
298
|
-
'click',
|
|
299
|
-
() => {
|
|
300
|
-
const oldTileLayer = this.map._umap.properties.tilelayer
|
|
301
|
-
this.map.selectTileLayer(tilelayer)
|
|
302
|
-
this.map._controls.tilelayers.setLayers()
|
|
303
|
-
if (options?.edit) {
|
|
304
|
-
this.map._umap.properties.tilelayer = tilelayer.toJSON()
|
|
305
|
-
this.map._umap.isDirty = true
|
|
306
|
-
this.map._umap.sync.update(
|
|
307
|
-
'properties.tilelayer',
|
|
308
|
-
this.map._umap.properties.tilelayer,
|
|
309
|
-
oldTileLayer
|
|
310
|
-
)
|
|
311
|
-
}
|
|
312
|
-
},
|
|
313
|
-
this
|
|
314
|
-
)
|
|
315
|
-
},
|
|
316
|
-
})
|
|
317
|
-
|
|
318
|
-
U.AttributionControl = L.Control.Attribution.extend({
|
|
319
|
-
options: {
|
|
320
|
-
prefix: '',
|
|
321
|
-
},
|
|
322
|
-
|
|
323
|
-
_update: function () {
|
|
324
|
-
// Layer is no more on the map
|
|
325
|
-
if (!this._map) return
|
|
326
|
-
L.Control.Attribution.prototype._update.call(this)
|
|
327
|
-
// Use our own container, so we can hide/show on small screens
|
|
328
|
-
const credits = this._container.innerHTML
|
|
329
|
-
this._container.innerHTML = ''
|
|
330
|
-
const container = L.DomUtil.create('div', 'attribution-container', this._container)
|
|
331
|
-
container.innerHTML = credits
|
|
332
|
-
const shortCredit = this._map._umap.getProperty('shortCredit')
|
|
333
|
-
const captionMenus = this._map._umap.getProperty('captionMenus')
|
|
334
|
-
if (shortCredit) {
|
|
335
|
-
L.DomUtil.element({
|
|
336
|
-
tagName: 'span',
|
|
337
|
-
parent: container,
|
|
338
|
-
safeHTML: ` — ${U.Utils.toHTML(shortCredit)}`,
|
|
339
|
-
})
|
|
340
|
-
}
|
|
341
|
-
if (captionMenus) {
|
|
342
|
-
const link = L.DomUtil.add('a', '', container, ` — ${L._('Open caption')}`)
|
|
343
|
-
L.DomEvent.on(link, 'click', L.DomEvent.stop)
|
|
344
|
-
.on(link, 'click', () => this._map._umap.openCaption())
|
|
345
|
-
.on(link, 'dblclick', L.DomEvent.stop)
|
|
346
|
-
}
|
|
347
|
-
if (window.top === window.self && captionMenus) {
|
|
348
|
-
// We are not in iframe mode
|
|
349
|
-
L.DomUtil.createLink('', container, ` — ${L._('Home')}`, '/')
|
|
350
|
-
}
|
|
351
|
-
if (captionMenus) {
|
|
352
|
-
L.DomUtil.createLink(
|
|
353
|
-
'',
|
|
354
|
-
container,
|
|
355
|
-
` — ${L._('Powered by uMap')}`,
|
|
356
|
-
'https://umap-project.org/'
|
|
357
|
-
)
|
|
358
|
-
}
|
|
359
|
-
L.DomUtil.createLink('attribution-toggle', this._container, '')
|
|
360
|
-
},
|
|
361
|
-
})
|
|
362
|
-
|
|
363
61
|
/*
|
|
364
62
|
* Take control over L.Control.Locate to be able to
|
|
365
63
|
* call start() before adding the control (and thus the button) to the map.
|
|
@@ -461,7 +159,6 @@ U.Search = L.PhotonSearch.extend({
|
|
|
461
159
|
event.stopPropagation()
|
|
462
160
|
const datalayer = this.map._umap.defaultEditDataLayer()
|
|
463
161
|
const marker = datalayer.makeFeature(feature)
|
|
464
|
-
marker.isDirty = true
|
|
465
162
|
marker.edit()
|
|
466
163
|
})
|
|
467
164
|
geom.addEventListener('mousedown', async (event) => {
|
|
@@ -602,14 +299,8 @@ U.Editable = L.Editable.extend({
|
|
|
602
299
|
if (event.layer instanceof U.LeafletMarker) event.layer.feature.del()
|
|
603
300
|
})
|
|
604
301
|
this.on('editable:drawing:commit', function (event) {
|
|
605
|
-
event.layer.feature.isDirty = true
|
|
606
302
|
if (this._umap.editedFeature !== event.layer) event.layer.feature.edit(event)
|
|
607
303
|
})
|
|
608
|
-
this.on('editable:editing', (event) => {
|
|
609
|
-
const feature = event.layer.feature
|
|
610
|
-
feature.isDirty = true
|
|
611
|
-
// feature.pullGeometry(false)
|
|
612
|
-
})
|
|
613
304
|
this.on('editable:vertex:ctrlclick', (event) => {
|
|
614
305
|
const index = event.vertex.getIndex()
|
|
615
306
|
if (
|
|
@@ -663,7 +354,6 @@ U.Editable = L.Editable.extend({
|
|
|
663
354
|
// Overrided from Leaflet.Editable
|
|
664
355
|
const datalayer = this._umap.defaultEditDataLayer()
|
|
665
356
|
datalayer.addFeature(layer.feature)
|
|
666
|
-
layer.isDirty = true
|
|
667
357
|
return layer
|
|
668
358
|
},
|
|
669
359
|
|
umap/static/umap/js/umap.core.js
CHANGED
|
@@ -65,18 +65,6 @@ L.DomUtil.createButton = (className, container, content, callback, context) => {
|
|
|
65
65
|
return el
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
L.DomUtil.createLink = (className, container, content, url, target, title) => {
|
|
69
|
-
const el = L.DomUtil.add('a', className, container, content)
|
|
70
|
-
el.href = url
|
|
71
|
-
if (target) {
|
|
72
|
-
el.target = target
|
|
73
|
-
}
|
|
74
|
-
if (title) {
|
|
75
|
-
el.title = title
|
|
76
|
-
}
|
|
77
|
-
return el
|
|
78
|
-
}
|
|
79
|
-
|
|
80
68
|
L.DomUtil.createIcon = (parent, className, title, size = 16) => {
|
|
81
69
|
return L.DomUtil.element({
|
|
82
70
|
tagName: 'i',
|
|
@@ -140,16 +128,6 @@ L.DomUtil.element = ({ tagName, parent, ...attrs }) => {
|
|
|
140
128
|
return el
|
|
141
129
|
}
|
|
142
130
|
|
|
143
|
-
L.DomUtil.before = (target, el) => {
|
|
144
|
-
target.parentNode.insertBefore(el, target)
|
|
145
|
-
return el
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
L.DomUtil.after = (target, el) => {
|
|
149
|
-
target.parentNode.insertBefore(el, target.nextSibling)
|
|
150
|
-
return el
|
|
151
|
-
}
|
|
152
|
-
|
|
153
131
|
// From https://gist.github.com/Accudio/b9cb16e0e3df858cef0d31e38f1fe46f
|
|
154
132
|
// convert colour in range 0-255 to the modifier used within luminance calculation
|
|
155
133
|
L.DomUtil.colourMod = (colour) => {
|
|
@@ -214,24 +192,6 @@ L.DomUtil.contrastedColor = (el, bgcolor) => {
|
|
|
214
192
|
if (bgcolor) _CACHE_CONSTRAST[bgcolor] = out
|
|
215
193
|
return out
|
|
216
194
|
}
|
|
217
|
-
L.DomEvent.once = (el, types, fn, context) => {
|
|
218
|
-
// cf https://github.com/Leaflet/Leaflet/pull/3528#issuecomment-134551575
|
|
219
|
-
|
|
220
|
-
if (typeof types === 'object') {
|
|
221
|
-
for (const type in types) {
|
|
222
|
-
L.DomEvent.once(el, type, types[type], fn)
|
|
223
|
-
}
|
|
224
|
-
return L.DomEvent
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
const handler = L.bind(() => {
|
|
228
|
-
L.DomEvent.off(el, types, fn, context).off(el, types, handler, context)
|
|
229
|
-
}, L.DomEvent)
|
|
230
|
-
|
|
231
|
-
// add a listener that's executed once and removed after that
|
|
232
|
-
return L.DomEvent.on(el, types, fn, context).on(el, types, handler, context)
|
|
233
|
-
}
|
|
234
|
-
|
|
235
195
|
L.LatLng.prototype.isValid = function () {
|
|
236
196
|
return (
|
|
237
197
|
Number.isFinite(this.lat) &&
|
umap/static/umap/locale/am_ET.js
CHANGED
|
@@ -45,7 +45,6 @@ const locale = {
|
|
|
45
45
|
"Cache proxied request": "Cache proxied request",
|
|
46
46
|
"Caption": "ካፕሽን",
|
|
47
47
|
"Center map on your location": "መገኛዎን የሚያሳየውን ካርታ ወደ መሀል ያድርጉ",
|
|
48
|
-
"Change map background": "የካርታውን የጀርባ ገፅታ ይቀይሩ",
|
|
49
48
|
"Change tilelayers": "የታይልሌየሩን",
|
|
50
49
|
"Change": "Change",
|
|
51
50
|
"Choose the data format": "የረጃውን ፎርማት ቀይር",
|
|
@@ -457,7 +456,6 @@ const locale = {
|
|
|
457
456
|
"Choose this dataset": "Choose this dataset",
|
|
458
457
|
"GeoDataMine: thematic data from OpenStreetMap": "GeoDataMine: thematic data from OpenStreetMap",
|
|
459
458
|
"Choose a theme": "Choose a theme",
|
|
460
|
-
"Symplify all geometries to points": "Symplify all geometries to points",
|
|
461
459
|
"Choose this data": "Choose this data",
|
|
462
460
|
"Search admin boundary": "Search admin boundary",
|
|
463
461
|
"Please choose a theme and a boundary first.": "Please choose a theme and a boundary first.",
|
|
@@ -538,7 +536,14 @@ const locale = {
|
|
|
538
536
|
"Images": "Images",
|
|
539
537
|
"Iframes": "Iframes",
|
|
540
538
|
"Tags": "Tags",
|
|
541
|
-
"Geocode": "Geocode"
|
|
539
|
+
"Geocode": "Geocode",
|
|
540
|
+
"Display the back to home icon": "Display the back to home icon",
|
|
541
|
+
"Do you want to display layer switcher in caption bar?": "Do you want to display layer switcher in caption bar?",
|
|
542
|
+
"Simplify all geometries to points": "Simplify all geometries to points",
|
|
543
|
+
"Back to list": "Back to list",
|
|
544
|
+
"Toggle rule": "Toggle rule",
|
|
545
|
+
"Delete rule": "Delete rule",
|
|
546
|
+
"Cannot save layer, please try again in a few minutes.": "Cannot save layer, please try again in a few minutes."
|
|
542
547
|
}
|
|
543
548
|
L.registerLocale("am_ET", locale)
|
|
544
549
|
L.setLocale("am_ET")
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Cache proxied request": "Cache proxied request",
|
|
46
46
|
"Caption": "ካፕሽን",
|
|
47
47
|
"Center map on your location": "መገኛዎን የሚያሳየውን ካርታ ወደ መሀል ያድርጉ",
|
|
48
|
-
"Change map background": "የካርታውን የጀርባ ገፅታ ይቀይሩ",
|
|
49
48
|
"Change tilelayers": "የታይልሌየሩን",
|
|
50
49
|
"Change": "Change",
|
|
51
50
|
"Choose the data format": "የረጃውን ፎርማት ቀይር",
|
|
@@ -457,7 +456,6 @@
|
|
|
457
456
|
"Choose this dataset": "Choose this dataset",
|
|
458
457
|
"GeoDataMine: thematic data from OpenStreetMap": "GeoDataMine: thematic data from OpenStreetMap",
|
|
459
458
|
"Choose a theme": "Choose a theme",
|
|
460
|
-
"Symplify all geometries to points": "Symplify all geometries to points",
|
|
461
459
|
"Choose this data": "Choose this data",
|
|
462
460
|
"Search admin boundary": "Search admin boundary",
|
|
463
461
|
"Please choose a theme and a boundary first.": "Please choose a theme and a boundary first.",
|
|
@@ -538,5 +536,12 @@
|
|
|
538
536
|
"Images": "Images",
|
|
539
537
|
"Iframes": "Iframes",
|
|
540
538
|
"Tags": "Tags",
|
|
541
|
-
"Geocode": "Geocode"
|
|
539
|
+
"Geocode": "Geocode",
|
|
540
|
+
"Display the back to home icon": "Display the back to home icon",
|
|
541
|
+
"Do you want to display layer switcher in caption bar?": "Do you want to display layer switcher in caption bar?",
|
|
542
|
+
"Simplify all geometries to points": "Simplify all geometries to points",
|
|
543
|
+
"Back to list": "Back to list",
|
|
544
|
+
"Toggle rule": "Toggle rule",
|
|
545
|
+
"Delete rule": "Delete rule",
|
|
546
|
+
"Cannot save layer, please try again in a few minutes.": "Cannot save layer, please try again in a few minutes."
|
|
542
547
|
}
|
umap/static/umap/locale/ar.js
CHANGED
|
@@ -45,7 +45,6 @@ const locale = {
|
|
|
45
45
|
"Cache proxied request": "Cache proxied request",
|
|
46
46
|
"Caption": "شرح",
|
|
47
47
|
"Center map on your location": "Center map on your location",
|
|
48
|
-
"Change map background": "Change map background",
|
|
49
48
|
"Change tilelayers": "Change tilelayers",
|
|
50
49
|
"Change": "Change",
|
|
51
50
|
"Choose the data format": "اختر تنسيق البيانات",
|
|
@@ -457,7 +456,6 @@ const locale = {
|
|
|
457
456
|
"Choose this dataset": "Choose this dataset",
|
|
458
457
|
"GeoDataMine: thematic data from OpenStreetMap": "GeoDataMine: thematic data from OpenStreetMap",
|
|
459
458
|
"Choose a theme": "Choose a theme",
|
|
460
|
-
"Symplify all geometries to points": "Symplify all geometries to points",
|
|
461
459
|
"Choose this data": "Choose this data",
|
|
462
460
|
"Search admin boundary": "Search admin boundary",
|
|
463
461
|
"Please choose a theme and a boundary first.": "Please choose a theme and a boundary first.",
|
|
@@ -538,7 +536,14 @@ const locale = {
|
|
|
538
536
|
"Images": "Images",
|
|
539
537
|
"Iframes": "Iframes",
|
|
540
538
|
"Tags": "Tags",
|
|
541
|
-
"Geocode": "Geocode"
|
|
539
|
+
"Geocode": "Geocode",
|
|
540
|
+
"Display the back to home icon": "Display the back to home icon",
|
|
541
|
+
"Do you want to display layer switcher in caption bar?": "Do you want to display layer switcher in caption bar?",
|
|
542
|
+
"Simplify all geometries to points": "Simplify all geometries to points",
|
|
543
|
+
"Back to list": "Back to list",
|
|
544
|
+
"Toggle rule": "Toggle rule",
|
|
545
|
+
"Delete rule": "Delete rule",
|
|
546
|
+
"Cannot save layer, please try again in a few minutes.": "Cannot save layer, please try again in a few minutes."
|
|
542
547
|
}
|
|
543
548
|
L.registerLocale("ar", locale)
|
|
544
549
|
L.setLocale("ar")
|
umap/static/umap/locale/ar.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Cache proxied request": "Cache proxied request",
|
|
46
46
|
"Caption": "شرح",
|
|
47
47
|
"Center map on your location": "Center map on your location",
|
|
48
|
-
"Change map background": "Change map background",
|
|
49
48
|
"Change tilelayers": "Change tilelayers",
|
|
50
49
|
"Change": "Change",
|
|
51
50
|
"Choose the data format": "اختر تنسيق البيانات",
|
|
@@ -457,7 +456,6 @@
|
|
|
457
456
|
"Choose this dataset": "Choose this dataset",
|
|
458
457
|
"GeoDataMine: thematic data from OpenStreetMap": "GeoDataMine: thematic data from OpenStreetMap",
|
|
459
458
|
"Choose a theme": "Choose a theme",
|
|
460
|
-
"Symplify all geometries to points": "Symplify all geometries to points",
|
|
461
459
|
"Choose this data": "Choose this data",
|
|
462
460
|
"Search admin boundary": "Search admin boundary",
|
|
463
461
|
"Please choose a theme and a boundary first.": "Please choose a theme and a boundary first.",
|
|
@@ -538,5 +536,12 @@
|
|
|
538
536
|
"Images": "Images",
|
|
539
537
|
"Iframes": "Iframes",
|
|
540
538
|
"Tags": "Tags",
|
|
541
|
-
"Geocode": "Geocode"
|
|
539
|
+
"Geocode": "Geocode",
|
|
540
|
+
"Display the back to home icon": "Display the back to home icon",
|
|
541
|
+
"Do you want to display layer switcher in caption bar?": "Do you want to display layer switcher in caption bar?",
|
|
542
|
+
"Simplify all geometries to points": "Simplify all geometries to points",
|
|
543
|
+
"Back to list": "Back to list",
|
|
544
|
+
"Toggle rule": "Toggle rule",
|
|
545
|
+
"Delete rule": "Delete rule",
|
|
546
|
+
"Cannot save layer, please try again in a few minutes.": "Cannot save layer, please try again in a few minutes."
|
|
542
547
|
}
|
umap/static/umap/locale/ast.js
CHANGED
|
@@ -45,7 +45,6 @@ const locale = {
|
|
|
45
45
|
"Cache proxied request": "Cache proxied request",
|
|
46
46
|
"Caption": "Caption",
|
|
47
47
|
"Center map on your location": "Center map on your location",
|
|
48
|
-
"Change map background": "Change map background",
|
|
49
48
|
"Change tilelayers": "Change tilelayers",
|
|
50
49
|
"Change": "Change",
|
|
51
50
|
"Choose the data format": "Choose the data format",
|
|
@@ -457,7 +456,6 @@ const locale = {
|
|
|
457
456
|
"Choose this dataset": "Choose this dataset",
|
|
458
457
|
"GeoDataMine: thematic data from OpenStreetMap": "GeoDataMine: thematic data from OpenStreetMap",
|
|
459
458
|
"Choose a theme": "Choose a theme",
|
|
460
|
-
"Symplify all geometries to points": "Symplify all geometries to points",
|
|
461
459
|
"Choose this data": "Choose this data",
|
|
462
460
|
"Search admin boundary": "Search admin boundary",
|
|
463
461
|
"Please choose a theme and a boundary first.": "Please choose a theme and a boundary first.",
|
|
@@ -538,7 +536,14 @@ const locale = {
|
|
|
538
536
|
"Images": "Images",
|
|
539
537
|
"Iframes": "Iframes",
|
|
540
538
|
"Tags": "Tags",
|
|
541
|
-
"Geocode": "Geocode"
|
|
539
|
+
"Geocode": "Geocode",
|
|
540
|
+
"Display the back to home icon": "Display the back to home icon",
|
|
541
|
+
"Do you want to display layer switcher in caption bar?": "Do you want to display layer switcher in caption bar?",
|
|
542
|
+
"Simplify all geometries to points": "Simplify all geometries to points",
|
|
543
|
+
"Back to list": "Back to list",
|
|
544
|
+
"Toggle rule": "Toggle rule",
|
|
545
|
+
"Delete rule": "Delete rule",
|
|
546
|
+
"Cannot save layer, please try again in a few minutes.": "Cannot save layer, please try again in a few minutes."
|
|
542
547
|
}
|
|
543
548
|
L.registerLocale("ast", locale)
|
|
544
549
|
L.setLocale("ast")
|
umap/static/umap/locale/ast.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Cache proxied request": "Cache proxied request",
|
|
46
46
|
"Caption": "Caption",
|
|
47
47
|
"Center map on your location": "Center map on your location",
|
|
48
|
-
"Change map background": "Change map background",
|
|
49
48
|
"Change tilelayers": "Change tilelayers",
|
|
50
49
|
"Change": "Change",
|
|
51
50
|
"Choose the data format": "Choose the data format",
|
|
@@ -457,7 +456,6 @@
|
|
|
457
456
|
"Choose this dataset": "Choose this dataset",
|
|
458
457
|
"GeoDataMine: thematic data from OpenStreetMap": "GeoDataMine: thematic data from OpenStreetMap",
|
|
459
458
|
"Choose a theme": "Choose a theme",
|
|
460
|
-
"Symplify all geometries to points": "Symplify all geometries to points",
|
|
461
459
|
"Choose this data": "Choose this data",
|
|
462
460
|
"Search admin boundary": "Search admin boundary",
|
|
463
461
|
"Please choose a theme and a boundary first.": "Please choose a theme and a boundary first.",
|
|
@@ -538,5 +536,12 @@
|
|
|
538
536
|
"Images": "Images",
|
|
539
537
|
"Iframes": "Iframes",
|
|
540
538
|
"Tags": "Tags",
|
|
541
|
-
"Geocode": "Geocode"
|
|
539
|
+
"Geocode": "Geocode",
|
|
540
|
+
"Display the back to home icon": "Display the back to home icon",
|
|
541
|
+
"Do you want to display layer switcher in caption bar?": "Do you want to display layer switcher in caption bar?",
|
|
542
|
+
"Simplify all geometries to points": "Simplify all geometries to points",
|
|
543
|
+
"Back to list": "Back to list",
|
|
544
|
+
"Toggle rule": "Toggle rule",
|
|
545
|
+
"Delete rule": "Delete rule",
|
|
546
|
+
"Cannot save layer, please try again in a few minutes.": "Cannot save layer, please try again in a few minutes."
|
|
542
547
|
}
|
umap/static/umap/locale/bg.js
CHANGED
|
@@ -45,7 +45,6 @@ const locale = {
|
|
|
45
45
|
"Cache proxied request": "Cache proxied request",
|
|
46
46
|
"Caption": "Надпис",
|
|
47
47
|
"Center map on your location": "Center map on your location",
|
|
48
|
-
"Change map background": "Промяна фона на картата",
|
|
49
48
|
"Change tilelayers": "Променете слоевете",
|
|
50
49
|
"Change": "Change",
|
|
51
50
|
"Choose the data format": "Изберете формата на данните",
|
|
@@ -457,7 +456,6 @@ const locale = {
|
|
|
457
456
|
"Choose this dataset": "Choose this dataset",
|
|
458
457
|
"GeoDataMine: thematic data from OpenStreetMap": "GeoDataMine: thematic data from OpenStreetMap",
|
|
459
458
|
"Choose a theme": "Choose a theme",
|
|
460
|
-
"Symplify all geometries to points": "Symplify all geometries to points",
|
|
461
459
|
"Choose this data": "Choose this data",
|
|
462
460
|
"Search admin boundary": "Search admin boundary",
|
|
463
461
|
"Please choose a theme and a boundary first.": "Please choose a theme and a boundary first.",
|
|
@@ -538,7 +536,14 @@ const locale = {
|
|
|
538
536
|
"Images": "Images",
|
|
539
537
|
"Iframes": "Iframes",
|
|
540
538
|
"Tags": "Tags",
|
|
541
|
-
"Geocode": "Geocode"
|
|
539
|
+
"Geocode": "Geocode",
|
|
540
|
+
"Display the back to home icon": "Display the back to home icon",
|
|
541
|
+
"Do you want to display layer switcher in caption bar?": "Do you want to display layer switcher in caption bar?",
|
|
542
|
+
"Simplify all geometries to points": "Simplify all geometries to points",
|
|
543
|
+
"Back to list": "Back to list",
|
|
544
|
+
"Toggle rule": "Toggle rule",
|
|
545
|
+
"Delete rule": "Delete rule",
|
|
546
|
+
"Cannot save layer, please try again in a few minutes.": "Cannot save layer, please try again in a few minutes."
|
|
542
547
|
}
|
|
543
548
|
L.registerLocale("bg", locale)
|
|
544
549
|
L.setLocale("bg")
|
umap/static/umap/locale/bg.json
CHANGED
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
"Cache proxied request": "Cache proxied request",
|
|
46
46
|
"Caption": "Надпис",
|
|
47
47
|
"Center map on your location": "Center map on your location",
|
|
48
|
-
"Change map background": "Промяна фона на картата",
|
|
49
48
|
"Change tilelayers": "Променете слоевете",
|
|
50
49
|
"Change": "Change",
|
|
51
50
|
"Choose the data format": "Изберете формата на данните",
|
|
@@ -457,7 +456,6 @@
|
|
|
457
456
|
"Choose this dataset": "Choose this dataset",
|
|
458
457
|
"GeoDataMine: thematic data from OpenStreetMap": "GeoDataMine: thematic data from OpenStreetMap",
|
|
459
458
|
"Choose a theme": "Choose a theme",
|
|
460
|
-
"Symplify all geometries to points": "Symplify all geometries to points",
|
|
461
459
|
"Choose this data": "Choose this data",
|
|
462
460
|
"Search admin boundary": "Search admin boundary",
|
|
463
461
|
"Please choose a theme and a boundary first.": "Please choose a theme and a boundary first.",
|
|
@@ -538,5 +536,12 @@
|
|
|
538
536
|
"Images": "Images",
|
|
539
537
|
"Iframes": "Iframes",
|
|
540
538
|
"Tags": "Tags",
|
|
541
|
-
"Geocode": "Geocode"
|
|
539
|
+
"Geocode": "Geocode",
|
|
540
|
+
"Display the back to home icon": "Display the back to home icon",
|
|
541
|
+
"Do you want to display layer switcher in caption bar?": "Do you want to display layer switcher in caption bar?",
|
|
542
|
+
"Simplify all geometries to points": "Simplify all geometries to points",
|
|
543
|
+
"Back to list": "Back to list",
|
|
544
|
+
"Toggle rule": "Toggle rule",
|
|
545
|
+
"Delete rule": "Delete rule",
|
|
546
|
+
"Cannot save layer, please try again in a few minutes.": "Cannot save layer, please try again in a few minutes."
|
|
542
547
|
}
|