Skip to content

Commit

Permalink
Merge pull request #86 from deolekar/master
Browse files Browse the repository at this point in the history
  • Loading branch information
tomickigrzegorz authored Feb 15, 2024
2 parents 5e2076f + ba5e273 commit 5132459
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions docs/53.create-and-save-geojson/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

// config map
let config = {
minZoom: 7,
minZoom: 5,
maxZoom: 18,
fullscreenControl: true,
};
Expand Down Expand Up @@ -62,7 +62,7 @@ const customControl = L.Control.extend({
className: "remove link-button leaflet-bar",
},
{
title: "load gejson from file",
title: "load geojson from file",
html: "<input type='file' id='geojson' class='geojson' accept='text/plain, text/json, .geojson' onchange='openFile(event)' /><label for='geojson'><svg class='icon-geojson'><use xlink:href='#icon-import'></use></svg></label>",
className: "load link-button leaflet-bar",
},
Expand Down Expand Up @@ -249,4 +249,6 @@ function openFile(event) {
setGeojsonToMap(geojson);
};
reader.readAsText(input.files[0]);

input.value = "";
}

0 comments on commit 5132459

Please sign in to comment.