Add 20km allowed zone icon (#347)

Co-authored-by: Gautier P <gautier_git@damsy.net>
This commit is contained in:
Gautier P 2020-12-01 20:56:14 +01:00 committed by GitHub
parent 1958f55f18
commit 779c720b7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 296 additions and 24 deletions

View file

@ -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();