@foodmarketmaker/mapag 0.0.13 → 0.0.15

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.
@@ -252,7 +252,10 @@ class Styles {
252
252
  throw new Error(`HTTP ${response.status}: ${response.statusText}`);
253
253
  }
254
254
  const styleSpec = await response.json();
255
- styleSpec.glyphs = 'https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf';
255
+ console.debug("Glyphs property:", styleSpec.glyphs);
256
+ if (!styleSpec.glyphs) {
257
+ styleSpec.glyphs = 'https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf';
258
+ }
256
259
  return styleSpec;
257
260
  }
258
261
  async fetchAndCacheStyle(styleData) {
@@ -272,8 +275,9 @@ class Styles {
272
275
  }
273
276
  const styleSpec = await response.json();
274
277
  // Add Glyphs
278
+ console.debug("Glyphs property:", styleSpec.glyphs);
275
279
  if (!styleSpec.glyphs) {
276
- styleSpec.glyphs = 'https://demotiles.maplibre.org/font/{fontstack}/{range}.pbf';
280
+ styleSpec.glyphs = 'https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf';
277
281
  }
278
282
  // Extract source and layer IDs
279
283
  const sourceIds = Object.keys(styleSpec.sources || {});
@@ -14980,6 +14984,7 @@ class WatershedMapper {
14980
14984
  map.setPaintProperty(this.LABEL_LAYER_ID, 'text-halo-width', settings.labelsHaloWidth);
14981
14985
  map.setPaintProperty(this.LABEL_LAYER_ID, 'text-opacity', settings.labelsOpacity);
14982
14986
  map.setLayoutProperty(this.LABEL_LAYER_ID, 'text-size', settings.labelsSize);
14987
+ map.setLayoutProperty(this.LABEL_LAYER_ID, 'text-allow-overlap', settings.labelOverlap);
14983
14988
  }
14984
14989
  create() {
14985
14990
  if (!this.map) {
@@ -15040,8 +15045,9 @@ class WatershedMapper {
15040
15045
  type: 'symbol',
15041
15046
  layout: {
15042
15047
  'text-field': ['get', 'name'],
15048
+ 'text-font': ['Open Sans Regular'],
15043
15049
  'text-size': this.settings().labelsSize,
15044
- 'text-allow-overlap': true,
15050
+ 'text-allow-overlap': this.settings().labelOverlap,
15045
15051
  },
15046
15052
  paint: {
15047
15053
  'text-color': this.settings().labelsColor,
@@ -15134,7 +15140,7 @@ class WatershedSettings {
15134
15140
  visible = true;
15135
15141
  fillColor = '#0000ff';
15136
15142
  fillOpacity = 0.1;
15137
- borderColor = '#01018bff';
15143
+ borderColor = '#01018b';
15138
15144
  borderWidth = 1;
15139
15145
  borderOpacity = 1.0;
15140
15146
  labelsVisible = true;
@@ -15143,6 +15149,7 @@ class WatershedSettings {
15143
15149
  labelsHaloColor = '#ffffff';
15144
15150
  labelsHaloWidth = 1;
15145
15151
  labelsOpacity = 1.0;
15152
+ labelOverlap = false;
15146
15153
  autoSelectLayer = false;
15147
15154
  }
15148
15155