Add 20km allowed zone icon (#347)
Co-authored-by: Gautier P <gautier_git@damsy.net>
This commit is contained in:
parent
1958f55f18
commit
779c720b7d
11 changed files with 296 additions and 24 deletions
|
|
@ -162,9 +162,13 @@ BR.NogoAreas = L.Control.extend({
|
|||
var self = this;
|
||||
|
||||
var geoJSONPromise;
|
||||
var nogoJSON = $('#nogoJSON').val(); //hidden
|
||||
var nogoURL = $('#nogoURL').val();
|
||||
var nogoFile = $('#nogoFile')[0].files[0];
|
||||
if (nogoURL) {
|
||||
if (nogoJSON) {
|
||||
geoJSONPromise = Promise.resolve(JSON.parse(nogoJSON));
|
||||
$('#nogoJSON').val(undefined);
|
||||
} else if (nogoURL) {
|
||||
// TODO: Handle {{bbox}}
|
||||
geoJSONPromise = fetch(nogoURL).then(function(response) {
|
||||
response.json();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue