@india-boundary-corrector/openlayers-layer 0.0.2 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.global.js +6 -3
- package/dist/index.global.js.map +1 -1
- package/package.json +6 -5
package/dist/index.global.js
CHANGED
|
@@ -11154,7 +11154,7 @@ var IndiaBoundaryCorrector = (() => {
|
|
|
11154
11154
|
var XYZ_default = XYZ;
|
|
11155
11155
|
|
|
11156
11156
|
// ../data/version.js
|
|
11157
|
-
var packageVersion = "0.0.
|
|
11157
|
+
var packageVersion = "0.0.3";
|
|
11158
11158
|
|
|
11159
11159
|
// ../data/index.js
|
|
11160
11160
|
var import_meta = {};
|
|
@@ -11296,10 +11296,10 @@ var IndiaBoundaryCorrector = (() => {
|
|
|
11296
11296
|
let pattern = template.replace(/[.*+?^${}()|[\]\\]/g, (char) => {
|
|
11297
11297
|
if (char === "{" || char === "}") return char;
|
|
11298
11298
|
return "\\" + char;
|
|
11299
|
-
}).replace(/^https:\/\//, "https?://").replace(/^http:\/\//, "https?://").replace(/\{([a-z0-9])-([a-z0-9])\}/gi, (_2, start, end) => `(\\{${start}-${end}\\}|[a-z0-9]+)`).replace(/\{(z|x|y|s|r)\}/gi, (_2, name) => {
|
|
11299
|
+
}).replace(/^https:\/\//, "https?://").replace(/^http:\/\//, "https?://").replace(/\{([a-z0-9])-([a-z0-9])\}/gi, (_2, start, end) => `(\\{${start}-${end}\\}|\\{s\\}|[a-z0-9]+)`).replace(/\{(z|x|y|s|r)\}/gi, (_2, name) => {
|
|
11300
11300
|
const lowerName = name.toLowerCase();
|
|
11301
11301
|
if (lowerName === "s") {
|
|
11302
|
-
return "(\\{s\\}|[a-z0-9]+)";
|
|
11302
|
+
return "(\\{s\\}|\\{[a-z0-9]-[a-z0-9]\\}|[a-z0-9]+)";
|
|
11303
11303
|
}
|
|
11304
11304
|
if (lowerName === "r") {
|
|
11305
11305
|
return "(\\{r\\}|@\\d+x)?";
|
|
@@ -11333,6 +11333,9 @@ var IndiaBoundaryCorrector = (() => {
|
|
|
11333
11333
|
if (!id || typeof id !== "string") {
|
|
11334
11334
|
throw new Error("LayerConfig requires a non-empty string id");
|
|
11335
11335
|
}
|
|
11336
|
+
if (id.includes("/")) {
|
|
11337
|
+
throw new Error(`LayerConfig id cannot contain slashes: "${id}"`);
|
|
11338
|
+
}
|
|
11336
11339
|
this.id = id;
|
|
11337
11340
|
this.startZoom = startZoom;
|
|
11338
11341
|
this.zoomThreshold = zoomThreshold;
|