umap-project 1.9.2__py3-none-any.whl → 1.9.3__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.
- umap/__init__.py +1 -1
- umap/locale/cs_CZ/LC_MESSAGES/django.mo +0 -0
- umap/locale/cs_CZ/LC_MESSAGES/django.po +35 -34
- umap/locale/es/LC_MESSAGES/django.mo +0 -0
- umap/locale/es/LC_MESSAGES/django.po +27 -27
- umap/locale/it/LC_MESSAGES/django.mo +0 -0
- umap/locale/it/LC_MESSAGES/django.po +28 -27
- umap/static/umap/base.css +20 -1
- umap/static/umap/js/umap.controls.js +175 -26
- umap/static/umap/js/umap.js +53 -148
- umap/static/umap/locale/cs_CZ.js +39 -25
- umap/static/umap/locale/cs_CZ.json +39 -25
- umap/static/umap/locale/es.js +16 -2
- umap/static/umap/locale/es.json +16 -2
- umap/static/umap/locale/it.js +25 -11
- umap/static/umap/locale/it.json +25 -11
- umap/static/umap/locale/ms.js +16 -2
- umap/static/umap/locale/ms.json +16 -2
- umap/static/umap/vendors/flat-drop-files/flatdropfiles.umd.js +2 -0
- umap/static/umap/vendors/formbuilder/Leaflet.FormBuilder.js +0 -1
- {umap_project-1.9.2.dist-info → umap_project-1.9.3.dist-info}/METADATA +1 -1
- {umap_project-1.9.2.dist-info → umap_project-1.9.3.dist-info}/RECORD +25 -24
- {umap_project-1.9.2.dist-info → umap_project-1.9.3.dist-info}/WHEEL +0 -0
- {umap_project-1.9.2.dist-info → umap_project-1.9.3.dist-info}/entry_points.txt +0 -0
- {umap_project-1.9.2.dist-info → umap_project-1.9.3.dist-info}/licenses/LICENSE +0 -0
|
@@ -313,6 +313,54 @@ L.U.DrawToolbar = L.Toolbar.Control.extend({
|
|
|
313
313
|
},
|
|
314
314
|
})
|
|
315
315
|
|
|
316
|
+
L.U.DropControl = L.Class.extend({
|
|
317
|
+
|
|
318
|
+
initialize: function (map) {
|
|
319
|
+
this.map = map
|
|
320
|
+
this.dropzone = map._container
|
|
321
|
+
},
|
|
322
|
+
|
|
323
|
+
enable: function () {
|
|
324
|
+
L.DomEvent.on(this.dropzone, "dragenter", this.dragenter, this)
|
|
325
|
+
L.DomEvent.on(this.dropzone, "dragover", this.dragover, this)
|
|
326
|
+
L.DomEvent.on(this.dropzone, "drop", this.drop, this)
|
|
327
|
+
L.DomEvent.on(this.dropzone, "dragleave", this.dragleave, this)
|
|
328
|
+
},
|
|
329
|
+
|
|
330
|
+
disable: function () {
|
|
331
|
+
L.DomEvent.off(this.dropzone, "dragenter", this.dragenter, this)
|
|
332
|
+
L.DomEvent.off(this.dropzone, "dragover", this.dragover, this)
|
|
333
|
+
L.DomEvent.off(this.dropzone, "drop", this.drop, this)
|
|
334
|
+
L.DomEvent.off(this.dropzone, "dragleave", this.dragleave, this)
|
|
335
|
+
},
|
|
336
|
+
|
|
337
|
+
dragenter: function (e) {
|
|
338
|
+
L.DomEvent.stop(e)
|
|
339
|
+
this.map.scrollWheelZoom.disable()
|
|
340
|
+
this.dropzone.classList.add('umap-dragover')
|
|
341
|
+
},
|
|
342
|
+
|
|
343
|
+
dragover: function (e) {
|
|
344
|
+
L.DomEvent.stop(e)
|
|
345
|
+
},
|
|
346
|
+
|
|
347
|
+
drop: function (e) {
|
|
348
|
+
this.map.scrollWheelZoom.enable()
|
|
349
|
+
this.dropzone.classList.remove('umap-dragover')
|
|
350
|
+
L.DomEvent.stop(e)
|
|
351
|
+
for (let i = 0, file; (file = e.dataTransfer.files[i]); i++) {
|
|
352
|
+
this.map.processFileToImport(file)
|
|
353
|
+
}
|
|
354
|
+
this.map.onceDataLoaded(this.map.fitDataBounds)
|
|
355
|
+
},
|
|
356
|
+
|
|
357
|
+
dragleave: function () {
|
|
358
|
+
this.map.scrollWheelZoom.enable()
|
|
359
|
+
this.dropzone.classList.remove('umap-dragover')
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
})
|
|
363
|
+
|
|
316
364
|
L.U.EditControl = L.Control.extend({
|
|
317
365
|
options: {
|
|
318
366
|
position: 'topright',
|
|
@@ -1029,32 +1077,133 @@ L.U.Map.include({
|
|
|
1029
1077
|
this.ui.openPanel({ data: { html: container } })
|
|
1030
1078
|
},
|
|
1031
1079
|
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
const
|
|
1040
|
-
const
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
const
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1080
|
+
importPanel: function () {
|
|
1081
|
+
const container = L.DomUtil.create('div', 'umap-upload')
|
|
1082
|
+
const title = L.DomUtil.create('h4', '', container)
|
|
1083
|
+
const presetBox = L.DomUtil.create('div', 'formbox', container)
|
|
1084
|
+
const presetSelect = L.DomUtil.create('select', '', presetBox)
|
|
1085
|
+
const fileBox = L.DomUtil.create('div', 'formbox', container)
|
|
1086
|
+
const fileInput = L.DomUtil.create('input', '', fileBox)
|
|
1087
|
+
const urlInput = L.DomUtil.create('input', '', container)
|
|
1088
|
+
const rawInput = L.DomUtil.create('textarea', '', container)
|
|
1089
|
+
const typeLabel = L.DomUtil.create('label', '', container)
|
|
1090
|
+
const layerLabel = L.DomUtil.create('label', '', container)
|
|
1091
|
+
const clearLabel = L.DomUtil.create('label', '', container)
|
|
1092
|
+
const submitInput = L.DomUtil.create('input', '', container)
|
|
1093
|
+
const map = this
|
|
1094
|
+
let option
|
|
1095
|
+
const types = ['geojson', 'csv', 'gpx', 'kml', 'osm', 'georss', 'umap']
|
|
1096
|
+
title.textContent = L._('Import data')
|
|
1097
|
+
fileInput.type = 'file'
|
|
1098
|
+
fileInput.multiple = 'multiple'
|
|
1099
|
+
submitInput.type = 'button'
|
|
1100
|
+
submitInput.value = L._('Import')
|
|
1101
|
+
submitInput.className = 'button'
|
|
1102
|
+
typeLabel.textContent = L._('Choose the format of the data to import')
|
|
1103
|
+
this.help.button(typeLabel, 'importFormats')
|
|
1104
|
+
const typeInput = L.DomUtil.create('select', '', typeLabel)
|
|
1105
|
+
typeInput.name = 'format'
|
|
1106
|
+
layerLabel.textContent = L._('Choose the layer to import in')
|
|
1107
|
+
const layerInput = L.DomUtil.create('select', '', layerLabel)
|
|
1108
|
+
layerInput.name = 'datalayer'
|
|
1109
|
+
urlInput.type = 'text'
|
|
1110
|
+
urlInput.placeholder = L._('Provide an URL here')
|
|
1111
|
+
rawInput.placeholder = L._('Paste your data here')
|
|
1112
|
+
clearLabel.textContent = L._('Replace layer content')
|
|
1113
|
+
const clearFlag = L.DomUtil.create('input', '', clearLabel)
|
|
1114
|
+
clearFlag.type = 'checkbox'
|
|
1115
|
+
clearFlag.name = 'clear'
|
|
1116
|
+
this.eachDataLayerReverse((datalayer) => {
|
|
1117
|
+
if (datalayer.isLoaded() && !datalayer.isRemoteLayer()) {
|
|
1118
|
+
const id = L.stamp(datalayer)
|
|
1119
|
+
option = L.DomUtil.create('option', '', layerInput)
|
|
1120
|
+
option.value = id
|
|
1121
|
+
option.textContent = datalayer.options.name
|
|
1122
|
+
}
|
|
1123
|
+
})
|
|
1124
|
+
L.DomUtil.element(
|
|
1125
|
+
'option',
|
|
1126
|
+
{ value: '', textContent: L._('Import in a new layer') },
|
|
1127
|
+
layerInput
|
|
1128
|
+
)
|
|
1129
|
+
L.DomUtil.element(
|
|
1130
|
+
'option',
|
|
1131
|
+
{ value: '', textContent: L._('Choose the data format') },
|
|
1132
|
+
typeInput
|
|
1133
|
+
)
|
|
1134
|
+
for (let i = 0; i < types.length; i++) {
|
|
1135
|
+
option = L.DomUtil.create('option', '', typeInput)
|
|
1136
|
+
option.value = option.textContent = types[i]
|
|
1137
|
+
}
|
|
1138
|
+
if (this.options.importPresets.length) {
|
|
1139
|
+
const noPreset = L.DomUtil.create('option', '', presetSelect)
|
|
1140
|
+
noPreset.value = noPreset.textContent = L._('Choose a preset')
|
|
1141
|
+
for (let j = 0; j < this.options.importPresets.length; j++) {
|
|
1142
|
+
option = L.DomUtil.create('option', '', presetSelect)
|
|
1143
|
+
option.value = this.options.importPresets[j].url
|
|
1144
|
+
option.textContent = this.options.importPresets[j].label
|
|
1145
|
+
}
|
|
1146
|
+
} else {
|
|
1147
|
+
presetBox.style.display = 'none'
|
|
1148
|
+
}
|
|
1149
|
+
|
|
1150
|
+
const submit = function () {
|
|
1151
|
+
let type = typeInput.value
|
|
1152
|
+
const layerId = layerInput[layerInput.selectedIndex].value
|
|
1153
|
+
let layer
|
|
1154
|
+
if (type === 'umap') {
|
|
1155
|
+
this.once('postsync', function () {
|
|
1156
|
+
this.setView(this.latLng(this.options.center), this.options.zoom)
|
|
1157
|
+
})
|
|
1158
|
+
}
|
|
1159
|
+
if (layerId) layer = map.datalayers[layerId]
|
|
1160
|
+
if (layer && clearFlag.checked) layer.empty()
|
|
1161
|
+
if (fileInput.files.length) {
|
|
1162
|
+
for (let i = 0, file; (file = fileInput.files[i]); i++) {
|
|
1163
|
+
this.processFileToImport(file, layer, type)
|
|
1164
|
+
}
|
|
1165
|
+
} else {
|
|
1166
|
+
if (!type)
|
|
1167
|
+
return this.ui.alert({
|
|
1168
|
+
content: L._('Please choose a format'),
|
|
1169
|
+
level: 'error',
|
|
1170
|
+
})
|
|
1171
|
+
if (rawInput.value && type === 'umap') {
|
|
1172
|
+
try {
|
|
1173
|
+
this.importRaw(rawInput.value, type)
|
|
1174
|
+
} catch (e) {
|
|
1175
|
+
this.ui.alert({ content: L._('Invalid umap data'), level: 'error' })
|
|
1176
|
+
console.error(e)
|
|
1177
|
+
}
|
|
1178
|
+
} else {
|
|
1179
|
+
if (!layer) layer = this.createDataLayer()
|
|
1180
|
+
if (rawInput.value) layer.importRaw(rawInput.value, type)
|
|
1181
|
+
else if (urlInput.value) layer.importFromUrl(urlInput.value, type)
|
|
1182
|
+
else if (presetSelect.selectedIndex > 0)
|
|
1183
|
+
layer.importFromUrl(presetSelect[presetSelect.selectedIndex].value, type)
|
|
1184
|
+
}
|
|
1185
|
+
}
|
|
1186
|
+
}
|
|
1187
|
+
L.DomEvent.on(submitInput, 'click', submit, this)
|
|
1188
|
+
L.DomEvent.on(
|
|
1189
|
+
fileInput,
|
|
1190
|
+
'change',
|
|
1191
|
+
(e) => {
|
|
1192
|
+
let type = '',
|
|
1193
|
+
newType
|
|
1194
|
+
for (let i = 0; i < e.target.files.length; i++) {
|
|
1195
|
+
newType = L.Util.detectFileType(e.target.files[i])
|
|
1196
|
+
if (!type && newType) type = newType
|
|
1197
|
+
if (type && newType !== type) {
|
|
1198
|
+
type = ''
|
|
1199
|
+
break
|
|
1200
|
+
}
|
|
1201
|
+
}
|
|
1202
|
+
typeInput.value = type
|
|
1203
|
+
},
|
|
1204
|
+
this
|
|
1205
|
+
)
|
|
1206
|
+
this.ui.openPanel({ data: { html: container }, className: 'dark' })
|
|
1058
1207
|
},
|
|
1059
1208
|
})
|
|
1060
1209
|
|
umap/static/umap/js/umap.js
CHANGED
|
@@ -340,6 +340,7 @@ L.U.Map.include({
|
|
|
340
340
|
if (this.options.scrollWheelZoom) this.scrollWheelZoom.enable()
|
|
341
341
|
else this.scrollWheelZoom.disable()
|
|
342
342
|
this.browser = new L.U.Browser(this)
|
|
343
|
+
this.drop = new L.U.DropControl(this)
|
|
343
344
|
this.renderControls()
|
|
344
345
|
},
|
|
345
346
|
|
|
@@ -670,6 +671,12 @@ L.U.Map.include({
|
|
|
670
671
|
}
|
|
671
672
|
},
|
|
672
673
|
|
|
674
|
+
fitDataBounds: function () {
|
|
675
|
+
const bounds = this.getLayersBounds()
|
|
676
|
+
if (!this.hasData() || !bounds.isValid()) return false
|
|
677
|
+
this.fitBounds(bounds)
|
|
678
|
+
},
|
|
679
|
+
|
|
673
680
|
initCenter: function () {
|
|
674
681
|
if (this.options.hash && this._hash.parseHash(location.hash)) {
|
|
675
682
|
// FIXME An invalid hash will cause the load to fail
|
|
@@ -679,12 +686,7 @@ L.U.Map.include({
|
|
|
679
686
|
this._controls.locate.start()
|
|
680
687
|
} else if (this.options.defaultView === 'data') {
|
|
681
688
|
this.onceDataLoaded(() => {
|
|
682
|
-
|
|
683
|
-
if (!this.hasData() || !bounds.isValid()) {
|
|
684
|
-
this._setDefaultCenter()
|
|
685
|
-
return
|
|
686
|
-
}
|
|
687
|
-
this.fitBounds(bounds)
|
|
689
|
+
if (!this.fitDataBounds()) return this._setDefaultCenter()
|
|
688
690
|
})
|
|
689
691
|
} else if (this.options.defaultView === 'latest') {
|
|
690
692
|
this.onceDataLoaded(() => {
|
|
@@ -804,150 +806,51 @@ L.U.Map.include({
|
|
|
804
806
|
return geojson
|
|
805
807
|
},
|
|
806
808
|
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
const fileBox = L.DomUtil.create('div', 'formbox', container)
|
|
813
|
-
const fileInput = L.DomUtil.create('input', '', fileBox)
|
|
814
|
-
const urlInput = L.DomUtil.create('input', '', container)
|
|
815
|
-
const rawInput = L.DomUtil.create('textarea', '', container)
|
|
816
|
-
const typeLabel = L.DomUtil.create('label', '', container)
|
|
817
|
-
const layerLabel = L.DomUtil.create('label', '', container)
|
|
818
|
-
const clearLabel = L.DomUtil.create('label', '', container)
|
|
819
|
-
const submitInput = L.DomUtil.create('input', '', container)
|
|
820
|
-
const map = this
|
|
821
|
-
let option
|
|
822
|
-
const types = ['geojson', 'csv', 'gpx', 'kml', 'osm', 'georss', 'umap']
|
|
823
|
-
title.textContent = L._('Import data')
|
|
824
|
-
fileInput.type = 'file'
|
|
825
|
-
fileInput.multiple = 'multiple'
|
|
826
|
-
submitInput.type = 'button'
|
|
827
|
-
submitInput.value = L._('Import')
|
|
828
|
-
submitInput.className = 'button'
|
|
829
|
-
typeLabel.textContent = L._('Choose the format of the data to import')
|
|
830
|
-
this.help.button(typeLabel, 'importFormats')
|
|
831
|
-
const typeInput = L.DomUtil.create('select', '', typeLabel)
|
|
832
|
-
typeInput.name = 'format'
|
|
833
|
-
layerLabel.textContent = L._('Choose the layer to import in')
|
|
834
|
-
const layerInput = L.DomUtil.create('select', '', layerLabel)
|
|
835
|
-
layerInput.name = 'datalayer'
|
|
836
|
-
urlInput.type = 'text'
|
|
837
|
-
urlInput.placeholder = L._('Provide an URL here')
|
|
838
|
-
rawInput.placeholder = L._('Paste your data here')
|
|
839
|
-
clearLabel.textContent = L._('Replace layer content')
|
|
840
|
-
const clearFlag = L.DomUtil.create('input', '', clearLabel)
|
|
841
|
-
clearFlag.type = 'checkbox'
|
|
842
|
-
clearFlag.name = 'clear'
|
|
843
|
-
this.eachDataLayerReverse((datalayer) => {
|
|
844
|
-
if (datalayer.isLoaded() && !datalayer.isRemoteLayer()) {
|
|
845
|
-
const id = L.stamp(datalayer)
|
|
846
|
-
option = L.DomUtil.create('option', '', layerInput)
|
|
847
|
-
option.value = id
|
|
848
|
-
option.textContent = datalayer.options.name
|
|
849
|
-
}
|
|
850
|
-
})
|
|
851
|
-
L.DomUtil.element(
|
|
852
|
-
'option',
|
|
853
|
-
{ value: '', textContent: L._('Import in a new layer') },
|
|
854
|
-
layerInput
|
|
855
|
-
)
|
|
856
|
-
L.DomUtil.element(
|
|
857
|
-
'option',
|
|
858
|
-
{ value: '', textContent: L._('Choose the data format') },
|
|
859
|
-
typeInput
|
|
860
|
-
)
|
|
861
|
-
for (let i = 0; i < types.length; i++) {
|
|
862
|
-
option = L.DomUtil.create('option', '', typeInput)
|
|
863
|
-
option.value = option.textContent = types[i]
|
|
864
|
-
}
|
|
865
|
-
if (this.options.importPresets.length) {
|
|
866
|
-
const noPreset = L.DomUtil.create('option', '', presetSelect)
|
|
867
|
-
noPreset.value = noPreset.textContent = L._('Choose a preset')
|
|
868
|
-
for (let j = 0; j < this.options.importPresets.length; j++) {
|
|
869
|
-
option = L.DomUtil.create('option', '', presetSelect)
|
|
870
|
-
option.value = this.options.importPresets[j].url
|
|
871
|
-
option.textContent = this.options.importPresets[j].label
|
|
872
|
-
}
|
|
873
|
-
} else {
|
|
874
|
-
presetBox.style.display = 'none'
|
|
875
|
-
}
|
|
809
|
+
fullDownload: function () {
|
|
810
|
+
// Make sure all data is loaded before downloading
|
|
811
|
+
this.once('dataloaded', () => this.download())
|
|
812
|
+
this.loadDatalayers(true) // Force load
|
|
813
|
+
},
|
|
876
814
|
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
if (rawInput.value && type === 'umap') {
|
|
916
|
-
try {
|
|
917
|
-
this.importRaw(rawInput.value, type)
|
|
918
|
-
} catch (e) {
|
|
919
|
-
this.ui.alert({ content: L._('Invalid umap data'), level: 'error' })
|
|
920
|
-
console.error(e)
|
|
921
|
-
}
|
|
922
|
-
} else {
|
|
923
|
-
if (!layer) layer = this.createDataLayer()
|
|
924
|
-
if (rawInput.value) layer.importRaw(rawInput.value, type)
|
|
925
|
-
else if (urlInput.value) layer.importFromUrl(urlInput.value, type)
|
|
926
|
-
else if (presetSelect.selectedIndex > 0)
|
|
927
|
-
layer.importFromUrl(presetSelect[presetSelect.selectedIndex].value, type)
|
|
928
|
-
}
|
|
929
|
-
}
|
|
815
|
+
format: function (mode) {
|
|
816
|
+
const type = this.EXPORT_TYPES[mode || 'umap']
|
|
817
|
+
const content = type.formatter(this)
|
|
818
|
+
let name = this.options.name || 'data'
|
|
819
|
+
name = name.replace(/[^a-z0-9]/gi, '_').toLowerCase()
|
|
820
|
+
const filename = name + type.ext
|
|
821
|
+
return { content, filetype: type.filetype, filename }
|
|
822
|
+
},
|
|
823
|
+
|
|
824
|
+
download: function (mode) {
|
|
825
|
+
const { content, filetype, filename } = this.format(mode)
|
|
826
|
+
const blob = new Blob([content], { type: filetype })
|
|
827
|
+
window.URL = window.URL || window.webkitURL
|
|
828
|
+
const el = document.createElement('a')
|
|
829
|
+
el.download = filename
|
|
830
|
+
el.href = window.URL.createObjectURL(blob)
|
|
831
|
+
el.style.display = 'none'
|
|
832
|
+
document.body.appendChild(el)
|
|
833
|
+
el.click()
|
|
834
|
+
document.body.removeChild(el)
|
|
835
|
+
},
|
|
836
|
+
|
|
837
|
+
processFileToImport: function (file, layer, type) {
|
|
838
|
+
type = type || L.Util.detectFileType(file)
|
|
839
|
+
if (!type) {
|
|
840
|
+
this.ui.alert({
|
|
841
|
+
content: L._('Unable to detect format of file {filename}', {
|
|
842
|
+
filename: file.name,
|
|
843
|
+
}),
|
|
844
|
+
level: 'error',
|
|
845
|
+
})
|
|
846
|
+
return
|
|
847
|
+
}
|
|
848
|
+
if (type === 'umap') {
|
|
849
|
+
this.importFromFile(file, 'umap')
|
|
850
|
+
} else {
|
|
851
|
+
if (!layer) layer = this.createDataLayer({ name: file.name })
|
|
852
|
+
layer.importFromFile(file, type)
|
|
930
853
|
}
|
|
931
|
-
L.DomEvent.on(submitInput, 'click', submit, this)
|
|
932
|
-
L.DomEvent.on(
|
|
933
|
-
fileInput,
|
|
934
|
-
'change',
|
|
935
|
-
(e) => {
|
|
936
|
-
let type = '',
|
|
937
|
-
newType
|
|
938
|
-
for (let i = 0; i < e.target.files.length; i++) {
|
|
939
|
-
newType = L.Util.detectFileType(e.target.files[i])
|
|
940
|
-
if (!type && newType) type = newType
|
|
941
|
-
if (type && newType !== type) {
|
|
942
|
-
type = ''
|
|
943
|
-
break
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
typeInput.value = type
|
|
947
|
-
},
|
|
948
|
-
this
|
|
949
|
-
)
|
|
950
|
-
this.ui.openPanel({ data: { html: container }, className: 'dark' })
|
|
951
854
|
},
|
|
952
855
|
|
|
953
856
|
importRaw: function (rawData) {
|
|
@@ -1809,11 +1712,13 @@ L.U.Map.include({
|
|
|
1809
1712
|
enableEdit: function () {
|
|
1810
1713
|
L.DomUtil.addClass(document.body, 'umap-edit-enabled')
|
|
1811
1714
|
this.editEnabled = true
|
|
1715
|
+
this.drop.enable()
|
|
1812
1716
|
this.fire('edit:enabled')
|
|
1813
1717
|
},
|
|
1814
1718
|
|
|
1815
1719
|
disableEdit: function () {
|
|
1816
1720
|
if (this.isDirty) return
|
|
1721
|
+
this.drop.disable()
|
|
1817
1722
|
L.DomUtil.removeClass(document.body, 'umap-edit-enabled')
|
|
1818
1723
|
this.editedFeature = null
|
|
1819
1724
|
this.editEnabled = false
|
umap/static/umap/locale/cs_CZ.js
CHANGED
|
@@ -387,31 +387,45 @@ const locale = {
|
|
|
387
387
|
"*single star for italic*": "*vše mezi hvězdičkami bude kurzívou*",
|
|
388
388
|
"--- for a horizontal rule": "--- vytvoří vodorovnou linku",
|
|
389
389
|
"The name of the property to use as feature label (eg.: \"nom\"). You can also use properties inside brackets to use more than one or mix with static content (eg.: \"{name} in {place}\")": "Název vlastnosti, která se má použít jako popis funkce (např.: \"nom\"). Můžete také použít vlastnosti uvnitř hranatých závorek a použít více než jednu nebo je kombinovat se statickým obsahem (např.: \"{jméno} v {místo}\")",
|
|
390
|
-
"Cancel all": "
|
|
391
|
-
"Comma separated list of properties to use for facet search (eg.: mykey,otherkey). To control label, add it after a | (eg.: mykey|My Key,otherkey|Other Key)": "
|
|
392
|
-
"Default view": "
|
|
393
|
-
"Facet keys": "
|
|
394
|
-
"Facet search": "
|
|
395
|
-
"Feature properties": "
|
|
396
|
-
"Issue reaching that URL (network problem or CORS protection): {url}": "
|
|
397
|
-
"Latest feature": "
|
|
398
|
-
"No results for these facets": "
|
|
399
|
-
"Saved center and zoom": "
|
|
400
|
-
"User location": "
|
|
401
|
-
"Visibility: {status}": "
|
|
402
|
-
"Fit all data": "
|
|
403
|
-
"Verify remote URL": "
|
|
404
|
-
"Add": "
|
|
405
|
-
"Change": "
|
|
406
|
-
"Powered by uMap": "
|
|
407
|
-
"Search": "
|
|
408
|
-
"Toggle direct input (advanced)": "
|
|
409
|
-
"Datalayers": "
|
|
410
|
-
"Delete map": "
|
|
411
|
-
"Secret edit link:": "
|
|
412
|
-
"Who can edit \"{layer}\"": "
|
|
413
|
-
"Current map view": "
|
|
414
|
-
"Filter": "
|
|
390
|
+
"Cancel all": "Zrušit vše",
|
|
391
|
+
"Comma separated list of properties to use for facet search (eg.: mykey,otherkey). To control label, add it after a | (eg.: mykey|My Key,otherkey|Other Key)": "Seznam vlastností oddělených čárkou, které se mají použít pro hledání aspektů (např.: mykey,otherkey). Chcete-li změnit popisek, přidejte jej za | (např.: mykey|Můj klíč,otherkey|Jiný klíč)",
|
|
392
|
+
"Default view": "Výchozí zobrazení",
|
|
393
|
+
"Facet keys": "Aspekty klíče",
|
|
394
|
+
"Facet search": "hledání aspektů",
|
|
395
|
+
"Feature properties": "Vlastnosti funkce",
|
|
396
|
+
"Issue reaching that URL (network problem or CORS protection): {url}": "Problém s dosažením této adresy URL (síťový problém nebo ochrana CORS): {url}",
|
|
397
|
+
"Latest feature": "Nejnovější funkce",
|
|
398
|
+
"No results for these facets": "Žádné výsledky pro tyto aspekty",
|
|
399
|
+
"Saved center and zoom": "Uložený střed a zoom",
|
|
400
|
+
"User location": "Poloha uživatele",
|
|
401
|
+
"Visibility: {status}": "Viditelnost: {status}",
|
|
402
|
+
"Fit all data": "Přizpůsobení všech dat",
|
|
403
|
+
"Verify remote URL": "Ověřit vzdálenou adresu URL",
|
|
404
|
+
"Add": "Přidat",
|
|
405
|
+
"Change": "Změnit",
|
|
406
|
+
"Powered by uMap": "Běží na uMap",
|
|
407
|
+
"Search": "Hledat",
|
|
408
|
+
"Toggle direct input (advanced)": "Přepínání přímého vstupu (pokročilé)",
|
|
409
|
+
"Datalayers": "Datové vrstvy",
|
|
410
|
+
"Delete map": "Smazat mapu",
|
|
411
|
+
"Secret edit link:": "Tajný odkaz na úpravy:",
|
|
412
|
+
"Who can edit \"{layer}\"": "Kdo může upravovat \"{layer}\"",
|
|
413
|
+
"Current map view": "Aktuální zobrazení mapy",
|
|
414
|
+
"Filter": "Filtr",
|
|
415
|
+
"Choropleth": "Choropleth",
|
|
416
|
+
"Choropleth breakpoints": "Choropleth breakpoints",
|
|
417
|
+
"Choropleth classes": "Choropleth třídy",
|
|
418
|
+
"Choropleth color palette": "Choropleth paleta barev",
|
|
419
|
+
"Choropleth mode": "Choropleth režim",
|
|
420
|
+
"Choropleth property value": "Choropleth hodnota objektu",
|
|
421
|
+
"Comma separated list of numbers, including min and max values.": "Seznam čísel oddělených čárkou, včetně minimálních a maximálních hodnot.",
|
|
422
|
+
"Equidistant": "Stejně vzdálené",
|
|
423
|
+
"Jenks-Fisher": "Jenks-Fisher",
|
|
424
|
+
"K-means": "K-means",
|
|
425
|
+
"Manual": "Ručně",
|
|
426
|
+
"Number of desired classes (default 5)": "Počet požadovaných tříd (výchozí 5)",
|
|
427
|
+
"Quantiles": "Kvantily",
|
|
428
|
+
"Show this layer in the caption": "Zobrazit tuto vrstvu v nadpisu"
|
|
415
429
|
}
|
|
416
430
|
L.registerLocale("cs_CZ", locale)
|
|
417
431
|
L.setLocale("cs_CZ")
|
|
@@ -387,29 +387,43 @@
|
|
|
387
387
|
"*single star for italic*": "*vše mezi hvězdičkami bude kurzívou*",
|
|
388
388
|
"--- for a horizontal rule": "--- vytvoří vodorovnou linku",
|
|
389
389
|
"The name of the property to use as feature label (eg.: \"nom\"). You can also use properties inside brackets to use more than one or mix with static content (eg.: \"{name} in {place}\")": "Název vlastnosti, která se má použít jako popis funkce (např.: \"nom\"). Můžete také použít vlastnosti uvnitř hranatých závorek a použít více než jednu nebo je kombinovat se statickým obsahem (např.: \"{jméno} v {místo}\")",
|
|
390
|
-
"Cancel all": "
|
|
391
|
-
"Comma separated list of properties to use for facet search (eg.: mykey,otherkey). To control label, add it after a | (eg.: mykey|My Key,otherkey|Other Key)": "
|
|
392
|
-
"Default view": "
|
|
393
|
-
"Facet keys": "
|
|
394
|
-
"Facet search": "
|
|
395
|
-
"Feature properties": "
|
|
396
|
-
"Issue reaching that URL (network problem or CORS protection): {url}": "
|
|
397
|
-
"Latest feature": "
|
|
398
|
-
"No results for these facets": "
|
|
399
|
-
"Saved center and zoom": "
|
|
400
|
-
"User location": "
|
|
401
|
-
"Visibility: {status}": "
|
|
402
|
-
"Fit all data": "
|
|
403
|
-
"Verify remote URL": "
|
|
404
|
-
"Add": "
|
|
405
|
-
"Change": "
|
|
406
|
-
"Powered by uMap": "
|
|
407
|
-
"Search": "
|
|
408
|
-
"Toggle direct input (advanced)": "
|
|
409
|
-
"Datalayers": "
|
|
410
|
-
"Delete map": "
|
|
411
|
-
"Secret edit link:": "
|
|
412
|
-
"Who can edit \"{layer}\"": "
|
|
413
|
-
"Current map view": "
|
|
414
|
-
"Filter": "
|
|
390
|
+
"Cancel all": "Zrušit vše",
|
|
391
|
+
"Comma separated list of properties to use for facet search (eg.: mykey,otherkey). To control label, add it after a | (eg.: mykey|My Key,otherkey|Other Key)": "Seznam vlastností oddělených čárkou, které se mají použít pro hledání aspektů (např.: mykey,otherkey). Chcete-li změnit popisek, přidejte jej za | (např.: mykey|Můj klíč,otherkey|Jiný klíč)",
|
|
392
|
+
"Default view": "Výchozí zobrazení",
|
|
393
|
+
"Facet keys": "Aspekty klíče",
|
|
394
|
+
"Facet search": "hledání aspektů",
|
|
395
|
+
"Feature properties": "Vlastnosti funkce",
|
|
396
|
+
"Issue reaching that URL (network problem or CORS protection): {url}": "Problém s dosažením této adresy URL (síťový problém nebo ochrana CORS): {url}",
|
|
397
|
+
"Latest feature": "Nejnovější funkce",
|
|
398
|
+
"No results for these facets": "Žádné výsledky pro tyto aspekty",
|
|
399
|
+
"Saved center and zoom": "Uložený střed a zoom",
|
|
400
|
+
"User location": "Poloha uživatele",
|
|
401
|
+
"Visibility: {status}": "Viditelnost: {status}",
|
|
402
|
+
"Fit all data": "Přizpůsobení všech dat",
|
|
403
|
+
"Verify remote URL": "Ověřit vzdálenou adresu URL",
|
|
404
|
+
"Add": "Přidat",
|
|
405
|
+
"Change": "Změnit",
|
|
406
|
+
"Powered by uMap": "Běží na uMap",
|
|
407
|
+
"Search": "Hledat",
|
|
408
|
+
"Toggle direct input (advanced)": "Přepínání přímého vstupu (pokročilé)",
|
|
409
|
+
"Datalayers": "Datové vrstvy",
|
|
410
|
+
"Delete map": "Smazat mapu",
|
|
411
|
+
"Secret edit link:": "Tajný odkaz na úpravy:",
|
|
412
|
+
"Who can edit \"{layer}\"": "Kdo může upravovat \"{layer}\"",
|
|
413
|
+
"Current map view": "Aktuální zobrazení mapy",
|
|
414
|
+
"Filter": "Filtr",
|
|
415
|
+
"Choropleth": "Choropleth",
|
|
416
|
+
"Choropleth breakpoints": "Choropleth breakpoints",
|
|
417
|
+
"Choropleth classes": "Choropleth třídy",
|
|
418
|
+
"Choropleth color palette": "Choropleth paleta barev",
|
|
419
|
+
"Choropleth mode": "Choropleth režim",
|
|
420
|
+
"Choropleth property value": "Choropleth hodnota objektu",
|
|
421
|
+
"Comma separated list of numbers, including min and max values.": "Seznam čísel oddělených čárkou, včetně minimálních a maximálních hodnot.",
|
|
422
|
+
"Equidistant": "Stejně vzdálené",
|
|
423
|
+
"Jenks-Fisher": "Jenks-Fisher",
|
|
424
|
+
"K-means": "K-means",
|
|
425
|
+
"Manual": "Ručně",
|
|
426
|
+
"Number of desired classes (default 5)": "Počet požadovaných tříd (výchozí 5)",
|
|
427
|
+
"Quantiles": "Kvantily",
|
|
428
|
+
"Show this layer in the caption": "Zobrazit tuto vrstvu v nadpisu"
|
|
415
429
|
}
|
umap/static/umap/locale/es.js
CHANGED
|
@@ -410,8 +410,22 @@ const locale = {
|
|
|
410
410
|
"Delete map": "Borrar mapa",
|
|
411
411
|
"Secret edit link:": "Enlace secreto de edición:",
|
|
412
412
|
"Who can edit \"{layer}\"": "Quién puede editar \"{layer}\"",
|
|
413
|
-
"Current map view": "
|
|
414
|
-
"Filter": "
|
|
413
|
+
"Current map view": "Vista actual del mapa",
|
|
414
|
+
"Filter": "Filtro",
|
|
415
|
+
"Choropleth": "Coropleto",
|
|
416
|
+
"Choropleth breakpoints": "Puntos de ruptura de la Coropleta",
|
|
417
|
+
"Choropleth classes": "Clases de coropletas",
|
|
418
|
+
"Choropleth color palette": "Paleta de colores Coropleta",
|
|
419
|
+
"Choropleth mode": "Modo Coropleta",
|
|
420
|
+
"Choropleth property value": "Valor de la propiedad Choropleta",
|
|
421
|
+
"Comma separated list of numbers, including min and max values.": "Lista de números separados por comas, incluidos los valores mínimo y máximo.",
|
|
422
|
+
"Equidistant": "Equidistante",
|
|
423
|
+
"Jenks-Fisher": "Jenks-Fisher",
|
|
424
|
+
"K-means": "K-medias",
|
|
425
|
+
"Manual": "Manual",
|
|
426
|
+
"Number of desired classes (default 5)": "Número de clases deseadas (predeterminadas 5)",
|
|
427
|
+
"Quantiles": "Cuantiles",
|
|
428
|
+
"Show this layer in the caption": "Mostrar esta capa en la leyenda"
|
|
415
429
|
}
|
|
416
430
|
L.registerLocale("es", locale)
|
|
417
431
|
L.setLocale("es")
|