@ndwnu/map 3.0.1 → 3.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.
@@ -322,7 +322,66 @@ type NdwLayerSpecification = LayerSpecification & {
322
322
  };
323
323
  type NdwLayerFilterFunction = (layer: NdwLayerSpecification) => boolean;
324
324
 
325
+ /**
326
+ * The default NDW map style, using NWB road layers as the road network.
327
+ * This is the recommended style for all NDW applications.
328
+ *
329
+ * ## ⚠️ Sprites must be loaded
330
+ *
331
+ * This style depends on sprite sheets for all of its icons and patterns
332
+ * (traffic signs, road symbols, SDF icons, ...). MapLibre only loads them when
333
+ * the `sprite` definition is present on the style object you give to the map.
334
+ *
335
+ * Passing the whole `NDWMapStyle` object already includes the sprites, so the
336
+ * simplest setup just works:
337
+ *
338
+ * ```ts
339
+ * import { NDWMapStyle } from '@ndwnu/map';
340
+ *
341
+ * // sprite is part of NDWMapStyle, so icons load automatically
342
+ * map.setStyle(NDWMapStyle);
343
+ * ```
344
+ *
345
+ * If you build your own style object (merging your own sources/layers), you
346
+ * MUST copy the sprite definition over — otherwise icons silently fail to load:
347
+ *
348
+ * ```ts
349
+ * map.setStyle({
350
+ * ...myCustomStyle,
351
+ * sprite: NDWMapStyle.sprite, // <-- required, do not omit
352
+ * });
353
+ * ```
354
+ */
325
355
  declare const NDWMapStyle: StyleSpecification;
356
+ /**
357
+ * An alternative NDW map style that replaces the NWB road layers with
358
+ * OpenStreetMap roads. Behaves like {@link NDWMapStyle} in every other respect.
359
+ *
360
+ * ## ⚠️ Sprites must be loaded
361
+ *
362
+ * Like {@link NDWMapStyle}, this style depends on sprite sheets for its icons
363
+ * and patterns. MapLibre only loads them when the `sprite` definition is present
364
+ * on the style object you give to the map.
365
+ *
366
+ * Passing the whole `NDWOSMMapStyle` object already includes the sprites:
367
+ *
368
+ * ```ts
369
+ * import { NDWOSMMapStyle } from '@ndwnu/map';
370
+ *
371
+ * // sprite is part of NDWOSMMapStyle, so icons load automatically
372
+ * map.setStyle(NDWOSMMapStyle);
373
+ * ```
374
+ *
375
+ * If you build your own style object, you MUST copy the sprite definition over —
376
+ * otherwise icons silently fail to load:
377
+ *
378
+ * ```ts
379
+ * map.setStyle({
380
+ * ...myCustomStyle,
381
+ * sprite: NDWOSMMapStyle.sprite, // <-- required, do not omit
382
+ * });
383
+ * ```
384
+ */
326
385
  declare const NDWOSMMapStyle: StyleSpecification;
327
386
 
328
387
  export { ApiBackgroundLayer, ApiElement, ApiLayer, ApiSource, BOUNDS_AMERSFOORT, BOUNDS_NL, COMMON_BOUNDS, DEFAULT_MAP_CONFIG, MapComponent, MapElement, MapElementRepository, MapLayer, MapSource, MaplibreCursorService, NDWMapStyle, NDWOSMMapStyle, lineWidthFrcSpecification };