Browse Source

Export: download as GeoJSON (on details page)

master
parent
commit
aa680785f8
  1. 3
      lang/ast.json
  2. 3
      lang/ca.json
  3. 3
      lang/cs.json
  4. 3
      lang/da.json
  5. 2
      lang/de.json
  6. 3
      lang/el.json
  7. 2
      lang/en.json
  8. 3
      lang/es.json
  9. 3
      lang/et.json
  10. 3
      lang/fr.json
  11. 3
      lang/hu.json
  12. 3
      lang/it.json
  13. 3
      lang/ja.json
  14. 3
      lang/nl.json
  15. 3
      lang/pl.json
  16. 2
      lang/pt-br.json
  17. 2
      lang/pt.json
  18. 3
      lang/ro.json
  19. 3
      lang/ru.json
  20. 3
      lang/sr.json
  21. 3
      lang/template.json
  22. 3
      lang/uk.json
  23. 18
      src/index.js

3
lang/ast.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/ca.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/cs.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/da.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

2
lang/de.json

@ -3,6 +3,7 @@
"category-info-tooltip": "Info & Legende",
"closed": "geschlossen",
"default": "Standard",
"download:geojson": "Als GeoJSON runterladen",
"edit": "bearbeiten",
"error": {
"message": "Fehler",
@ -10,6 +11,7 @@
},
"facilities": "Einrichtungen",
"header:attributes": "Attribute",
"header:export": "Export",
"header:osm_meta": "OSM Meta",
"images": "Bilder",
"loading": "Laden ...",

3
lang/el.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

2
lang/en.json

@ -3,6 +3,7 @@
"category-info-tooltip": "Info & Map key",
"closed": "closed",
"default": "default",
"download:geojson": "Download as GeoJSON",
"edit": "edit",
"error": {
"message": "Error",
@ -10,6 +11,7 @@
},
"facilities": "Facilities",
"header:attributes": "Attributes",
"header:export": "Export",
"header:osm_meta": "OSM Meta",
"images": "Images",
"loading": "Loading ...",

3
lang/es.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/et.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/fr.json

@ -3,9 +3,12 @@
"category-info-tooltip": "Info & Légende",
"closed": "Fermé",
"default": "Par défaut",
"download:geojson": "",
"edit": "",
"error": "Erreur",
"facilities": "Aménagements",
"header:attributes": "Attributs",
"header:export": "",
"header:osm_meta": "Métadonnées OSM",
"images": "Images",
"loading": "Chargement...",

3
lang/hu.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/it.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/ja.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/nl.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/pl.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

2
lang/pt-br.json

@ -3,6 +3,7 @@
"category-info-tooltip": "Info & Legenda",
"closed": "fechado",
"default": "padrão",
"download:geojson": "",
"edit": "editar",
"error": {
"message": "Erro",
@ -10,6 +11,7 @@
},
"facilities": "Instalações",
"header:attributes": "Atributos",
"header:export": "",
"header:osm_meta": "OSM Meta",
"images": "Imagens",
"loading": "Carregando...",

2
lang/pt.json

@ -3,6 +3,7 @@
"category-info-tooltip": "Info & Legenda",
"closed": "fechado",
"default": "padrão",
"download:geojson": "",
"edit": "editar",
"error": {
"message": "Erro",
@ -10,6 +11,7 @@
},
"facilities": "Instalações",
"header:attributes": "Atributos",
"header:export": "",
"header:osm_meta": "OSM Meta",
"images": "Imagens",
"loading": "A carregar...",

3
lang/ro.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/ru.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/sr.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/template.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

3
lang/uk.json

@ -3,9 +3,12 @@
"category-info-tooltip": "",
"closed": "",
"default": "",
"download:geojson": "",
"edit": "",
"error": "",
"facilities": "",
"header:attributes": "",
"header:export": "",
"header:osm_meta": "",
"images": "",
"loading": "",

18
src/index.js

@ -237,7 +237,7 @@ function show (id, options, callback) {
}
window.showDetails = function (data, category) {
var div, h, dt, dd
var div, h, dt, dd, li, a
var k
var dom = document.getElementById('contentDetails')
@ -274,6 +274,22 @@ window.showDetails = function (data, category) {
}
)
h = document.createElement('h3')
h.innerHTML = lang('header:export')
dom.appendChild(h)
div = document.createElement('ul')
dom.appendChild(div)
li = document.createElement('li')
div.appendChild(li)
a = document.createElement('a')
a.download = data.id + '.json'
a.href = 'data:application/json;charset=UTF-8,' + encodeURIComponent(JSON.stringify(data.object.GeoJSON(), null, ' '))
a.innerHTML = lang('download:geojson')
li.appendChild(a)
h = document.createElement('h3')
h.innerHTML = lang('header:attributes')
dom.appendChild(h)

Loading…
Cancel
Save