From a78239e140869bcab5978302f93406fb4b11e155 Mon Sep 17 00:00:00 2001 From: Max Date: Wed, 12 Jul 2023 15:20:40 -0700 Subject: [PATCH] disable custom layer validation --- app/assets/javascripts/fp/map/map-options.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/assets/javascripts/fp/map/map-options.js b/app/assets/javascripts/fp/map/map-options.js index 4a2fb9c9..2bf78a6e 100644 --- a/app/assets/javascripts/fp/map/map-options.js +++ b/app/assets/javascripts/fp/map/map-options.js @@ -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); \ No newline at end of file +})(this);