isard 0.2.1 → 0.4.0
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/CHANGELOG.md +93 -0
- package/README.md +8 -4
- package/dist/animation.d.ts +18 -0
- package/dist/animation.js +84 -0
- package/dist/animation.js.map +1 -0
- package/dist/basemap.worker.d.ts +26 -4
- package/dist/basemap.worker.js +2 -2
- package/dist/basemap.worker.js.map +9 -5
- package/dist/crs.d.ts +72 -0
- package/dist/crs.js +243 -0
- package/dist/crs.js.map +1 -0
- package/dist/decoder.worker.js +4 -4
- package/dist/decoder.worker.js.map +4 -4
- package/dist/engine-loader.d.ts +28 -0
- package/dist/engine-loader.js +112 -0
- package/dist/engine-loader.js.map +1 -0
- package/dist/features.d.ts +8 -0
- package/dist/features.js +17 -10
- package/dist/features.js.map +1 -1
- package/dist/geo.d.ts +16 -0
- package/dist/geo.js +32 -0
- package/dist/geo.js.map +1 -0
- package/dist/geoplateforme.d.ts +21 -5
- package/dist/geoplateforme.js +47 -12
- package/dist/geoplateforme.js.map +1 -1
- package/dist/glyphs.d.ts +13 -3
- package/dist/glyphs.js +26 -4
- package/dist/glyphs.js.map +1 -1
- package/dist/gpx.d.ts +11 -0
- package/dist/gpx.js +74 -0
- package/dist/gpx.js.map +1 -0
- package/dist/grid.d.ts +81 -0
- package/dist/grid.js +270 -0
- package/dist/grid.js.map +1 -0
- package/dist/icons.d.ts +146 -0
- package/dist/icons.js +333 -0
- package/dist/icons.js.map +1 -0
- package/dist/index.d.ts +11 -4
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/dist/interaction.d.ts +0 -4
- package/dist/interaction.js +8 -4
- package/dist/interaction.js.map +1 -1
- package/dist/isard_bg.wasm +0 -0
- package/dist/isard_core_bg.wasm +0 -0
- package/dist/kml.d.ts +12 -0
- package/dist/kml.js +159 -0
- package/dist/kml.js.map +1 -0
- package/dist/layers.d.ts +89 -2
- package/dist/layers.js +171 -15
- package/dist/layers.js.map +1 -1
- package/dist/lru.d.ts +22 -0
- package/dist/lru.js +52 -0
- package/dist/lru.js.map +1 -0
- package/dist/map.d.ts +45 -7
- package/dist/map.js +138 -310
- package/dist/map.js.map +1 -1
- package/dist/resample.d.ts +41 -0
- package/dist/resample.js +164 -0
- package/dist/resample.js.map +1 -0
- package/dist/settings.d.ts +39 -0
- package/dist/settings.js +104 -0
- package/dist/settings.js.map +1 -0
- package/dist/symbols.d.ts +54 -9
- package/dist/symbols.js +278 -55
- package/dist/symbols.js.map +1 -1
- package/dist/terrain.d.ts +19 -7
- package/dist/terrain.js +40 -28
- package/dist/terrain.js.map +1 -1
- package/dist/topojson.d.ts +29 -0
- package/dist/topojson.js +66 -0
- package/dist/topojson.js.map +1 -0
- package/dist/types.d.ts +14 -6
- package/dist/types.js.map +1 -1
- package/dist/vectorstyle.d.ts +32 -3
- package/dist/vectorstyle.js.map +1 -1
- package/dist/vectortiles.d.ts +19 -7
- package/dist/vectortiles.js +117 -69
- package/dist/vectortiles.js.map +1 -1
- package/dist/wasm/isard.d.ts +55 -7
- package/dist/wasm/isard.js +117 -6
- package/dist/wasm/isard_core.d.ts +29 -4
- package/dist/wasm/isard_core.js +84 -5
- package/dist/wmts.d.ts +14 -0
- package/dist/wmts.js +76 -0
- package/dist/wmts.js.map +1 -0
- package/dist/xml.d.ts +26 -0
- package/dist/xml.js +109 -0
- package/dist/xml.js.map +1 -0
- package/package.json +1 -1
- package/dist/equirectangular.d.ts +0 -35
- package/dist/equirectangular.js +0 -143
- package/dist/equirectangular.js.map +0 -1
package/dist/vectorstyle.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vectorstyle.js","sourceRoot":"","sources":["../src/vectorstyle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AAiE3C,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,SAA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,CAAC,CAAC;IAC5D,KAAK,IAAI,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC;QAAE,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACxE,OAAO,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,CAAC;SACxB,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC;SACrB,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3F,CAAC","sourcesContent":["/**\n * The parts of the MapLibre style specification a vector basemap needs, evaluated on the page: filters (legacy\n * `[\"==\", \"key\", value]` forms and expressions), property values given as constants, legacy functions (`{ stops }`\n * of zoom or of a property: exponential, interval, categorical, identity) or expressions (`get`, `has`, `concat`,\n * `interpolate`, `step`, `match`, `case`, `coalesce`, comparisons, `all`, `any`, `!`, `in`, `zoom`, arithmetic,\n * `format`, conversions and assertions, `upcase`, `downcase`, `literal`…; others give null, with a warning), colors\n * interpolated in RGBA, `{token}` text fields.\n */\nimport { parseCssColor } from './color.ts';\nimport type { TileFeature, Value } from './mvt.ts';\n\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json };\n\nexport interface StyleLayer {\n id: string;\n type: string;\n source?: string;\n 'source-layer'?: string;\n minzoom?: number;\n maxzoom?: number;\n filter?: Json;\n layout?: Record<string, Json>;\n paint?: Record<string, Json>;\n}\n\nexport interface Style {\n version: number;\n sources: Record<\n string,\n { type: string; tiles?: string[]; url?: string; maxzoom?: number; minzoom?: number; tileSize?: number }\n >;\n layers: StyleLayer[];\n glyphs?: string;\n sprite?: string;\n}\n\n/** A raster source of a style: its tile URL, its deepest level and the CSS pixels of its tiles (MapLibre's\n * `tileSize`: 512 by default) */\nexport interface RasterSource {\n tiles: string;\n maxzoom: number;\n tileSize: number;\n}\n\n/** A label to shape and place, in style terms evaluated at the tile's zoom */\nexport interface LabelCandidate {\n /** Index of its style layer: higher ones are placed first */\n layer: number;\n text: string;\n lon: number;\n lat: number;\n /** Along a line: the direction there (degrees of longitude and latitude) */\n along?: [number, number];\n font: string;\n size: Json;\n color: string;\n haloColor: string;\n haloWidth: number;\n anchor: string;\n offset: [number, number];\n maxWidth: number;\n lineHeight: number;\n overlap: boolean;\n}\n\n/** What expressions see of a feature */\nexport interface Context {\n zoom: number;\n properties: Record<string, Value>;\n /** 'Point', 'LineString' or 'Polygon' */\n type: string;\n}\n\nconst TYPES = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nexport function context(feature: TileFeature, zoom: number): Context {\n return { zoom, properties: feature.properties, type: TYPES[feature.type] ?? 'Unknown' };\n}\n\n// ── Colors ──\n\n/** A color to RGBA 0-1, undefined if it is not one */\nexport function color(value: unknown): [number, number, number, number] | undefined {\n return parseCssColor(value);\n}\n\nexport function css([r, g, b, a]: [number, number, number, number]): string {\n return `rgba(${Math.round(r * 255)},${Math.round(g * 255)},${Math.round(b * 255)},${a})`;\n}\n\n// ── Interpolation ──\n\n/** Factor between two stops: linear, or exponential of `base` */\nfunction factor(x: number, x0: number, x1: number, base = 1): number {\n const d = x1 - x0;\n if (d === 0) return 0;\n const t = x - x0;\n return base === 1 ? t / d : (base ** t - 1) / (base ** d - 1);\n}\n\nfunction mix(a: unknown, b: unknown, t: number): unknown {\n if (typeof a === 'number' && typeof b === 'number') return a + (b - a) * t;\n const ca = color(a);\n const cb = color(b);\n if (ca && cb)\n return css(\n [0, 1, 2, 3].map((i) => (ca[i] ?? 0) + ((cb[i] ?? 0) - (ca[i] ?? 0)) * t) as [number, number, number, number],\n );\n if (Array.isArray(a) && Array.isArray(b)) return a.map((v, i) => mix(v, b[i], t));\n return t < 0.5 ? a : b;\n}\n\n// ── Legacy functions ──\n\ninterface LegacyFunction {\n stops: [Json, Json][];\n base?: number;\n type?: string;\n property?: string;\n default?: Json;\n}\n\nfunction isFunction(v: Json): v is { [key: string]: Json } & LegacyFunction {\n return typeof v === 'object' && v !== null && !Array.isArray(v) && Array.isArray((v as { stops?: Json }).stops);\n}\n\nfunction legacy(f: LegacyFunction, ctx: Context): unknown {\n const input = f.property === undefined ? ctx.zoom : ctx.properties[f.property];\n const stops = f.stops;\n const type =\n f.type ?? (f.property === undefined || typeof stops[0]?.[0] === 'number' ? 'exponential' : 'categorical');\n if (type === 'identity') return input ?? f.default;\n if (type === 'categorical') return stops.find(([k]) => k === input)?.[1] ?? f.default;\n if (typeof input !== 'number' || !stops.length) return f.default ?? stops[0]?.[1];\n // Zoom-and-property stops ({ zoom, value } keys) are taken at their zoom only\n const key = (s: [Json, Json]) =>\n typeof s[0] === 'object' && s[0] !== null ? Number((s[0] as { zoom?: number }).zoom) : Number(s[0]);\n const first = stops[0];\n if (!first) return f.default;\n if (input <= key(first)) return first[1];\n for (let i = 1; i < stops.length; i += 1) {\n const [s0, s1] = [stops[i - 1], stops[i]];\n if (!s0 || !s1) continue;\n if (input < key(s1)) {\n if (type === 'interval') return s0[1];\n return mix(s0[1], s1[1], factor(input, key(s0), key(s1), f.base ?? 1));\n }\n }\n return stops.at(-1)?.[1];\n}\n\n// ── Expressions ──\n\nfunction get(ctx: Context, key: unknown): unknown {\n if (key === '$type') return ctx.type;\n return typeof key === 'string' ? ctx.properties[key] : undefined;\n}\n\n/** The operators `evaluate` knows */\nconst OPERATORS = new Set([\n 'literal',\n 'zoom',\n 'get',\n 'has',\n '!has',\n 'properties',\n 'id',\n 'geometry-type',\n 'concat',\n 'format',\n 'image',\n 'number-format',\n 'to-number',\n 'to-string',\n 'to-boolean',\n 'to-color',\n 'number',\n 'string',\n 'boolean',\n 'typeof',\n 'length',\n 'at',\n 'upcase',\n 'downcase',\n 'coalesce',\n '!',\n 'all',\n 'any',\n '==',\n '!=',\n '<',\n '<=',\n '>',\n '>=',\n 'in',\n 'case',\n 'match',\n 'step',\n 'interpolate',\n 'interpolate-hcl',\n 'interpolate-lab',\n 'rgb',\n 'rgba',\n '+',\n '-',\n '*',\n '/',\n '%',\n '^',\n 'min',\n 'max',\n 'abs',\n 'round',\n 'floor',\n 'ceil',\n 'sqrt',\n 'ln',\n 'log10',\n 'log2',\n 'pi',\n 'e',\n]);\n\n/** Whether a value is an expression (an array starting with a known operator), not a literal array */\nexport function isExpression(e: unknown): e is Json[] {\n return Array.isArray(e) && typeof e[0] === 'string' && OPERATORS.has(e[0]);\n}\n\n/** Operators already warned about */\nconst warned = new Set<string>();\n\nconst str = (v: unknown) => (v === undefined || v === null ? '' : String(v));\n\nexport function evaluate(e: Json, ctx: Context): unknown {\n if (isFunction(e)) return legacy(e, ctx);\n if (!Array.isArray(e)) return e;\n const [op, ...args] = e;\n if (typeof op !== 'string') return e;\n const ev = (i: number) => evaluate(args[i] ?? null, ctx);\n const num = (i: number) => Number(ev(i));\n const nums = () => args.map((_, i) => num(i));\n switch (op) {\n case 'literal':\n return args[0];\n case 'zoom':\n return ctx.zoom;\n case 'get':\n return get(ctx, ev(0));\n case 'has':\n return get(ctx, ev(0)) !== undefined;\n case '!has':\n return get(ctx, ev(0)) === undefined;\n case 'properties':\n return ctx.properties;\n case 'id':\n return null;\n case 'geometry-type':\n return ctx.type;\n case 'concat':\n return args.map((_, i) => str(ev(i))).join('');\n case 'format':\n // Its text sections, the options of each (objects) left out\n return args.map((a, i) => (a !== null && typeof a === 'object' && !Array.isArray(a) ? '' : str(ev(i)))).join('');\n case 'image':\n return ev(0);\n case 'number-format': {\n const options = (args[1] ?? {}) as {\n locale?: string;\n 'min-fraction-digits'?: number;\n 'max-fraction-digits'?: number;\n };\n const n = num(0);\n if (!Number.isFinite(n)) return '';\n return n.toLocaleString(options.locale, {\n minimumFractionDigits: options['min-fraction-digits'],\n maximumFractionDigits: options['max-fraction-digits'],\n });\n }\n case 'to-number': {\n for (let i = 0; i < args.length; i += 1) {\n const v = ev(i);\n const n = typeof v === 'string' && v.trim() === '' ? Number.NaN : Number(v);\n if (v !== null && v !== undefined && !Number.isNaN(n)) return n;\n }\n return 0;\n }\n case 'to-string':\n return str(ev(0));\n case 'to-boolean': {\n const v = ev(0);\n return !(v === '' || v === 0 || v === false || v === null || v === undefined || Number.isNaN(v));\n }\n case 'to-color':\n case 'number':\n case 'string':\n case 'boolean': {\n // Assertions: the first value of the type, else the last one\n const types: Record<string, (v: unknown) => boolean> = {\n 'to-color': (v) => color(v) !== undefined,\n number: (v) => typeof v === 'number',\n string: (v) => typeof v === 'string',\n boolean: (v) => typeof v === 'boolean',\n };\n for (let i = 0; i < args.length; i += 1) {\n const v = ev(i);\n if (types[op]?.(v)) return v;\n }\n return args.length ? ev(args.length - 1) : null;\n }\n case 'typeof': {\n const v = ev(0);\n if (v === null || v === undefined) return 'null';\n return Array.isArray(v) ? 'array' : typeof v;\n }\n case 'length': {\n const v = ev(0);\n return typeof v === 'string' || Array.isArray(v) ? v.length : 0;\n }\n case 'at': {\n const v = ev(1);\n return Array.isArray(v) ? (v[num(0)] ?? null) : null;\n }\n case 'upcase':\n return str(ev(0)).toUpperCase();\n case 'downcase':\n return str(ev(0)).toLowerCase();\n case 'coalesce':\n for (let i = 0; i < args.length; i += 1) {\n const v = ev(i);\n if (v !== undefined && v !== null) return v;\n }\n return null;\n case '!':\n return !ev(0);\n case 'all':\n return args.every((_, i) => Boolean(ev(i)));\n case 'any':\n return args.some((_, i) => Boolean(ev(i)));\n case '==':\n return ev(0) === ev(1);\n case '!=':\n return ev(0) !== ev(1);\n case '<':\n return (ev(0) as number) < (ev(1) as number);\n case '<=':\n return (ev(0) as number) <= (ev(1) as number);\n case '>':\n return (ev(0) as number) > (ev(1) as number);\n case '>=':\n return (ev(0) as number) >= (ev(1) as number);\n case 'in': {\n const haystack = ev(1);\n const needle = ev(0);\n if (typeof haystack === 'string') return haystack.includes(String(needle));\n return Array.isArray(haystack) && haystack.includes(needle as Json);\n }\n case 'case': {\n for (let i = 0; i + 1 < args.length; i += 2) if (ev(i)) return ev(i + 1);\n return ev(args.length - 1);\n }\n case 'match': {\n const input = ev(0);\n for (let i = 1; i + 1 < args.length; i += 2) {\n const label = args[i];\n if (Array.isArray(label) ? label.includes(input as Json) : label === input) return ev(i + 1);\n }\n return ev(args.length - 1);\n }\n case 'step': {\n const input = num(0);\n let out = ev(1);\n for (let i = 2; i + 1 < args.length; i += 2) {\n if (input >= Number(args[i])) out = ev(i + 1);\n else break;\n }\n return out;\n }\n case 'interpolate':\n case 'interpolate-hcl':\n case 'interpolate-lab': {\n const kind = args[0];\n const input = num(1);\n const base = Array.isArray(kind) && kind[0] === 'exponential' ? Number(kind[1]) : 1;\n const stops: [number, Json][] = [];\n for (let i = 2; i + 1 < args.length; i += 2) stops.push([Number(args[i]), args[i + 1] ?? null]);\n const first = stops[0];\n if (!first) return null;\n if (input <= first[0]) return evaluate(first[1], ctx);\n for (let i = 1; i < stops.length; i += 1) {\n const [s0, s1] = [stops[i - 1], stops[i]];\n if (s0 && s1 && input < s1[0])\n return mix(evaluate(s0[1], ctx), evaluate(s1[1], ctx), factor(input, s0[0], s1[0], base));\n }\n return evaluate(stops.at(-1)?.[1] ?? null, ctx);\n }\n case 'rgb':\n case 'rgba':\n return css([num(0) / 255, num(1) / 255, num(2) / 255, args.length > 3 ? num(3) : 1]);\n case '+':\n return nums().reduce((a, b) => a + b, 0);\n case '*':\n return nums().reduce((a, b) => a * b, 1);\n case '-':\n return args.length === 1 ? -num(0) : num(0) - num(1);\n case '/':\n return num(0) / num(1);\n case '%':\n return num(0) % num(1);\n case '^':\n return num(0) ** num(1);\n case 'min':\n return Math.min(...nums());\n case 'max':\n return Math.max(...nums());\n case 'abs':\n return Math.abs(num(0));\n case 'round':\n // Half away from zero, as MapLibre\n return Math.sign(num(0)) * Math.round(Math.abs(num(0)));\n case 'floor':\n return Math.floor(num(0));\n case 'ceil':\n return Math.ceil(num(0));\n case 'sqrt':\n return Math.sqrt(num(0));\n case 'ln':\n return Math.log(num(0));\n case 'log10':\n return Math.log10(num(0));\n case 'log2':\n return Math.log2(num(0));\n case 'pi':\n return Math.PI;\n case 'e':\n return Math.E;\n default:\n // Unsupported: no value (a filter drops the feature, a property takes its default)\n if (!warned.has(op)) {\n warned.add(op);\n console.warn(`isard: the style expression \"${op}\" is not supported`);\n }\n return null;\n }\n}\n\n// ── Filters ──\n\nconst LEGACY_COMPARISONS = new Set(['==', '!=', '<', '<=', '>', '>=']);\n\n/** Whether a filter (not `all`, `any`, `none`) is in the legacy form: `[\"==\", \"key\", value]`, `[\"in\", \"key\", a, b]`,\n * `[\"has\", \"key\"]`; a key and literal values, as MapLibre tells them from expressions */\nfunction isLegacyLeaf(f: Json[]): boolean {\n const [op, a, ...rest] = f;\n if (typeof op !== 'string' || typeof a !== 'string' || rest.some(Array.isArray)) return false;\n if (LEGACY_COMPARISONS.has(op)) return f.length === 3;\n if (op === 'in') return f.length !== 3 || !Array.isArray(f[2]);\n return op === '!in' || op === 'has' || op === '!has';\n}\n\nfunction legacyFilter(f: Json[], ctx: Context): boolean {\n const [op, key, ...rest] = f;\n const v = get(ctx, key);\n switch (op) {\n case '==':\n return v === rest[0];\n case '!=':\n return v !== rest[0];\n case '<':\n return (v as number) < (rest[0] as number);\n case '<=':\n return (v as number) <= (rest[0] as number);\n case '>':\n return (v as number) > (rest[0] as number);\n case '>=':\n return (v as number) >= (rest[0] as number);\n case 'in':\n return rest.includes(v as Json);\n case '!in':\n return !rest.includes(v as Json);\n case 'has':\n return v !== undefined;\n case '!has':\n return v === undefined;\n default:\n return true;\n }\n}\n\ntype Test = (ctx: Context) => boolean;\n\n/** Compiled filters, by filter object */\nconst compiled = new WeakMap<Json[], Test>();\n\n/** A filter as a function: `all`, `any`, `none` of their parts, each part legacy or an expression (they may mix) */\nfunction compile(f: Json): Test {\n if (!Array.isArray(f)) return () => Boolean(f);\n const hit = compiled.get(f);\n if (hit) return hit;\n let test: Test;\n const op = f[0];\n if (op === 'all' || op === 'any' || op === 'none') {\n const parts = f.slice(1).map(compile);\n if (op === 'all') test = (ctx) => parts.every((p) => p(ctx));\n else if (op === 'any') test = (ctx) => parts.some((p) => p(ctx));\n else test = (ctx) => !parts.some((p) => p(ctx));\n } else if (isLegacyLeaf(f)) {\n test = (ctx) => legacyFilter(f, ctx);\n } else {\n test = (ctx) => Boolean(evaluate(f, ctx));\n }\n compiled.set(f, test);\n return test;\n}\n\nexport function filter(f: Json | undefined, ctx: Context): boolean {\n if (f === undefined || f === null) return true;\n return compile(f)(ctx);\n}\n\n/** Whether a value depends on the feature (else only on the zoom, evaluated once per tile) */\nexport function isFeatureDependent(e: Json | undefined): boolean {\n if (e !== undefined && isFunction(e)) return e.property !== undefined;\n if (!Array.isArray(e)) return false;\n if (['get', 'has', '!has', 'geometry-type', 'properties', 'id'].includes(e[0] as string)) return true;\n return e.some((x) => isFeatureDependent(x));\n}\n\n/** A `{token}` text field (or an expression) to the text of a feature */\nexport function text(field: Json | undefined, ctx: Context): string {\n if (field === undefined || field === null) return '';\n if (typeof field === 'string') {\n return field.replace(/\\{([^}]+)\\}/g, (_, key: string) => {\n const v = ctx.properties[key];\n return v === undefined ? '' : String(v);\n });\n }\n const v = evaluate(field, ctx);\n if (Array.isArray(v)) {\n // A `format` value: its strings\n return v.filter((x) => typeof x === 'string').join('');\n }\n return v === undefined || v === null ? '' : String(v);\n}\n\n/** The font of a label from the first of its `text-font`: a family without its weight takes the regular one */\nexport function labelFont(font: string): string {\n return /Regular|Bold|Italic|Semibold|Light|Medium|Black/.test(font) ? font : `${font} Regular`;\n}\n\n/**\n * A value of the zoom only (an expression: `interpolate`, `step` of `[\"zoom\"]`) as stops `[[zoom, value], …]` for the\n * engine, which interpolates them linearly: evaluated at its own stops and at the whole zooms between (an exponential\n * curve followed closely), a step kept sharp just before its threshold\n */\nexport function zoomStops(e: Json): [number, number][] {\n const zooms = new Set<number>();\n const walk = (x: Json) => {\n if (!Array.isArray(x)) return;\n const zoomInput = (input: Json | undefined) => Array.isArray(input) && input[0] === 'zoom';\n if ((x[0] === 'interpolate' || x[0] === 'interpolate-hcl' || x[0] === 'interpolate-lab') && zoomInput(x[2])) {\n for (let i = 3; i < x.length; i += 2) zooms.add(Number(x[i]));\n } else if (x[0] === 'step' && zoomInput(x[1])) {\n for (let i = 3; i < x.length; i += 2) {\n const t = Number(x[i]);\n zooms.add(t);\n zooms.add(t - 0.01);\n }\n }\n for (const y of x) walk(y);\n };\n walk(e);\n const finite = [...zooms].filter(Number.isFinite);\n if (finite.length === 0) finite.push(0);\n const [lo, hi] = [Math.min(...finite), Math.max(...finite)];\n for (let z = Math.ceil(lo); z <= Math.floor(hi); z += 1) finite.push(z);\n return [...new Set(finite)]\n .sort((a, b) => a - b)\n .map((zoom) => [zoom, Number(evaluate(e, { zoom, properties: {}, type: 'Unknown' }))]);\n}\n"]}
|
|
1
|
+
{"version":3,"file":"vectorstyle.js","sourceRoot":"","sources":["../src/vectorstyle.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AA6F3C,MAAM,KAAK,GAAG,CAAC,SAAS,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,CAAC,CAAC;AAE5D,MAAM,UAAU,OAAO,CAAC,OAAoB,EAAE,IAAY;IACxD,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,CAAC,UAAU,EAAE,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,SAAS,EAAE,CAAC;AAC1F,CAAC;AAED,eAAe;AAEf,sDAAsD;AACtD,MAAM,UAAU,KAAK,CAAC,KAAc;IAClC,OAAO,aAAa,CAAC,KAAK,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,GAAG,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CA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AAC,CAAC,IAAI,EAAE,MAAM,CAAC,QAAQ,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;AAC3F,CAAC","sourcesContent":["/**\n * The parts of the MapLibre style specification a vector basemap needs, evaluated on the page: filters (legacy\n * `[\"==\", \"key\", value]` forms and expressions), property values given as constants, legacy functions (`{ stops }`\n * of zoom or of a property: exponential, interval, categorical, identity) or expressions (`get`, `has`, `concat`,\n * `interpolate`, `step`, `match`, `case`, `coalesce`, comparisons, `all`, `any`, `!`, `in`, `zoom`, arithmetic,\n * `format`, conversions and assertions, `upcase`, `downcase`, `literal`…; others give null, with a warning), colors\n * interpolated in RGBA, `{token}` text fields.\n */\nimport { parseCssColor } from './color.ts';\nimport type { TileFeature, Value } from './mvt.ts';\n\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json };\n\nexport interface StyleLayer {\n id: string;\n type: string;\n source?: string;\n 'source-layer'?: string;\n minzoom?: number;\n maxzoom?: number;\n filter?: Json;\n layout?: Record<string, Json>;\n paint?: Record<string, Json>;\n}\n\nexport interface Style {\n version: number;\n sources: Record<\n string,\n { type: string; tiles?: string[]; url?: string; maxzoom?: number; minzoom?: number; tileSize?: number }\n >;\n layers: StyleLayer[];\n glyphs?: string;\n /** One sprite's URL (without extension), or several with their ids (`id:name` names their images) */\n sprite?: string | { id: string; url: string }[];\n}\n\n/** A raster source of a style: its tile URL, its deepest level and the CSS pixels of its tiles (MapLibre's\n * `tileSize`: 512 by default) */\nexport interface RasterSource {\n tiles: string;\n maxzoom: number;\n tileSize: number;\n}\n\n/** How a label's text or icon meets the others (`*-allow-overlap` and `*-ignore-placement`, see `Overlap`) */\nexport type CandidateOverlap = boolean | 'allow' | 'ignore';\n\n/** The icon of a label, in style terms evaluated at the tile's zoom */\nexport interface CandidateIcon {\n /** Its image in the style's sprite */\n image: string;\n /** A number, or zoom stops */\n size: Json;\n anchor: string;\n offset: [number, number];\n rotate: number;\n /** `map` or `viewport` (`auto` resolved) */\n alignment: 'map' | 'viewport';\n overlap: CandidateOverlap;\n optional: boolean;\n fit: 'none' | 'width' | 'height' | 'both';\n padding: [number, number, number, number];\n color: string;\n opacity: number;\n}\n\n/** A label to shape and place, in style terms evaluated at the tile's zoom */\nexport interface LabelCandidate {\n /** Index of its style layer: higher ones are placed first */\n layer: number;\n /** Its text, empty for an icon alone */\n text: string;\n lon: number;\n lat: number;\n /** On a line: the direction there (degrees of longitude and latitude) */\n along?: [number, number];\n /** Its text runs along the line (`symbol-placement: line`, `text-rotation-alignment` not `viewport`) */\n textAlong?: boolean;\n textOptional?: boolean;\n icon?: CandidateIcon;\n font: string;\n size: Json;\n color: string;\n haloColor: string;\n haloWidth: number;\n anchor: string;\n offset: [number, number];\n maxWidth: number;\n lineHeight: number;\n overlap: CandidateOverlap;\n}\n\n/** What expressions see of a feature */\nexport interface Context {\n zoom: number;\n properties: Record<string, Value>;\n /** 'Point', 'LineString' or 'Polygon' */\n type: string;\n}\n\nconst TYPES = ['Unknown', 'Point', 'LineString', 'Polygon'];\n\nexport function context(feature: TileFeature, zoom: number): Context {\n return { zoom, properties: feature.properties, type: TYPES[feature.type] ?? 'Unknown' };\n}\n\n// ── Colors ──\n\n/** A color to RGBA 0-1, undefined if it is not one */\nexport function color(value: unknown): [number, number, number, number] | undefined {\n return parseCssColor(value);\n}\n\nexport function css([r, g, b, a]: [number, number, number, number]): string {\n return `rgba(${Math.round(r * 255)},${Math.round(g * 255)},${Math.round(b * 255)},${a})`;\n}\n\n// ── Interpolation ──\n\n/** Factor between two stops: linear, or exponential of `base` */\nfunction factor(x: number, x0: number, x1: number, base = 1): number {\n const d = x1 - x0;\n if (d === 0) return 0;\n const t = x - x0;\n return base === 1 ? t / d : (base ** t - 1) / (base ** d - 1);\n}\n\nfunction mix(a: unknown, b: unknown, t: number): unknown {\n if (typeof a === 'number' && typeof b === 'number') return a + (b - a) * t;\n const ca = color(a);\n const cb = color(b);\n if (ca && cb)\n return css(\n [0, 1, 2, 3].map((i) => (ca[i] ?? 0) + ((cb[i] ?? 0) - (ca[i] ?? 0)) * t) as [number, number, number, number],\n );\n if (Array.isArray(a) && Array.isArray(b)) return a.map((v, i) => mix(v, b[i], t));\n return t < 0.5 ? a : b;\n}\n\n// ── Legacy functions ──\n\ninterface LegacyFunction {\n stops: [Json, Json][];\n base?: number;\n type?: string;\n property?: string;\n default?: Json;\n}\n\nfunction isFunction(v: Json): v is { [key: string]: Json } & LegacyFunction {\n return typeof v === 'object' && v !== null && !Array.isArray(v) && Array.isArray((v as { stops?: Json }).stops);\n}\n\nfunction legacy(f: LegacyFunction, ctx: Context): unknown {\n const input = f.property === undefined ? ctx.zoom : ctx.properties[f.property];\n const stops = f.stops;\n const type =\n f.type ?? (f.property === undefined || typeof stops[0]?.[0] === 'number' ? 'exponential' : 'categorical');\n if (type === 'identity') return input ?? f.default;\n if (type === 'categorical') return stops.find(([k]) => k === input)?.[1] ?? f.default;\n if (typeof input !== 'number' || !stops.length) return f.default ?? stops[0]?.[1];\n // Zoom-and-property stops ({ zoom, value } keys) are taken at their zoom only\n const key = (s: [Json, Json]) =>\n typeof s[0] === 'object' && s[0] !== null ? Number((s[0] as { zoom?: number }).zoom) : Number(s[0]);\n const first = stops[0];\n if (!first) return f.default;\n if (input <= key(first)) return first[1];\n for (let i = 1; i < stops.length; i += 1) {\n const [s0, s1] = [stops[i - 1], stops[i]];\n if (!s0 || !s1) continue;\n if (input < key(s1)) {\n if (type === 'interval') return s0[1];\n return mix(s0[1], s1[1], factor(input, key(s0), key(s1), f.base ?? 1));\n }\n }\n return stops.at(-1)?.[1];\n}\n\n// ── Expressions ──\n\nfunction get(ctx: Context, key: unknown): unknown {\n if (key === '$type') return ctx.type;\n return typeof key === 'string' ? ctx.properties[key] : undefined;\n}\n\n/** The operators `evaluate` knows */\nconst OPERATORS = new Set([\n 'literal',\n 'zoom',\n 'get',\n 'has',\n '!has',\n 'properties',\n 'id',\n 'geometry-type',\n 'concat',\n 'format',\n 'image',\n 'number-format',\n 'to-number',\n 'to-string',\n 'to-boolean',\n 'to-color',\n 'number',\n 'string',\n 'boolean',\n 'typeof',\n 'length',\n 'at',\n 'upcase',\n 'downcase',\n 'coalesce',\n '!',\n 'all',\n 'any',\n '==',\n '!=',\n '<',\n '<=',\n '>',\n '>=',\n 'in',\n 'case',\n 'match',\n 'step',\n 'interpolate',\n 'interpolate-hcl',\n 'interpolate-lab',\n 'rgb',\n 'rgba',\n '+',\n '-',\n '*',\n '/',\n '%',\n '^',\n 'min',\n 'max',\n 'abs',\n 'round',\n 'floor',\n 'ceil',\n 'sqrt',\n 'ln',\n 'log10',\n 'log2',\n 'pi',\n 'e',\n]);\n\n/** Whether a value is an expression (an array starting with a known operator), not a literal array */\nexport function isExpression(e: unknown): e is Json[] {\n return Array.isArray(e) && typeof e[0] === 'string' && OPERATORS.has(e[0]);\n}\n\n/** Operators already warned about */\nconst warned = new Set<string>();\n\nconst str = (v: unknown) => (v === undefined || v === null ? '' : String(v));\n\nexport function evaluate(e: Json, ctx: Context): unknown {\n if (isFunction(e)) return legacy(e, ctx);\n if (!Array.isArray(e)) return e;\n const [op, ...args] = e;\n if (typeof op !== 'string') return e;\n const ev = (i: number) => evaluate(args[i] ?? null, ctx);\n const num = (i: number) => Number(ev(i));\n const nums = () => args.map((_, i) => num(i));\n switch (op) {\n case 'literal':\n return args[0];\n case 'zoom':\n return ctx.zoom;\n case 'get':\n return get(ctx, ev(0));\n case 'has':\n return get(ctx, ev(0)) !== undefined;\n case '!has':\n return get(ctx, ev(0)) === undefined;\n case 'properties':\n return ctx.properties;\n case 'id':\n return null;\n case 'geometry-type':\n return ctx.type;\n case 'concat':\n return args.map((_, i) => str(ev(i))).join('');\n case 'format':\n // Its text sections, the options of each (objects) left out\n return args.map((a, i) => (a !== null && typeof a === 'object' && !Array.isArray(a) ? '' : str(ev(i)))).join('');\n case 'image':\n return ev(0);\n case 'number-format': {\n const options = (args[1] ?? {}) as {\n locale?: string;\n 'min-fraction-digits'?: number;\n 'max-fraction-digits'?: number;\n };\n const n = num(0);\n if (!Number.isFinite(n)) return '';\n return n.toLocaleString(options.locale, {\n minimumFractionDigits: options['min-fraction-digits'],\n maximumFractionDigits: options['max-fraction-digits'],\n });\n }\n case 'to-number': {\n for (let i = 0; i < args.length; i += 1) {\n const v = ev(i);\n const n = typeof v === 'string' && v.trim() === '' ? Number.NaN : Number(v);\n if (v !== null && v !== undefined && !Number.isNaN(n)) return n;\n }\n return 0;\n }\n case 'to-string':\n return str(ev(0));\n case 'to-boolean': {\n const v = ev(0);\n return !(v === '' || v === 0 || v === false || v === null || v === undefined || Number.isNaN(v));\n }\n case 'to-color':\n case 'number':\n case 'string':\n case 'boolean': {\n // Assertions: the first value of the type, else the last one\n const types: Record<string, (v: unknown) => boolean> = {\n 'to-color': (v) => color(v) !== undefined,\n number: (v) => typeof v === 'number',\n string: (v) => typeof v === 'string',\n boolean: (v) => typeof v === 'boolean',\n };\n for (let i = 0; i < args.length; i += 1) {\n const v = ev(i);\n if (types[op]?.(v)) return v;\n }\n return args.length ? ev(args.length - 1) : null;\n }\n case 'typeof': {\n const v = ev(0);\n if (v === null || v === undefined) return 'null';\n return Array.isArray(v) ? 'array' : typeof v;\n }\n case 'length': {\n const v = ev(0);\n return typeof v === 'string' || Array.isArray(v) ? v.length : 0;\n }\n case 'at': {\n const v = ev(1);\n return Array.isArray(v) ? (v[num(0)] ?? null) : null;\n }\n case 'upcase':\n return str(ev(0)).toUpperCase();\n case 'downcase':\n return str(ev(0)).toLowerCase();\n case 'coalesce':\n for (let i = 0; i < args.length; i += 1) {\n const v = ev(i);\n if (v !== undefined && v !== null) return v;\n }\n return null;\n case '!':\n return !ev(0);\n case 'all':\n return args.every((_, i) => Boolean(ev(i)));\n case 'any':\n return args.some((_, i) => Boolean(ev(i)));\n case '==':\n return ev(0) === ev(1);\n case '!=':\n return ev(0) !== ev(1);\n case '<':\n return (ev(0) as number) < (ev(1) as number);\n case '<=':\n return (ev(0) as number) <= (ev(1) as number);\n case '>':\n return (ev(0) as number) > (ev(1) as number);\n case '>=':\n return (ev(0) as number) >= (ev(1) as number);\n case 'in': {\n const haystack = ev(1);\n const needle = ev(0);\n if (typeof haystack === 'string') return haystack.includes(String(needle));\n return Array.isArray(haystack) && haystack.includes(needle as Json);\n }\n case 'case': {\n for (let i = 0; i + 1 < args.length; i += 2) if (ev(i)) return ev(i + 1);\n return ev(args.length - 1);\n }\n case 'match': {\n const input = ev(0);\n for (let i = 1; i + 1 < args.length; i += 2) {\n const label = args[i];\n if (Array.isArray(label) ? label.includes(input as Json) : label === input) return ev(i + 1);\n }\n return ev(args.length - 1);\n }\n case 'step': {\n const input = num(0);\n let out = ev(1);\n for (let i = 2; i + 1 < args.length; i += 2) {\n if (input >= Number(args[i])) out = ev(i + 1);\n else break;\n }\n return out;\n }\n case 'interpolate':\n case 'interpolate-hcl':\n case 'interpolate-lab': {\n const kind = args[0];\n const input = num(1);\n const base = Array.isArray(kind) && kind[0] === 'exponential' ? Number(kind[1]) : 1;\n const stops: [number, Json][] = [];\n for (let i = 2; i + 1 < args.length; i += 2) stops.push([Number(args[i]), args[i + 1] ?? null]);\n const first = stops[0];\n if (!first) return null;\n if (input <= first[0]) return evaluate(first[1], ctx);\n for (let i = 1; i < stops.length; i += 1) {\n const [s0, s1] = [stops[i - 1], stops[i]];\n if (s0 && s1 && input < s1[0])\n return mix(evaluate(s0[1], ctx), evaluate(s1[1], ctx), factor(input, s0[0], s1[0], base));\n }\n return evaluate(stops.at(-1)?.[1] ?? null, ctx);\n }\n case 'rgb':\n case 'rgba':\n return css([num(0) / 255, num(1) / 255, num(2) / 255, args.length > 3 ? num(3) : 1]);\n case '+':\n return nums().reduce((a, b) => a + b, 0);\n case '*':\n return nums().reduce((a, b) => a * b, 1);\n case '-':\n return args.length === 1 ? -num(0) : num(0) - num(1);\n case '/':\n return num(0) / num(1);\n case '%':\n return num(0) % num(1);\n case '^':\n return num(0) ** num(1);\n case 'min':\n return Math.min(...nums());\n case 'max':\n return Math.max(...nums());\n case 'abs':\n return Math.abs(num(0));\n case 'round':\n // Half away from zero, as MapLibre\n return Math.sign(num(0)) * Math.round(Math.abs(num(0)));\n case 'floor':\n return Math.floor(num(0));\n case 'ceil':\n return Math.ceil(num(0));\n case 'sqrt':\n return Math.sqrt(num(0));\n case 'ln':\n return Math.log(num(0));\n case 'log10':\n return Math.log10(num(0));\n case 'log2':\n return Math.log2(num(0));\n case 'pi':\n return Math.PI;\n case 'e':\n return Math.E;\n default:\n // Unsupported: no value (a filter drops the feature, a property takes its default)\n if (!warned.has(op)) {\n warned.add(op);\n console.warn(`isard: the style expression \"${op}\" is not supported`);\n }\n return null;\n }\n}\n\n// ── Filters ──\n\nconst LEGACY_COMPARISONS = new Set(['==', '!=', '<', '<=', '>', '>=']);\n\n/** Whether a filter (not `all`, `any`, `none`) is in the legacy form: `[\"==\", \"key\", value]`, `[\"in\", \"key\", a, b]`,\n * `[\"has\", \"key\"]`; a key and literal values, as MapLibre tells them from expressions */\nfunction isLegacyLeaf(f: Json[]): boolean {\n const [op, a, ...rest] = f;\n if (typeof op !== 'string' || typeof a !== 'string' || rest.some(Array.isArray)) return false;\n if (LEGACY_COMPARISONS.has(op)) return f.length === 3;\n if (op === 'in') return f.length !== 3 || !Array.isArray(f[2]);\n return op === '!in' || op === 'has' || op === '!has';\n}\n\nfunction legacyFilter(f: Json[], ctx: Context): boolean {\n const [op, key, ...rest] = f;\n const v = get(ctx, key);\n switch (op) {\n case '==':\n return v === rest[0];\n case '!=':\n return v !== rest[0];\n case '<':\n return (v as number) < (rest[0] as number);\n case '<=':\n return (v as number) <= (rest[0] as number);\n case '>':\n return (v as number) > (rest[0] as number);\n case '>=':\n return (v as number) >= (rest[0] as number);\n case 'in':\n return rest.includes(v as Json);\n case '!in':\n return !rest.includes(v as Json);\n case 'has':\n return v !== undefined;\n case '!has':\n return v === undefined;\n default:\n return true;\n }\n}\n\ntype Test = (ctx: Context) => boolean;\n\n/** Compiled filters, by filter object */\nconst compiled = new WeakMap<Json[], Test>();\n\n/** A filter as a function: `all`, `any`, `none` of their parts, each part legacy or an expression (they may mix) */\nfunction compile(f: Json): Test {\n if (!Array.isArray(f)) return () => Boolean(f);\n const hit = compiled.get(f);\n if (hit) return hit;\n let test: Test;\n const op = f[0];\n if (op === 'all' || op === 'any' || op === 'none') {\n const parts = f.slice(1).map(compile);\n if (op === 'all') test = (ctx) => parts.every((p) => p(ctx));\n else if (op === 'any') test = (ctx) => parts.some((p) => p(ctx));\n else test = (ctx) => !parts.some((p) => p(ctx));\n } else if (isLegacyLeaf(f)) {\n test = (ctx) => legacyFilter(f, ctx);\n } else {\n test = (ctx) => Boolean(evaluate(f, ctx));\n }\n compiled.set(f, test);\n return test;\n}\n\nexport function filter(f: Json | undefined, ctx: Context): boolean {\n if (f === undefined || f === null) return true;\n return compile(f)(ctx);\n}\n\n/** Whether a value depends on the feature (else only on the zoom, evaluated once per tile) */\nexport function isFeatureDependent(e: Json | undefined): boolean {\n if (e !== undefined && isFunction(e)) return e.property !== undefined;\n if (!Array.isArray(e)) return false;\n if (['get', 'has', '!has', 'geometry-type', 'properties', 'id'].includes(e[0] as string)) return true;\n return e.some((x) => isFeatureDependent(x));\n}\n\n/** A `{token}` text field (or an expression) to the text of a feature */\nexport function text(field: Json | undefined, ctx: Context): string {\n if (field === undefined || field === null) return '';\n if (typeof field === 'string') {\n return field.replace(/\\{([^}]+)\\}/g, (_, key: string) => {\n const v = ctx.properties[key];\n return v === undefined ? '' : String(v);\n });\n }\n const v = evaluate(field, ctx);\n if (Array.isArray(v)) {\n // A `format` value: its strings\n return v.filter((x) => typeof x === 'string').join('');\n }\n return v === undefined || v === null ? '' : String(v);\n}\n\n/** The font of a label from the first of its `text-font`: a family without its weight takes the regular one */\nexport function labelFont(font: string): string {\n return /Regular|Bold|Italic|Semibold|Light|Medium|Black/.test(font) ? font : `${font} Regular`;\n}\n\n/**\n * A value of the zoom only (an expression: `interpolate`, `step` of `[\"zoom\"]`) as stops `[[zoom, value], …]` for the\n * engine, which interpolates them linearly: evaluated at its own stops and at the whole zooms between (an exponential\n * curve followed closely), a step kept sharp just before its threshold\n */\nexport function zoomStops(e: Json): [number, number][] {\n const zooms = new Set<number>();\n const walk = (x: Json) => {\n if (!Array.isArray(x)) return;\n const zoomInput = (input: Json | undefined) => Array.isArray(input) && input[0] === 'zoom';\n if ((x[0] === 'interpolate' || x[0] === 'interpolate-hcl' || x[0] === 'interpolate-lab') && zoomInput(x[2])) {\n for (let i = 3; i < x.length; i += 2) zooms.add(Number(x[i]));\n } else if (x[0] === 'step' && zoomInput(x[1])) {\n for (let i = 3; i < x.length; i += 2) {\n const t = Number(x[i]);\n zooms.add(t);\n zooms.add(t - 0.01);\n }\n }\n for (const y of x) walk(y);\n };\n walk(e);\n const finite = [...zooms].filter(Number.isFinite);\n if (finite.length === 0) finite.push(0);\n const [lo, hi] = [Math.min(...finite), Math.max(...finite)];\n for (let z = Math.ceil(lo); z <= Math.floor(hi); z += 1) finite.push(z);\n return [...new Set(finite)]\n .sort((a, b) => a - b)\n .map((zoom) => [zoom, Number(evaluate(e, { zoom, properties: {}, type: 'Unknown' }))]);\n}\n"]}
|
package/dist/vectortiles.d.ts
CHANGED
|
@@ -1,17 +1,19 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Vector basemaps from a MapLibre style (OpenFreeMap's Positron by default): the fills, lines, circles and raster
|
|
3
|
-
* layers drawn tile by tile in workers into the raster pool, so that they lie on the relief like any basemap and
|
|
4
|
-
* with the hillshade in one pass; and the labels of the style's symbol layers in a symbol layer of their own,
|
|
5
|
-
* above the application's layers (as MapLibre's `beforeId: firstSymbol` does),
|
|
3
|
+
* layers drawn tile by tile in workers into the raster pool, so that they lie on the relief like any basemap and
|
|
4
|
+
* composite with the hillshade in one pass; and the labels of the style's symbol layers in a symbol layer of their own,
|
|
5
|
+
* kept above the application's layers (as MapLibre's `beforeId: firstSymbol` does), listed by the workers, shaped in
|
|
6
|
+
* the page once per vector tile, placed by the engine.
|
|
6
7
|
*
|
|
7
8
|
* Any subset of the style can be drawn on its own raster layer (`raster({ layers })`), at its own place in the stack:
|
|
8
9
|
* rivers from the basemap's data over a flood layer, for instance, restyled with `extraLayers`.
|
|
9
10
|
*/
|
|
10
11
|
import type { Priority } from './basemap.worker.ts';
|
|
12
|
+
import type { Feature, Size } from './features.ts';
|
|
11
13
|
import type { RasterLayer } from './layers.ts';
|
|
12
14
|
import type { GeoMap } from './map.ts';
|
|
13
15
|
import type { SymbolLayer } from './symbols.ts';
|
|
14
|
-
import { type LabelCandidate, type RasterSource, type Style, type StyleLayer } from './vectorstyle.ts';
|
|
16
|
+
import { type Json, type LabelCandidate, type RasterSource, type Style, type StyleLayer } from './vectorstyle.ts';
|
|
15
17
|
import type { Camera } from './wasm/isard.js';
|
|
16
18
|
/** OpenFreeMap's styles: OpenStreetMap data in the OpenMapTiles schema, worldwide, free and without a key */
|
|
17
19
|
export declare const OPENFREEMAP_STYLES: {
|
|
@@ -47,6 +49,9 @@ export interface VectorTilesOptions {
|
|
|
47
49
|
}
|
|
48
50
|
/** The credits of a known style: OpenFreeMap's, PLAN.IGN's */
|
|
49
51
|
export declare function styleAttribution(style: string | Style): string | undefined;
|
|
52
|
+
/** Text or icon size of a style (a number, legacy stops, or the stops of a zoom expression made by the worker) as a
|
|
53
|
+
* size for the symbol layer */
|
|
54
|
+
export declare function size(value: Json, fallback?: number): Size;
|
|
50
55
|
/** Default size of a basemap worker pool: cores - 1, 1 to 4 */
|
|
51
56
|
export declare function defaultWorkerCount(): number;
|
|
52
57
|
/** Default URL of the basemap worker, next to the module */
|
|
@@ -60,6 +65,10 @@ export declare function workerIndex(vz: number, vx: number, vy: number, count: n
|
|
|
60
65
|
export declare function rendererKey(namespace: string, n: number): string;
|
|
61
66
|
/** What the pool needs of a worker (a `Worker`, or a stand-in in tests) */
|
|
62
67
|
export type PoolWorker = Pick<Worker, 'postMessage' | 'terminate' | 'onmessage' | 'onerror' | 'onmessageerror'>;
|
|
68
|
+
/** The labels of a vector tile: features by style layer (its index in the style), the higher layers first */
|
|
69
|
+
type TileLabels = [layer: number, features: Feature<LabelCandidate>[]][];
|
|
70
|
+
/** A tile's label candidates as features, by style layer */
|
|
71
|
+
export declare function tileLabels(candidates: readonly LabelCandidate[]): TileLabels;
|
|
63
72
|
export declare class VectorTiles {
|
|
64
73
|
private readonly map;
|
|
65
74
|
private readonly pool;
|
|
@@ -91,9 +100,11 @@ export declare class VectorTiles {
|
|
|
91
100
|
private load;
|
|
92
101
|
/** The fonts of the style's labels, for its glyphs (the first of each `text-font`, as the workers take it) */
|
|
93
102
|
private static fonts;
|
|
94
|
-
/** The style's
|
|
95
|
-
private
|
|
96
|
-
private
|
|
103
|
+
/** The style's sprites (their JSON and their images), loaded once, for the fill patterns and the icons */
|
|
104
|
+
private sprites;
|
|
105
|
+
private loadSprites;
|
|
106
|
+
/** Prefix of the names of its sprites' images among the map's icons */
|
|
107
|
+
private get iconPrefix();
|
|
97
108
|
private request;
|
|
98
109
|
/** Sends a renderer of these layers to every worker; returns its key */
|
|
99
110
|
private renderer;
|
|
@@ -122,3 +133,4 @@ export declare class VectorTiles {
|
|
|
122
133
|
/** Stops its workers' work and removes its raster and label layers from the map (those still there) */
|
|
123
134
|
destroy(): void;
|
|
124
135
|
}
|
|
136
|
+
export {};
|
package/dist/vectortiles.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
import { OPENFREEMAP_ATTRIBUTION } from "./basemaps.js";
|
|
2
|
+
import { mercatorX, mercatorY } from "./geo.js";
|
|
2
3
|
import { IGN_ATTRIBUTION } from "./geoplateforme.js";
|
|
4
|
+
import { loadSprites, readPixels } from "./icons.js";
|
|
5
|
+
import { Lru } from "./lru.js";
|
|
6
|
+
import { SOURCE_CACHE } from "./resample.js";
|
|
3
7
|
import { labelFont, } from "./vectorstyle.js";
|
|
4
8
|
/** OpenFreeMap's styles: OpenStreetMap data in the OpenMapTiles schema, worldwide, free and without a key */
|
|
5
9
|
export const OPENFREEMAP_STYLES = {
|
|
@@ -30,9 +34,9 @@ export function styleAttribution(style) {
|
|
|
30
34
|
return IGN_ATTRIBUTION;
|
|
31
35
|
return undefined;
|
|
32
36
|
}
|
|
33
|
-
/** Text size of a style (a number, legacy stops, or the stops of a zoom expression made by the worker) as a
|
|
34
|
-
* the symbol layer */
|
|
35
|
-
function size(value) {
|
|
37
|
+
/** Text or icon size of a style (a number, legacy stops, or the stops of a zoom expression made by the worker) as a
|
|
38
|
+
* size for the symbol layer */
|
|
39
|
+
export function size(value, fallback = 16) {
|
|
36
40
|
if (typeof value === 'number')
|
|
37
41
|
return value;
|
|
38
42
|
if (Array.isArray(value) && value.length > 0 && value.every(Array.isArray)) {
|
|
@@ -44,7 +48,7 @@ function size(value) {
|
|
|
44
48
|
return [Number(z), Number(v)];
|
|
45
49
|
});
|
|
46
50
|
}
|
|
47
|
-
return
|
|
51
|
+
return fallback;
|
|
48
52
|
}
|
|
49
53
|
/** Fetches a JSON document (a style, a TileJSON) */
|
|
50
54
|
async function json(url) {
|
|
@@ -69,9 +73,8 @@ export function tilePriority(z, x, y, camera) {
|
|
|
69
73
|
return 'low';
|
|
70
74
|
const n = 2 ** z;
|
|
71
75
|
const [lon, lat] = camera.center;
|
|
72
|
-
const cx = (
|
|
73
|
-
const
|
|
74
|
-
const cy = ((1 - Math.log(Math.tan(phi) + 1 / Math.cos(phi)) / Math.PI) / 2) * n;
|
|
76
|
+
const cx = mercatorX(lon) * n;
|
|
77
|
+
const cy = mercatorY(lat) * n;
|
|
75
78
|
// Across the antimeridian, the short way
|
|
76
79
|
let dx = Math.abs(x + 0.5 - cx) % n;
|
|
77
80
|
dx = Math.min(dx, n - dx);
|
|
@@ -190,6 +193,19 @@ export class BasemapWorkers {
|
|
|
190
193
|
worker.postMessage({ ...work, id });
|
|
191
194
|
});
|
|
192
195
|
}
|
|
196
|
+
/** The altitudes of a PNG relief tile `z`/`x`/`y` at `url`, decoded by a worker (see `fetchHeights`) */
|
|
197
|
+
heights(url, encoding, floor, [z, x, y], signal, owner) {
|
|
198
|
+
const work = { type: 'heights', url, encoding, ...(floor === undefined ? {} : { floor }) };
|
|
199
|
+
return this.request(this.worker(z, x, y), work, owner, signal).then((r) => ('heights' in r ? r.heights : null));
|
|
200
|
+
}
|
|
201
|
+
/** Mercator tile `z`/`x`/`y` reprojected by a worker from the source images of its plan (see `resampler`) */
|
|
202
|
+
reproject(job, [z, x, y], signal, owner) {
|
|
203
|
+
// Blocks of 4 × 4 Mercator tiles go to the same worker: neighbours share source tiles, each worker keeps its share
|
|
204
|
+
const worker = this.worker(Math.max(0, z - 2), x >> 2, y >> 2);
|
|
205
|
+
const cached = Math.max(16, Math.ceil(SOURCE_CACHE / this.workers.length));
|
|
206
|
+
const work = { type: 'reproject', job, cached };
|
|
207
|
+
return this.request(worker, work, owner, signal).then((r) => ('image' in r ? r.image : null));
|
|
208
|
+
}
|
|
193
209
|
/** Cancels the requests of an owner (the workers stop them) */
|
|
194
210
|
cancel(owner) {
|
|
195
211
|
for (const [id, p] of this.pending) {
|
|
@@ -213,6 +229,31 @@ export class BasemapWorkers {
|
|
|
213
229
|
p.reject(new DOMException('isard: vector tiles destroyed', 'AbortError'));
|
|
214
230
|
}
|
|
215
231
|
}
|
|
232
|
+
/** A tile's label candidates as features, by style layer */
|
|
233
|
+
export function tileLabels(candidates) {
|
|
234
|
+
const byLayer = new Map();
|
|
235
|
+
for (const p of candidates) {
|
|
236
|
+
const feature = {
|
|
237
|
+
type: 'Feature',
|
|
238
|
+
properties: p,
|
|
239
|
+
geometry: p.along
|
|
240
|
+
? {
|
|
241
|
+
type: 'LineString',
|
|
242
|
+
coordinates: [
|
|
243
|
+
[p.lon - p.along[0] / 2, p.lat - p.along[1] / 2],
|
|
244
|
+
[p.lon + p.along[0] / 2, p.lat + p.along[1] / 2],
|
|
245
|
+
],
|
|
246
|
+
}
|
|
247
|
+
: { type: 'Point', coordinates: [p.lon, p.lat] },
|
|
248
|
+
};
|
|
249
|
+
const list = byLayer.get(p.layer);
|
|
250
|
+
if (list)
|
|
251
|
+
list.push(feature);
|
|
252
|
+
else
|
|
253
|
+
byLayer.set(p.layer, [feature]);
|
|
254
|
+
}
|
|
255
|
+
return [...byLayer].sort((a, b) => b[0] - a[0]);
|
|
256
|
+
}
|
|
216
257
|
export class VectorTiles {
|
|
217
258
|
map;
|
|
218
259
|
pool;
|
|
@@ -288,21 +329,15 @@ export class VectorTiles {
|
|
|
288
329
|
}
|
|
289
330
|
return [...fonts];
|
|
290
331
|
}
|
|
291
|
-
/** The style's
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
this.
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
}
|
|
301
|
-
catch {
|
|
302
|
-
return undefined;
|
|
303
|
-
}
|
|
304
|
-
})();
|
|
305
|
-
return this.sprite;
|
|
332
|
+
/** The style's sprites (their JSON and their images), loaded once, for the fill patterns and the icons */
|
|
333
|
+
sprites;
|
|
334
|
+
loadSprites(sprite) {
|
|
335
|
+
this.sprites ??= loadSprites(sprite).catch(() => []);
|
|
336
|
+
return this.sprites;
|
|
337
|
+
}
|
|
338
|
+
/** Prefix of the names of its sprites' images among the map's icons */
|
|
339
|
+
get iconPrefix() {
|
|
340
|
+
return `${this.namespace}/`;
|
|
306
341
|
}
|
|
307
342
|
request(vz, vx, vy, work, signal) {
|
|
308
343
|
if (this.destroyed)
|
|
@@ -315,11 +350,11 @@ export class VectorTiles {
|
|
|
315
350
|
const key = rendererKey(this.namespace, this.keys++);
|
|
316
351
|
const layers = [...style.layers.filter(select), ...extra];
|
|
317
352
|
const patterns = layers.some((l) => l.paint?.['fill-pattern'] !== undefined);
|
|
318
|
-
// The
|
|
319
|
-
const
|
|
353
|
+
// The images are downloaded once, copied to each worker
|
|
354
|
+
const sprites = patterns && style.sprite ? await this.loadSprites(style.sprite) : [];
|
|
320
355
|
if (this.destroyed)
|
|
321
356
|
throw new DOMException('isard: vector tiles destroyed', 'AbortError');
|
|
322
|
-
this.pool.broadcast({ type: 'init', key, tiles, maxzoom, layers, rasters, ...(
|
|
357
|
+
this.pool.broadcast({ type: 'init', key, tiles, maxzoom, layers, rasters, ...(sprites.length ? { sprites } : {}) });
|
|
323
358
|
this.renderers.push(key);
|
|
324
359
|
return { key, maxzoom };
|
|
325
360
|
}
|
|
@@ -375,19 +410,41 @@ export class VectorTiles {
|
|
|
375
410
|
maxWidth: (p) => p.maxWidth,
|
|
376
411
|
lineHeight: (p) => p.lineHeight,
|
|
377
412
|
overlap: (p) => p.overlap,
|
|
378
|
-
placement: 'line',
|
|
413
|
+
placement: (p) => (p.textAlong ? 'line' : 'point'),
|
|
414
|
+
textOptional: (p) => p.textOptional === true,
|
|
415
|
+
icon: (p) => (p.icon ? this.iconPrefix + p.icon.image : ''),
|
|
416
|
+
iconSize: (p) => size(p.icon?.size ?? 1, 1),
|
|
417
|
+
iconAnchor: (p) => (p.icon?.anchor ?? 'center'),
|
|
418
|
+
iconOffset: (p) => p.icon?.offset ?? [0, 0],
|
|
419
|
+
iconRotate: (p) => p.icon?.rotate ?? 0,
|
|
420
|
+
iconRotationAlignment: (p) => p.icon?.alignment ?? 'viewport',
|
|
421
|
+
iconOverlap: (p) => p.icon?.overlap ?? false,
|
|
422
|
+
iconOptional: (p) => p.icon?.optional ?? false,
|
|
423
|
+
iconTextFit: (p) => p.icon?.fit ?? 'none',
|
|
424
|
+
iconTextFitPadding: (p) => p.icon?.padding ?? [0, 0, 0, 0],
|
|
425
|
+
iconColor: (p) => p.icon?.color ?? '#000',
|
|
426
|
+
iconOpacity: (p) => p.icon?.opacity ?? 1,
|
|
379
427
|
});
|
|
380
428
|
this.map.keepOnTop(symbol);
|
|
381
429
|
this.layers.push(symbol);
|
|
382
|
-
const renderer = this.ready.then(({ style }) => {
|
|
430
|
+
const renderer = this.ready.then(async ({ style }) => {
|
|
383
431
|
// The style's fonts from its own glyphs
|
|
384
432
|
if (style.glyphs)
|
|
385
433
|
this.map.glyphs.register(style.glyphs, VectorTiles.fonts(style));
|
|
434
|
+
// Its icons from its sprites, before the first labels
|
|
435
|
+
const icons = style.layers.some((l) => l.type === 'symbol' && l.layout?.['icon-image'] !== undefined);
|
|
436
|
+
if (icons && style.sprite) {
|
|
437
|
+
for (const sprite of await this.loadSprites(style.sprite)) {
|
|
438
|
+
if (!this.destroyed)
|
|
439
|
+
this.map.icons.addSprite(this.iconPrefix, sprite.icons, () => readPixels(sprite.image));
|
|
440
|
+
}
|
|
441
|
+
}
|
|
386
442
|
return this.renderer((l) => l.type === 'symbol' && layers(l), []);
|
|
387
443
|
});
|
|
388
444
|
renderer.catch(() => undefined);
|
|
389
|
-
/** The labels of the tiles, the
|
|
390
|
-
|
|
445
|
+
/** The labels of the tiles, as features by style layer, the higher layers first: each list is given to the symbol
|
|
446
|
+
* layer as a group, shaped once while the tile is kept */
|
|
447
|
+
const tiles = new Lru(256);
|
|
391
448
|
let generation = 0;
|
|
392
449
|
/** The tiles whose labels are shown */
|
|
393
450
|
let shown = '';
|
|
@@ -400,12 +457,9 @@ export class VectorTiles {
|
|
|
400
457
|
const z = Math.max(0, Math.min(Math.floor(camera.zoom), maxzoom));
|
|
401
458
|
const n = 2 ** z;
|
|
402
459
|
const [west, south, east, north] = this.map.getBounds();
|
|
403
|
-
const tx = (lon) => Math.floor((
|
|
404
|
-
const ty = (lat) =>
|
|
405
|
-
|
|
406
|
-
return Math.floor(((1 - Math.log(Math.tan(phi) + 1 / Math.cos(phi)) / Math.PI) / 2) * n);
|
|
407
|
-
};
|
|
408
|
-
const [cx, cy] = [((camera.center[0] + 180) / 360) * n, ty(camera.center[1])];
|
|
460
|
+
const tx = (lon) => Math.floor(mercatorX(lon) * n);
|
|
461
|
+
const ty = (lat) => Math.floor(mercatorY(lat) * n);
|
|
462
|
+
const [cx, cy] = [mercatorX(camera.center[0]) * n, ty(camera.center[1])];
|
|
409
463
|
// The tiles of the bounds, within a window around the center: a tilted view's bounds reach far, and only the
|
|
410
464
|
// nearest `maxTiles` are kept anyway
|
|
411
465
|
const reach = Math.ceil(Math.sqrt(maxTiles)) + 2;
|
|
@@ -423,58 +477,46 @@ export class VectorTiles {
|
|
|
423
477
|
wanted.push([x, y]);
|
|
424
478
|
// Nearest to the center first, at most `maxTiles` (tilted views reach far)
|
|
425
479
|
wanted.sort((a, b) => Math.hypot(a[0] + 0.5 - cx, a[1] + 0.5 - cy) - Math.hypot(b[0] + 0.5 - cx, b[1] + 0.5 - cy));
|
|
426
|
-
|
|
480
|
+
// Past the source's deepest level, its tiles' labels at the zoom of the view (the layers of the deeper zooms)
|
|
481
|
+
const zoom = Math.max(z, Math.min(Math.floor(camera.zoom), 24));
|
|
482
|
+
const keys = wanted.slice(0, maxTiles).map(([x, y]) => `${z}/${x}/${y}${zoom > z ? `@${zoom}` : ''}`);
|
|
427
483
|
// The same tiles as the labels shown: nothing to do
|
|
428
484
|
const set = keys.join(' ');
|
|
429
485
|
if (set === shown)
|
|
430
486
|
return;
|
|
431
487
|
const lists = await Promise.all(keys.map((k, index) => {
|
|
432
488
|
let p = tiles.get(k);
|
|
433
|
-
if (p)
|
|
434
|
-
// Used again: the most recent
|
|
435
|
-
tiles.delete(k);
|
|
436
|
-
tiles.set(k, p);
|
|
489
|
+
if (p)
|
|
437
490
|
return p;
|
|
438
|
-
|
|
439
|
-
const [tz, x, y] = k.split('/').map(Number);
|
|
491
|
+
const [tz, x, y] = (k.split('@')[0] ?? '').split('/').map(Number);
|
|
440
492
|
// The nearest tiles first: the others wait for the raster tiles
|
|
441
493
|
const priority = index < 4 ? 'auto' : 'low';
|
|
442
|
-
|
|
494
|
+
const work = { type: 'labels', key, z: tz, x, y, priority, ...(zoom > tz ? { zoom } : {}) };
|
|
495
|
+
p = this.request(tz, x, y, work).then((r) => tileLabels('labels' in r ? r.labels : []), () => {
|
|
443
496
|
// A network error is not kept: the tile is asked for again on the next update
|
|
444
497
|
tiles.delete(k);
|
|
445
498
|
return [];
|
|
446
499
|
});
|
|
447
|
-
tiles.set(k, p);
|
|
448
500
|
// A bounded cache of tiles' labels, the least recently used dropped
|
|
449
|
-
|
|
450
|
-
const oldest = tiles.keys().next().value;
|
|
451
|
-
if (oldest !== undefined)
|
|
452
|
-
tiles.delete(oldest);
|
|
453
|
-
}
|
|
501
|
+
tiles.set(k, p);
|
|
454
502
|
return p;
|
|
455
503
|
}));
|
|
456
504
|
if (run !== generation || this.destroyed)
|
|
457
505
|
return;
|
|
458
506
|
// A tile that failed is missing: the next update asks for it again
|
|
459
507
|
shown = keys.every((k) => tiles.has(k)) ? set : '';
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
[p.lon + p.along[0] / 2, p.lat + p.along[1] / 2],
|
|
473
|
-
]
|
|
474
|
-
: [p.lon, p.lat],
|
|
475
|
-
},
|
|
476
|
-
}));
|
|
477
|
-
symbol.setData(features);
|
|
508
|
+
// The labels of the higher style layers first: they win the collisions; for each style layer, the tiles nearest
|
|
509
|
+
// to the center first
|
|
510
|
+
const layerIds = [...new Set(lists.flatMap((list) => list.map(([layer]) => layer)))].sort((a, b) => b - a);
|
|
511
|
+
const groups = [];
|
|
512
|
+
for (const layer of layerIds) {
|
|
513
|
+
for (const list of lists) {
|
|
514
|
+
const group = list.find(([l]) => l === layer)?.[1];
|
|
515
|
+
if (group)
|
|
516
|
+
groups.push(group);
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
symbol.setGroups(groups);
|
|
478
520
|
};
|
|
479
521
|
// The style failed to load: reported by `ready`
|
|
480
522
|
const refresh = () => {
|
|
@@ -506,8 +548,14 @@ export class VectorTiles {
|
|
|
506
548
|
layer.remove();
|
|
507
549
|
this.layers.length = 0;
|
|
508
550
|
this.map.dropVectorTiles(this);
|
|
509
|
-
// The page's copy of the
|
|
510
|
-
this.
|
|
551
|
+
// The page's copy of the sprites (the workers have theirs), and their icons
|
|
552
|
+
this.sprites
|
|
553
|
+
?.then((sprites) => {
|
|
554
|
+
for (const sprite of sprites)
|
|
555
|
+
sprite.image.close();
|
|
556
|
+
this.map.icons.remove(this.iconPrefix, true);
|
|
557
|
+
})
|
|
558
|
+
.catch(() => undefined);
|
|
511
559
|
if (this.ownPool) {
|
|
512
560
|
this.pool.terminate();
|
|
513
561
|
}
|