UNPKG

@expofp/floorplan

Version:

Interactive floor plan library for expos and events

19 lines • 1.07 kB
import { type StyleSpecification, type TransformStyleFunction } from 'maplibre-gl'; /** * Build a MapLibre `transformStyle` hook that makes a style's internal URLs * safe to use, or `undefined` when none is needed. * * MapLibre requires the URLs *inside* a style — `sprite`, `glyphs`, source * `url`, and source `tiles` — to be fully absolute before it consumes them; * for example, `normalizeSpriteURL` calls `new URL(url)` with no base and * rejects rooted or relative values. * * Inline style objects have no style URL to resolve against; callers must pass * already-absolute internals for those. * * `restyle`, when given, edits the style last — after URL resolution — for * changes the style document cannot carry itself, such as a palette applied to * a hosted style. */ export declare function createStyleTransform(style: string | StyleSpecification, onPmtilesArchive?: (url: string) => void, restyle?: (style: StyleSpecification) => StyleSpecification): TransformStyleFunction | undefined; //# sourceMappingURL=resolve-map-style.d.ts.map