Skip to content

Commit

Permalink
Merge pull request #63 from maxogden/patch-1
Browse files Browse the repository at this point in the history
disable custom layer validation
  • Loading branch information
quincylvania authored Aug 29, 2023
2 parents 2e02940 + a78239e commit 32b1b42
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 32b1b42

Please sign in to comment.