@chrtco/sdk 0.10.27 → 0.10.29

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.cjs CHANGED
@@ -634,7 +634,7 @@ function buildSources(opts = {}) {
634
634
  if (opts.base) {
635
635
  sources[BASE_REGION] = {
636
636
  type: "vector",
637
- tiles: [`${base}/v1/tiles/${BASE_REGION}/{z}/{x}/{y}.mvt`],
637
+ tiles: [tileTemplate(base, BASE_REGION, "mvt", buildFor(BASE_REGION))],
638
638
  minzoom: BASE_MINZOOM,
639
639
  maxzoom: BASE_MAXZOOM
640
640
  };
@@ -28976,14 +28976,20 @@ function landLayers(opts = {}) {
28976
28976
  }
28977
28977
  }));
28978
28978
  }
28979
+ const isIndexContour = [
28980
+ "any",
28981
+ ["<=", ["coalesce", ["get", "index_z"], 99], ["zoom"]],
28982
+ ["==", ["get", "is_index"], 1]
28983
+ ];
28979
28984
  layers.push(L({
28980
28985
  id: "chrtland-contour",
28981
28986
  type: "line",
28982
28987
  source: src,
28983
28988
  "source-layer": "land_contour",
28989
+ filter: ["<=", ["coalesce", ["get", "min_z"], 0], ["zoom"]],
28984
28990
  paint: {
28985
- "line-color": ["case", ["==", ["get", "is_index"], 1], T.contourIndex, T.contour],
28986
- "line-width": ["case", ["==", ["get", "is_index"], 1], 0.8, 0.4],
28991
+ "line-color": ["case", isIndexContour, T.contourIndex, T.contour],
28992
+ "line-width": ["case", isIndexContour, 0.8, 0.4],
28987
28993
  "line-opacity": 0.7
28988
28994
  }
28989
28995
  }));