Skip to content

Commit

Permalink
disable custom layer validation
Browse files Browse the repository at this point in the history
  • Loading branch information
Max authored Jul 12, 2023
1 parent 2e02940 commit a78239e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/assets/javascripts/fp/map/map-options.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,12 @@
// fits Leaflet's template requirements
// http://leafletjs.com/reference.html#tilelayer
utils.isTemplateString = function(str) {
var re = /^https?:\/\/(\{[s]\})?[\/\w\.\-\?\+\*_\|~:\[\]@#!\$'\(\),=&]*\{[zxy]\}\/\{[zxy]\}\/\{[zxy]\}[\/\w\.\-\?\+\*_\|~:\[\]@#!\$'\(\),=&]*(jpg|png)([\/\w\.\-\?\+\*_\|~:\[\]@#!\$'\(\),=&]*)?$/gi;
return re.test(str);
return true;
// var re = /^https?:\/\/(\{[s]\})?[\/\w\.\-\?\+\*_\|~:\[\]@#!\$'\(\),=&]*\{[zxy]\}\/\{[zxy]\}\/\{[zxy]\}[\/\w\.\-\?\+\*_\|~:\[\]@#!\$'\(\),=&]*(jpg|png)([\/\w\.\-\?\+\*_\|~:\[\]@#!\$'\(\),=&]*)?$/gi;
// return re.test(str);
};

utils.conformTemplate = function(template) {
return template.replace('{S}','{s}').replace('{X}','{x}').replace('{Y}','{y}').replace('{Z}','{z}');
};
})(this);
})(this);

0 comments on commit a78239e

Please sign in to comment.