isard 1.1.0 → 1.3.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.
Files changed (254) hide show
  1. package/CHANGELOG.md +121 -0
  2. package/README.md +44 -39
  3. package/dist/basemap/basemaps.d.ts +1 -1
  4. package/dist/basemap/basemaps.js +2 -2
  5. package/dist/basemap/basemaps.js.map +1 -1
  6. package/dist/basemap/grid.d.ts +5 -5
  7. package/dist/basemap/grid.js +59 -65
  8. package/dist/basemap/grid.js.map +1 -1
  9. package/dist/basemap/mvt.d.ts +1 -1
  10. package/dist/basemap/mvt.js +6 -6
  11. package/dist/basemap/mvt.js.map +1 -1
  12. package/dist/basemap/pmtiles.d.ts +10 -10
  13. package/dist/basemap/pmtiles.js +39 -31
  14. package/dist/basemap/pmtiles.js.map +1 -1
  15. package/dist/basemap/pmtileslayer.d.ts +33 -0
  16. package/dist/basemap/pmtileslayer.js +97 -0
  17. package/dist/basemap/pmtileslayer.js.map +1 -0
  18. package/dist/basemap/resample.d.ts +2 -2
  19. package/dist/basemap/resample.js +16 -14
  20. package/dist/basemap/resample.js.map +1 -1
  21. package/dist/basemap/terrain.d.ts +3 -3
  22. package/dist/basemap/terrain.js +6 -6
  23. package/dist/basemap/terrain.js.map +1 -1
  24. package/dist/basemap/trees.d.ts +26 -0
  25. package/dist/basemap/trees.js +141 -0
  26. package/dist/basemap/trees.js.map +1 -0
  27. package/dist/basemap/vectorstyle.d.ts +22 -10
  28. package/dist/basemap/vectorstyle.js +163 -110
  29. package/dist/basemap/vectorstyle.js.map +1 -1
  30. package/dist/basemap/vectortiles.d.ts +70 -47
  31. package/dist/basemap/vectortiles.js +480 -358
  32. package/dist/basemap/vectortiles.js.map +1 -1
  33. package/dist/basemap/wmts.d.ts +3 -3
  34. package/dist/basemap/wmts.js +16 -11
  35. package/dist/basemap/wmts.js.map +1 -1
  36. package/dist/basemap/workerpool.d.ts +17 -0
  37. package/dist/basemap/workerpool.js +194 -0
  38. package/dist/basemap/workerpool.js.map +1 -0
  39. package/dist/basemap.worker.js +2 -2
  40. package/dist/basemap.worker.js.map +21 -13
  41. package/dist/bind/layers.d.ts +13 -4
  42. package/dist/bind/layers.js +64 -40
  43. package/dist/bind/layers.js.map +1 -1
  44. package/dist/data/crs.d.ts +10 -10
  45. package/dist/data/crs.js +38 -34
  46. package/dist/data/crs.js.map +1 -1
  47. package/dist/data/gpx.d.ts +1 -1
  48. package/dist/data/gpx.js +20 -20
  49. package/dist/data/gpx.js.map +1 -1
  50. package/dist/data/kml.d.ts +1 -1
  51. package/dist/data/kml.js +42 -39
  52. package/dist/data/kml.js.map +1 -1
  53. package/dist/data/topojson.d.ts +1 -1
  54. package/dist/data/topojson.js +15 -10
  55. package/dist/data/topojson.js.map +1 -1
  56. package/dist/data/xml.d.ts +5 -5
  57. package/dist/data/xml.js +19 -18
  58. package/dist/data/xml.js.map +1 -1
  59. package/dist/decoder.worker.js +4 -4
  60. package/dist/decoder.worker.js.map +6 -6
  61. package/dist/engine/decoders.d.ts +2 -2
  62. package/dist/engine/decoders.js +28 -25
  63. package/dist/engine/decoders.js.map +1 -1
  64. package/dist/engine/loader.js +13 -14
  65. package/dist/engine/loader.js.map +1 -1
  66. package/dist/engine/requests.d.ts +1 -1
  67. package/dist/engine/requests.js +19 -16
  68. package/dist/engine/requests.js.map +1 -1
  69. package/dist/engine-loader.d.ts +13 -9
  70. package/dist/engine-loader.js +38 -28
  71. package/dist/engine-loader.js.map +1 -1
  72. package/dist/geoplateforme.d.ts +26 -10
  73. package/dist/geoplateforme.js +45 -20
  74. package/dist/geoplateforme.js.map +1 -1
  75. package/dist/index.d.ts +12 -4
  76. package/dist/index.js +9 -2
  77. package/dist/index.js.map +1 -1
  78. package/dist/isard_bg.wasm +0 -0
  79. package/dist/isard_core_bg.wasm +0 -0
  80. package/dist/isard_points_bg.wasm +0 -0
  81. package/dist/isard_tess_bg.wasm +0 -0
  82. package/dist/layers/extrusions.d.ts +1 -1
  83. package/dist/layers/extrusions.js +10 -5
  84. package/dist/layers/extrusions.js.map +1 -1
  85. package/dist/layers/features.d.ts +10 -10
  86. package/dist/layers/features.js +41 -42
  87. package/dist/layers/features.js.map +1 -1
  88. package/dist/layers/glyphs.d.ts +3 -3
  89. package/dist/layers/glyphs.js +34 -40
  90. package/dist/layers/glyphs.js.map +1 -1
  91. package/dist/layers/icons.d.ts +8 -8
  92. package/dist/layers/icons.js +76 -68
  93. package/dist/layers/icons.js.map +1 -1
  94. package/dist/layers/layers.d.ts +1 -1
  95. package/dist/layers/layers.js +42 -29
  96. package/dist/layers/layers.js.map +1 -1
  97. package/dist/layers/panoramas.d.ts +2 -2
  98. package/dist/layers/panoramas.js +52 -41
  99. package/dist/layers/panoramas.js.map +1 -1
  100. package/dist/layers/pointclouds.d.ts +3 -3
  101. package/dist/layers/pointclouds.js +25 -33
  102. package/dist/layers/pointclouds.js.map +1 -1
  103. package/dist/layers/symbols.d.ts +1 -1
  104. package/dist/layers/symbols.js +68 -71
  105. package/dist/layers/symbols.js.map +1 -1
  106. package/dist/layers/vectors.d.ts +60 -0
  107. package/dist/layers/vectors.js +130 -0
  108. package/dist/layers/vectors.js.map +1 -0
  109. package/dist/map/basemap-layers.d.ts +26 -0
  110. package/dist/map/basemap-layers.js +61 -0
  111. package/dist/map/basemap-layers.js.map +1 -0
  112. package/dist/map/canvas.d.ts +17 -0
  113. package/dist/map/canvas.js +56 -0
  114. package/dist/map/canvas.js.map +1 -0
  115. package/dist/map/checks.d.ts +11 -0
  116. package/dist/map/checks.js +39 -0
  117. package/dist/map/checks.js.map +1 -0
  118. package/dist/map/credits.d.ts +17 -0
  119. package/dist/map/credits.js +34 -0
  120. package/dist/map/credits.js.map +1 -0
  121. package/dist/map/engine-settings.d.ts +15 -0
  122. package/dist/map/engine-settings.js +45 -0
  123. package/dist/map/engine-settings.js.map +1 -0
  124. package/dist/map/engines.d.ts +41 -0
  125. package/dist/map/engines.js +77 -0
  126. package/dist/map/engines.js.map +1 -0
  127. package/dist/map/events.d.ts +14 -0
  128. package/dist/map/events.js +46 -0
  129. package/dist/map/events.js.map +1 -0
  130. package/dist/map/frame-loop.d.ts +64 -0
  131. package/dist/map/frame-loop.js +145 -0
  132. package/dist/map/frame-loop.js.map +1 -0
  133. package/dist/map/hover-pick.d.ts +30 -0
  134. package/dist/map/hover-pick.js +56 -0
  135. package/dist/map/hover-pick.js.map +1 -0
  136. package/dist/map/layer-spec.d.ts +42 -0
  137. package/dist/map/layer-spec.js +34 -0
  138. package/dist/map/layer-spec.js.map +1 -0
  139. package/dist/map/layer-stack.d.ts +36 -0
  140. package/dist/map/layer-stack.js +101 -0
  141. package/dist/map/layer-stack.js.map +1 -0
  142. package/dist/map/overlay-host.d.ts +36 -0
  143. package/dist/map/overlay-host.js +101 -0
  144. package/dist/map/overlay-host.js.map +1 -0
  145. package/dist/map/panorama-host.d.ts +5 -0
  146. package/dist/map/panorama-host.js +32 -0
  147. package/dist/map/panorama-host.js.map +1 -0
  148. package/dist/map/raster-source.d.ts +11 -0
  149. package/dist/map/raster-source.js +26 -0
  150. package/dist/map/raster-source.js.map +1 -0
  151. package/dist/map/symbol-atlases.d.ts +26 -0
  152. package/dist/map/symbol-atlases.js +59 -0
  153. package/dist/map/symbol-atlases.js.map +1 -0
  154. package/dist/map/viewshed.d.ts +5 -0
  155. package/dist/map/viewshed.js +28 -0
  156. package/dist/map/viewshed.js.map +1 -0
  157. package/dist/map/workers.d.ts +46 -0
  158. package/dist/map/workers.js +73 -0
  159. package/dist/map/workers.js.map +1 -0
  160. package/dist/map.d.ts +54 -126
  161. package/dist/map.js +227 -698
  162. package/dist/map.js.map +1 -1
  163. package/dist/react/Control.d.ts +11 -0
  164. package/dist/react/Control.js +18 -0
  165. package/dist/react/Control.js.map +1 -0
  166. package/dist/react/CustomLayer.d.ts +11 -0
  167. package/dist/react/CustomLayer.js +30 -0
  168. package/dist/react/CustomLayer.js.map +1 -0
  169. package/dist/react/IsardMap.d.ts +43 -0
  170. package/dist/react/IsardMap.js +147 -0
  171. package/dist/react/IsardMap.js.map +1 -0
  172. package/dist/react/Layer.d.ts +42 -0
  173. package/dist/react/Layer.js +74 -0
  174. package/dist/react/Layer.js.map +1 -0
  175. package/dist/react/Marker.d.ts +24 -0
  176. package/dist/react/Marker.js +53 -0
  177. package/dist/react/Marker.js.map +1 -0
  178. package/dist/react/Panel.d.ts +11 -0
  179. package/dist/react/Panel.js +37 -0
  180. package/dist/react/Panel.js.map +1 -0
  181. package/dist/react/Popup.d.ts +18 -0
  182. package/dist/react/Popup.js +60 -0
  183. package/dist/react/Popup.js.map +1 -0
  184. package/dist/react/Swipe.d.ts +16 -0
  185. package/dist/react/Swipe.js +52 -0
  186. package/dist/react/Swipe.js.map +1 -0
  187. package/dist/react/VectorGeometry.d.ts +35 -0
  188. package/dist/react/VectorGeometry.js +82 -0
  189. package/dist/react/VectorGeometry.js.map +1 -0
  190. package/dist/react/Viewshed.d.ts +5 -0
  191. package/dist/react/Viewshed.js +28 -0
  192. package/dist/react/Viewshed.js.map +1 -0
  193. package/dist/react/context.d.ts +33 -0
  194. package/dist/react/context.js +20 -0
  195. package/dist/react/context.js.map +1 -0
  196. package/dist/react/index.d.ts +16 -108
  197. package/dist/react/index.js +11 -397
  198. package/dist/react/index.js.map +1 -1
  199. package/dist/settings.d.ts +5 -9
  200. package/dist/settings.js +17 -15
  201. package/dist/settings.js.map +1 -1
  202. package/dist/types.d.ts +27 -4
  203. package/dist/types.js.map +1 -1
  204. package/dist/ui/controls.js +6 -4
  205. package/dist/ui/controls.js.map +1 -1
  206. package/dist/ui/interaction.d.ts +2 -2
  207. package/dist/ui/interaction.js +8 -7
  208. package/dist/ui/interaction.js.map +1 -1
  209. package/dist/ui/minimap.d.ts +25 -0
  210. package/dist/ui/minimap.js +90 -0
  211. package/dist/ui/minimap.js.map +1 -0
  212. package/dist/ui/overlay.js +18 -20
  213. package/dist/ui/overlay.js.map +1 -1
  214. package/dist/ui/scale.d.ts +19 -0
  215. package/dist/ui/scale.js +44 -0
  216. package/dist/ui/scale.js.map +1 -0
  217. package/dist/ui/search.d.ts +25 -0
  218. package/dist/ui/search.js +119 -0
  219. package/dist/ui/search.js.map +1 -0
  220. package/dist/ui/style.d.ts +1 -1
  221. package/dist/ui/style.js +19 -2
  222. package/dist/ui/style.js.map +1 -1
  223. package/dist/util/animation.d.ts +3 -3
  224. package/dist/util/animation.js +6 -6
  225. package/dist/util/animation.js.map +1 -1
  226. package/dist/util/color.d.ts +1 -1
  227. package/dist/util/color.js +14 -16
  228. package/dist/util/color.js.map +1 -1
  229. package/dist/util/geo.d.ts +6 -6
  230. package/dist/util/geo.js +12 -12
  231. package/dist/util/geo.js.map +1 -1
  232. package/dist/util/guards.d.ts +7 -0
  233. package/dist/util/guards.js +8 -0
  234. package/dist/util/guards.js.map +1 -0
  235. package/dist/util/lru.js.map +1 -1
  236. package/dist/util/sun.d.ts +11 -0
  237. package/dist/util/sun.js +26 -0
  238. package/dist/util/sun.js.map +1 -0
  239. package/dist/wasm/isard.d.ts +250 -7
  240. package/dist/wasm/isard.js +375 -8
  241. package/dist/wasm/isard_core.d.ts +226 -7
  242. package/dist/wasm/isard_core.js +351 -8
  243. package/dist/wasm/isard_tess.d.ts +109 -0
  244. package/dist/wasm/isard_tess.js +398 -0
  245. package/dist/workers/basemap/geometry.d.ts +72 -0
  246. package/dist/workers/basemap/labels.d.ts +8 -0
  247. package/dist/workers/basemap/raster.d.ts +10 -0
  248. package/dist/workers/basemap/tiles.d.ts +65 -0
  249. package/dist/workers/basemap/trees.d.ts +19 -0
  250. package/dist/workers/basemap.worker.d.ts +126 -22
  251. package/dist/workers/basemap.worker.js +76 -544
  252. package/dist/workers/basemap.worker.js.map +1 -1
  253. package/package.json +5 -4
  254. package/vite.js +10 -2
package/CHANGELOG.md CHANGED
@@ -3,6 +3,127 @@
3
3
  Every notable change of `isard` (published as `@ign-junn/isard` up to 0.1.1). The format follows [Keep a Changelog](https://keepachangelog.com), the
4
4
  versions [Semantic Versioning](https://semver.org) (before 1.0.0, a minor version may change an API).
5
5
 
6
+ ## [1.3.0] - 2026-10-23
7
+
8
+ ### Added
9
+
10
+ - `vectorTiles().vectors()`: the fills and lines of a MapLibre style drawn as geometry on the globe and the relief,
11
+ tile by tile (cut in the basemap workers, `vectors` job), rather than into raster images: sharp at any zoom and
12
+ pitch, in the style's order with each layer's zoom range, dashes, widths following the zoom, restyled without
13
+ cutting the tiles again (`setPaintProperty`, `setLayoutProperty`), picked by feature with its style layer
14
+ (`VectorLayer`); `<VectorGeometry>` in React (`paint` by style layer or as a function of it, `visible`, `order`).
15
+ The tiles are made ready for the GPU in the basemap workers (their fills triangulated, their lines cut) by the
16
+ tessellation module, `isard_tess_bg.wasm` (37 KB gzipped, the engine's own code, loaded with the first tile; the
17
+ main thread does it without), the main thread only uploading them: on a scripted flight over Paris with the whole
18
+ Positron style, half the main thread's time of the engine doing it, about that of the raster path. They follow the
19
+ camera while it moves. Their geometry is the engine's only (the layer keeps what picking needs): an engine made
20
+ anew, after a context loss or with 3D Tiles, has them cut again by the workers, about 1 MB of JavaScript heap less per
21
+ tile of the whole Positron style. The example Vector basemaps draws the water so, in TypeScript and React. About 12 KB
22
+ gzipped more for the engine.
23
+ - The swipe's `other` layers, shown on the other side of the line only (`setSwipe({ layers, other })`, `<SwipeOther>`
24
+ in React): two meshes of the same place, each on its side, never drawn over each other. The example Swipe on a mesh
25
+ (Strasbourg's photomeshes of 2018 and 2022), in TypeScript and React.
26
+ - Controls: `ScaleControl`, `SearchControl` (the Géoplateforme's geocoding by default, `geoplateformeGeocode`) and
27
+ `MinimapControl`; the example Globe IGN (orthophotos, relief, PLAN IGN's vector tiles and labels over them, its buildings,
28
+ the four controls), in TypeScript and React.
29
+ - `vectorTiles().extrusions()`: the buildings of vector tiles (PLAN IGN's `bati_surf`, OpenMapTiles' `building`)
30
+ raised by the style given, their tiles following the view (decoded in the basemap workers, handed over as typed
31
+ arrays); the Globe IGN example's buildings everywhere the map goes.
32
+ - Without relief, the camera settles on the 3D Tiles mesh under its center rather than at sea level, on its lowest
33
+ surface around the center (the street, not a roof or a spire, nothing jumping as the map zooms): a mesh shown alone
34
+ (`basemap: 'none'`), as in the example Swipe on a mesh, which no longer loads relief nor imagery under its meshes.
35
+ The layers standing on the map's ground (blocks, models) leave the camera at sea level.
36
+ - 3D Tiles in the legacy `CESIUM_RTC` glTF extension (ContextCapture's exports), its center applied as `RTC_CENTER`.
37
+
38
+ - 3D trees: `vectorTiles().trees()` grows trees on the woods and grass of the vector tiles. The basemap workers
39
+ scatter them on a jittered grid, the same ones each time a tile is cut. They are one instanced draw, dense near the
40
+ view's center and thinned far away (`maxInstances`), with their colors as given (`TreeColors`, `treeModel`). Example:
41
+ Trees (the forest of Fontainebleau over the relief).
42
+ - Buildings in `vectors()`: the style's `fill-extrusion` layers are raised to their height and base height in the same
43
+ tiles, lit by the side they face.
44
+ - The sun's shadows: `map.setSun({ date } | { azimuth, altitude }, opacity, night)`, the `sun` option or
45
+ `<IsardMap sun>`, with `sunPosition(date, lonLat)`. The solid scene (buildings, trees, models, 3D Tiles, the relief) is
46
+ drawn from the sun into a 2048² depth map around the view, then a pass darkens what the sun does not reach, before
47
+ the labels.
48
+ - The night: as the sun sets (from 6° above the horizon to 6° under it, or `night` set by hand), the frame is tinted
49
+ in the blue of the night and the shadows fade. The windows of the buildings of `vectors()` and `extrusions()` light
50
+ up, floor by floor and bay by bay, the same ones from frame to frame and wherever the view or the tile is. The
51
+ streets glow, with `vectors({ streets })` or `<VectorGeometry streets>` choosing which ones. The labels turn light on
52
+ dark.
53
+ - `vectors()` drawn closer to MapLibre: the lines' ends as their `line-cap` says, the fills' outlines
54
+ (`fill-outline-color`) one pixel wide, and the colors following the camera's zoom across tiles of every level.
55
+ - Overzoom in `vectors()`: past the source's deepest level, its tiles are cut again into deeper ones down to level 18,
56
+ with the filters and styles of their level. A building cut at a tile's edge rises no wall there.
57
+ - Examples: A 3D vector map (Paris from OpenFreeMap's Liberty style, all of it as geometry, a summer evening), Paris
58
+ by night (a clock through the day), Inside a shopping mall (Westfield Les 4 Temps at La Défense floor by floor, from
59
+ OpenStreetMap's indoor data), in TypeScript and React; the examples grouped by subject, each on one page with its
60
+ TypeScript and React sources in tabs.
61
+ - `bun run perf`: the frames, long tasks and heap of the 3D vector examples while dragged, to run before and after a
62
+ change of the drawing.
63
+
64
+ ### Fixed
65
+
66
+ - With a sun, the labels are drawn after the shadows and the night: a layer stacked over a label layer is shaded and
67
+ lit too. The lights are drawn on both faces of the walls (whichever way their rings wind) and in their columns of
68
+ the swipe.
69
+ - `vectors()`: a tile's colors are judged translucent by their last zoom too. A tile stretched far past its level
70
+ mixes its colors over its first zooms. An outline added or taken away (`fill-outline-color`, `fill-antialias`) cuts
71
+ the tiles again instead of dropping their restyles.
72
+ - `trees()`: the cells are bounded per tile, so a small `spacing` no longer freezes a worker, and a ring of many
73
+ points no longer overflows the call stack.
74
+ - At night, no glare toward the horizon: the windows fade out under two pixels a bay, and the streets' glow narrows
75
+ and fades far away.
76
+ - `map.whenIdle()` on a map already idle, and the `ready` of a layer added to it that loads nothing (lines from
77
+ data, the geometry of vector tiles), resolved by the next frame: they waited for an 'idle' that no frame sent.
78
+ - The examples' indexes of the docs: one row per example, the React ones listed again.
79
+
80
+ ### Changed
81
+
82
+ - The large files are split by what they do: the basemap worker's jobs in `src/workers/basemap/`, the worker pool
83
+ and the PMTiles layers out of `vectortiles.ts`, a vector layer's tile and its JavaScript API out of `render/vectors.rs`.
84
+ `geo`'s modules are grouped (`view/`, `body/`, `mesh/`), the RAF20 geoid grid moved to `crates/geo/data/`, and each
85
+ crate has a README.
86
+ - The models' relief altitudes are kept by position across instance sets. The tessellation's arrays are copied once.
87
+ `extrusions()` follows the view while it moves.
88
+ - The docs: the React section written as a library's (installation, quick start, guide), the home page's features,
89
+ the roadmap and the architecture (an interactive diagram) brought up to date.
90
+ - The repository that publishes and builds the docs chosen by its variables (`RELEASE`, `DOCS_BASE`); a contributing
91
+ guide, a security policy, a code of conduct and the templates of issues and pull requests; the PLAN IGN tiles of
92
+ two visual tests recorded, which no longer reach the network.
93
+
94
+ ## [1.2.0] - 2026-10-22
95
+
96
+ ### Added
97
+
98
+ - `isard/react`: `<Layer>` typed by the properties of its features and its handle by its `type`, a `values` prop
99
+ (`setValues`) and its `filter` sent by `setFilter`; `<IsardMap hoverPicking>`; `<Control>` and `<CustomLayer>`. Each
100
+ component in its own file. The `HoverPicking` type exported.
101
+ - Every example also in React (`examples/react/`), side by side in the docs (TypeScript and React groups); the live
102
+ example above the code in the React pages; the install commands for npm, bun, yarn and pnpm.
103
+
104
+ ### Changed
105
+
106
+ - Arrow functions, array methods and `const` across the TypeScript sources (loops kept where they are hot); blank
107
+ lines around declarations and before returns, in TypeScript and Rust.
108
+ - Type guards in place of type assertions: the data read from outside (MapLibre styles, TileJSON, sprite indexes,
109
+ panoramas' orientations and calibrations, WFS pages, TopoJSON, the viewer's messages) checked at run time, a clear
110
+ error when it is not what it should be; `GeoMap`'s internals in `src/map/`.
111
+ - The Rust crates read by a newcomer: every public item documented (`missing_docs`), every `unsafe` justified
112
+ (`undocumented_unsafe_blocks`), the failures of the functions returning a `Result` (`# Errors`), the long functions
113
+ of a frame, a tile's arrival or a request split into named steps, the lint exceptions as `#[expect(…, reason)]`, one
114
+ module layout (no `mod.rs`), the crates' shared fields in `[workspace.package]`; an Architecture page in the guide
115
+ (the engines, the SDK, the workers, a frame, a tile).
116
+ - The Rust files grouped and split by subject: `render/features/` (lines, circles, fills), `render/backdrop/` (globe,
117
+ sky), the camera, the shapes, the labels and the COPC point clouds in submodules, meshopt under `decode/`; the few
118
+ duplicated blocks as shared helpers (0.41 % of the lines duplicated to 0.03 %).
119
+ - The crates' dependencies vetted by the checks (`cargo-deny`: known vulnerabilities, licences, sources); the
120
+ Architecture page of its own, its diagram played step by step (a frame, a raster tile, a vector basemap tile, 3D
121
+ Tiles), each part's role and files on click.
122
+
123
+ ### Fixed
124
+
125
+ - A marker's popup opened before the marker is added to the map stays open (`Marker.addTo`).
126
+
6
127
  ## [1.1.0] - 2026-10-21
7
128
 
8
129
  ### Added
package/README.md CHANGED
@@ -10,13 +10,13 @@ A WebGL2 map engine for large, interactive data layers, labels and 3D Tiles.<br
10
10
  Rust core in WebAssembly, a small TypeScript API.
11
11
 
12
12
  [![npm](https://img.shields.io/npm/v/isard?color=2f6fd1)](https://www.npmjs.com/package/isard)
13
- [![Documentation](https://img.shields.io/badge/docs-graffkevin.github.io%2Fisard-2f6fd1)](https://graffkevin.github.io/isard/)
14
- [![Checks](https://github.com/graffkevin/isard/actions/workflows/checks.yml/badge.svg)](https://github.com/graffkevin/isard/actions/workflows/checks.yml)
13
+ [![Documentation](https://img.shields.io/badge/docs-IGNF%2Fisard-2f6fd1)](https://ideal-adventure-zqn6y6p.pages.github.io/)
14
+ [![Checks](https://github.com/IGNF/isard/actions/workflows/checks.yml/badge.svg)](https://github.com/IGNF/isard/actions/workflows/checks.yml)
15
15
  [![Licence: MIT](https://img.shields.io/badge/licence-MIT-blue)](LICENSE)
16
16
 
17
- **[Documentation](https://graffkevin.github.io/isard/)** ·
18
- **[Examples](https://graffkevin.github.io/isard/examples/)** ·
19
- **[API](https://graffkevin.github.io/isard/api)** ·
17
+ **[Documentation](https://ideal-adventure-zqn6y6p.pages.github.io/)** ·
18
+ **[Examples](https://ideal-adventure-zqn6y6p.pages.github.io/examples/)** ·
19
+ **[API](https://ideal-adventure-zqn6y6p.pages.github.io/api)** ·
20
20
  **[Changelog](CHANGELOG.md)**
21
21
 
22
22
  <img src="docs/public/screenshots/hero.jpg" alt="Isard: rings drawn by a shader over the relief of the Mont Blanc, buildings colored by height, communes colored by population, the globe" />
@@ -33,20 +33,24 @@ General-purpose map libraries spend their time on things these maps do not need.
33
33
  - 🗺️ **Basemaps and relief, worldwide.** OpenFreeMap's vector basemaps by default (OpenStreetMap data, no key), any
34
34
  MapLibre style drawn in workers with its labels above your data, raster tiles, a worldwide relief, on a globe that
35
35
  turns into Web Mercator. The Géoplateforme's data for France in one option or call: PLAN.IGN, orthophotos,
36
- hillshade, the IGN relief, any WMTS, WMS or WFS layer ([Géoplateforme (IGN) data](https://graffkevin.github.io/isard/guide/geoplateforme)).
36
+ hillshade, the IGN relief, any WMTS, WMS or WFS layer ([Géoplateforme (IGN) data](https://ideal-adventure-zqn6y6p.pages.github.io/guide/geoplateforme)).
37
37
  - ⛰️ **Everything on the relief.** Lines, circles, labels and buildings stand on the ground; fills of any size are
38
38
  exact to the pixel over hills and valleys; your own GLSL is drawn over the ground like the basemap.
39
39
  - 🪐 **The Moon, Mars, any body.** `body: 'moon'`, `'mars'` or an ellipsoid of your own: the globe at its radius
40
40
  with its own atmosphere halo (or none), its metres in the camera, the relief and 3D Tiles, NASA's planetary mosaics
41
41
  reprojected in the page from longitudes and latitudes, and their relief: `terrain: true` raises Olympus Mons and
42
42
  digs Valles Marineris and the lunar craters from NASA's LOLA and MOLA models.
43
+ - 🌃 **A 3D vector city.** Any MapLibre style as geometry (`vectors()`): its streets, water and buildings raised from
44
+ its `fill-extrusion` layers, sharp at any zoom (its tiles cut again past the source's deepest level), 3D trees in
45
+ its woods, the sun's shadows at any hour, the night with lit windows and glowing streets; indoor data floor by floor
46
+ (a shopping mall, its shops raised and named).
43
47
  - 🏙️ **Buildings and 3D Tiles.** Buildings colored by a value or by a network's travel times, photomeshes and city
44
48
  models in 3D Tiles (Draco, meshopt, KTX2).
45
49
  - ☁️ **Point clouds.** LiDAR in COPC read by range requests (the IGN's LiDAR HD, reprojected from Lambert-93 onto the
46
50
  relief), 3D Tiles points; colored by RGB, class, altitude or intensity, Eye-Dome Lighting, a point budget, picked.
47
51
  - 🧊 **Your own 3D.** glTF models at positions, instanced and picked; custom layers for your WebGL code or a three.js
48
52
  scene, in the map's frame and depth, with camera-relative matrices exact at any zoom.
49
- - 🦀 **Small and exact.** 225 KB of WebAssembly gzipped (385 KB once a 3D Tiles layer, a model or a point cloud is added), f64 on the CPU and f32 relative to the camera on the GPU
53
+ - 🦀 **Small and exact.** 272 KB of WebAssembly gzipped (446 KB once a 3D Tiles layer, a model or a point cloud is added), f64 on the CPU and f32 relative to the camera on the GPU
50
54
  (centimetres at any zoom), frames on demand only, strict TypeScript types end to end.
51
55
 
52
56
  ## Quick start
@@ -64,32 +68,32 @@ map.on('hover', ({ lonLat }) => lonLat && network.setValues(travelTimes(lonLat))
64
68
  ```
65
69
 
66
70
  That is the whole integration: the map fills its container, follows its size, handles mouse and touch and loads the
67
- basemap. With a bundler, see [Getting started](https://graffkevin.github.io/isard/guide/getting-started#with-a-bundler).
71
+ basemap. With a bundler, see [Getting started](https://ideal-adventure-zqn6y6p.pages.github.io/guide/getting-started#with-a-bundler).
68
72
 
69
73
  ## Examples
70
74
 
71
- Live in the [documentation](https://graffkevin.github.io/isard/examples/), sources in [`examples/`](examples/).
75
+ Live in the [documentation](https://ideal-adventure-zqn6y6p.pages.github.io/examples/), sources in [`examples/`](examples/).
72
76
 
73
77
  <table>
74
78
  <tr>
75
- <td width="50%"><a href="https://graffkevin.github.io/isard/examples/globe"><img src="docs/public/screenshots/globe.jpg" alt="" /></a><br /><b>The globe</b><br />turning in its atmosphere, a flight to a click</td>
76
- <td width="50%"><a href="https://graffkevin.github.io/isard/examples/basic"><img src="docs/public/screenshots/basic.jpg" alt="" /></a><br /><b>A map</b><br />the vector basemap, a marker and its popup</td>
79
+ <td width="50%"><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/globe"><img src="docs/public/screenshots/globe.jpg" alt="" /></a><br /><b>The globe</b><br />turning in its atmosphere, a flight to a click</td>
80
+ <td width="50%"><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/basic"><img src="docs/public/screenshots/basic.jpg" alt="" /></a><br /><b>A map</b><br />the vector basemap, a marker and its popup</td>
77
81
  </tr>
78
82
  <tr>
79
- <td><a href="https://graffkevin.github.io/isard/examples/geojson"><img src="docs/public/screenshots/geojson.jpg" alt="" /></a><br /><b>GeoJSON layers</b><br />fills by value, outlines, labels, picking</td>
80
- <td><a href="https://graffkevin.github.io/isard/examples/buildings"><img src="docs/public/screenshots/buildings.jpg" alt="" /></a><br /><b>Buildings</b><br />raised to their height, colored by it</td>
83
+ <td><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/geojson"><img src="docs/public/screenshots/geojson.jpg" alt="" /></a><br /><b>GeoJSON layers</b><br />fills by value, outlines, labels, picking</td>
84
+ <td><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/buildings"><img src="docs/public/screenshots/buildings.jpg" alt="" /></a><br /><b>Buildings</b><br />raised to their height, colored by it</td>
81
85
  </tr>
82
86
  <tr>
83
- <td><a href="https://graffkevin.github.io/isard/examples/relief"><img src="docs/public/screenshots/relief.jpg" alt="" /></a><br /><b>Relief and a ground shader</b><br />your GLSL over the mountains</td>
84
- <td><a href="https://graffkevin.github.io/isard/examples/network"><img src="docs/public/screenshots/network.jpg" alt="" /></a><br /><b>Travel times on hover</b><br />a network recolored at every move</td>
87
+ <td><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/relief"><img src="docs/public/screenshots/relief.jpg" alt="" /></a><br /><b>Relief and a ground shader</b><br />your GLSL over the mountains</td>
88
+ <td><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/network"><img src="docs/public/screenshots/network.jpg" alt="" /></a><br /><b>Travel times on hover</b><br />a network recolored at every move</td>
85
89
  </tr>
86
90
  <tr>
87
- <td><a href="https://graffkevin.github.io/isard/examples/vector"><img src="docs/public/screenshots/vector.jpg" alt="" /></a><br /><b>Vector basemaps</b><br />OpenFreeMap's styles, a restyled subset</td>
88
- <td><a href="https://graffkevin.github.io/isard/examples/tiles3d"><img src="docs/public/screenshots/tiles3d.jpg" alt="" /></a><br /><b>3D Tiles</b><br />the Lille photomesh</td>
91
+ <td><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/vector"><img src="docs/public/screenshots/vector.jpg" alt="" /></a><br /><b>Vector basemaps</b><br />OpenFreeMap's styles, a restyled subset, the water drawn as geometry</td>
92
+ <td><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/tiles3d"><img src="docs/public/screenshots/tiles3d.jpg" alt="" /></a><br /><b>3D Tiles</b><br />the Lille photomesh</td>
89
93
  </tr>
90
94
  <tr>
91
- <td><a href="https://graffkevin.github.io/isard/examples/moon"><img src="docs/public/screenshots/moon.jpg" alt="" /></a><br /><b>The Moon</b><br />another body, the LRO mosaic over LOLA's relief, the Apollo sites</td>
92
- <td><a href="https://graffkevin.github.io/isard/examples/mars"><img src="docs/public/screenshots/mars.jpg" alt="" /></a><br /><b>Mars</b><br />its thin dusty halo, the Viking mosaic over MOLA's relief, famous sites</td>
95
+ <td><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/moon"><img src="docs/public/screenshots/moon.jpg" alt="" /></a><br /><b>The Moon</b><br />another body, the LRO mosaic over LOLA's relief, the Apollo sites</td>
96
+ <td><a href="https://ideal-adventure-zqn6y6p.pages.github.io/examples/mars"><img src="docs/public/screenshots/mars.jpg" alt="" /></a><br /><b>Mars</b><br />its thin dusty halo, the Viking mosaic over MOLA's relief, famous sites</td>
93
97
  </tr>
94
98
  </table>
95
99
 
@@ -97,32 +101,32 @@ Live in the [documentation](https://graffkevin.github.io/isard/examples/), sourc
97
101
 
98
102
  | Layer | | |
99
103
  |---|---|---|
100
- | [Networks](https://graffkevin.github.io/isard/layers/networks) | `addNetwork` | millions of edges colored by a value per node, worked out per pixel along the edges |
101
- | [Lines, circles, fills](https://graffkevin.github.io/isard/layers/features) | `addLines`, `addCircles`, `addFills` | GeoJSON styled per feature: zoom stops, functions, values through a ramp, filters; in any CRS, KML, GPX and TopoJSON parsed |
102
- | [Labels](https://graffkevin.github.io/isard/layers/labels) | `addSymbols` | SDF fonts (Noto Sans by default, any glyphs), halos, along lines, collisions shared by all layers |
103
- | [Buildings](https://graffkevin.github.io/isard/layers/buildings) | `addExtrusions` | tiles or one set, colored by values or by a network's times |
104
- | [Ground shaders](https://graffkevin.github.io/isard/layers/ground) | `addGround` | your fragment shader over the ground: water depth, heat maps |
105
- | [Rasters](https://graffkevin.github.io/isard/layers/rasters) | `addRaster`, `addPmtiles` | XYZ, WMTS, WMS, PMTiles; in Web Mercator, or reprojected from another grid (longitudes and latitudes, Lambert-93, UTM, any CRS through proj4); or tiles drawn by your code |
106
- | [3D Tiles](https://graffkevin.github.io/isard/layers/tiles3d) | `addTiles3d` | b3dm, pnts, glb, external tilesets, compressed or not |
107
- | [glTF models](https://graffkevin.github.io/isard/layers/models) | `addModels` | a glTF model at many positions, instanced, on the relief, picked |
108
- | [Point clouds](https://graffkevin.github.io/isard/layers/pointclouds) | `addPointCloud` | COPC (LiDAR HD) by range requests, pnts and glTF points; by class, altitude, intensity, EDL |
109
- | [Custom layers](https://graffkevin.github.io/isard/layers/custom) | `addCustomLayer` | your WebGL code or a three.js scene in the map's frame, sharing its depth |
104
+ | [Networks](https://ideal-adventure-zqn6y6p.pages.github.io/layers/networks) | `addNetwork` | millions of edges colored by a value per node, worked out per pixel along the edges |
105
+ | [Lines, circles, fills](https://ideal-adventure-zqn6y6p.pages.github.io/layers/features) | `addLines`, `addCircles`, `addFills` | GeoJSON styled per feature: zoom stops, functions, values through a ramp, filters; in any CRS, KML, GPX and TopoJSON parsed |
106
+ | [Labels](https://ideal-adventure-zqn6y6p.pages.github.io/layers/labels) | `addSymbols` | SDF fonts (Noto Sans by default, any glyphs), halos, along lines, collisions shared by all layers |
107
+ | [Buildings](https://ideal-adventure-zqn6y6p.pages.github.io/layers/buildings) | `addExtrusions` | tiles or one set, colored by values or by a network's times |
108
+ | [Ground shaders](https://ideal-adventure-zqn6y6p.pages.github.io/layers/ground) | `addGround` | your fragment shader over the ground: water depth, heat maps |
109
+ | [Rasters](https://ideal-adventure-zqn6y6p.pages.github.io/layers/rasters) | `addRaster`, `addPmtiles` | XYZ, WMTS, WMS, PMTiles; in Web Mercator, or reprojected from another grid (longitudes and latitudes, Lambert-93, UTM, any CRS through proj4); or tiles drawn by your code |
110
+ | [3D Tiles](https://ideal-adventure-zqn6y6p.pages.github.io/layers/tiles3d) | `addTiles3d` | b3dm, pnts, glb, external tilesets, compressed or not |
111
+ | [glTF models](https://ideal-adventure-zqn6y6p.pages.github.io/layers/models) | `addModels` | a glTF model at many positions, instanced, on the relief, picked |
112
+ | [Point clouds](https://ideal-adventure-zqn6y6p.pages.github.io/layers/pointclouds) | `addPointCloud` | COPC (LiDAR HD) by range requests, pnts and glTF points; by class, altitude, intensity, EDL |
113
+ | [Custom layers](https://ideal-adventure-zqn6y6p.pages.github.io/layers/custom) | `addCustomLayer` | your WebGL code or a three.js scene in the map's frame, sharing its depth |
110
114
 
111
115
  Plus markers, popups, controls, picking within a radius, `easeTo`, `flyTo`, a sky and fog for tilted views. All in
112
- the [API reference](https://graffkevin.github.io/isard/api).
116
+ the [API reference](https://ideal-adventure-zqn6y6p.pages.github.io/api).
113
117
 
114
118
  Local files on a map: `bun scripts/viewer.ts data.geojson lidar.copc.laz tiles.pmtiles` serves the viewer
115
119
  (`apps/viewer`: files dropped or given, a layer list, a bridge any app can drive) on 127.0.0.1
116
- ([The viewer](https://graffkevin.github.io/isard/guide/viewer)).
120
+ ([The viewer](https://ideal-adventure-zqn6y6p.pages.github.io/guide/viewer)).
117
121
 
118
122
  In QGIS (3.28 and 4): the **isard 3D view** plugin shows the map canvas and its layers in 3D, in a panel or the
119
- browser, the camera, layers and clicks in sync ([QGIS plugin](https://graffkevin.github.io/isard/guide/qgis)).
123
+ browser, the camera, layers and clicks in sync ([QGIS plugin](https://ideal-adventure-zqn6y6p.pages.github.io/guide/qgis)).
120
124
 
121
125
  ## Fast by design
122
126
 
123
127
  Geometry uploaded once and only the view drawn, values in textures, the ground composited in one pass, frames on
124
128
  demand, decoding and vector tiles in workers. The details and the measures:
125
- [Performance](https://graffkevin.github.io/isard/guide/performance).
129
+ [Performance](https://ideal-adventure-zqn6y6p.pages.github.io/guide/performance).
126
130
 
127
131
  ## Develop
128
132
 
@@ -138,28 +142,29 @@ bun run docs:dev # the documentation, with the examples live
138
142
  ```
139
143
 
140
144
  The root holds two workspaces side by side: Rust (`Cargo.toml`) and TypeScript (`package.json`), and `bun run build`
141
- drives both.
145
+ drives both. Each crate has its README; [crates/README.md](crates/README.md) guides through them.
142
146
 
143
147
  ```
144
148
  crates/geo/ camera, projections, geodesy and geoid, tile selection, label placement, polygons tested natively
145
149
  crates/tiles3d/ 3D Tiles tree, traversal and decoding tested natively
146
150
  crates/pointcloud/ COPC point clouds: header, octree hierarchy, traversal, LAZ chunks tested natively
147
151
  crates/engine/ the WebAssembly core: the engine, the ground, the layers, picking
152
+ crates/tess/ the tessellation module: vector tiles made ready for the GPU in the basemap workers
148
153
  packages/isard/ the npm package isard: GeoMap, layer handles, overlays, workers
149
154
  apps/ the demo, the viewer (local files, a bridge for other apps) and the benchmark
150
155
  examples/ one page per example
151
156
  docs/ the documentation site (VitePress)
152
157
  scripts/ build, dev server, docs, release
153
- integrations/qgis/ the QGIS plugin (Python), its server tested with python3 -m unittest
158
+ integrations/qgis/ the QGIS plugin (Python), its server tested with python3 -m unittest; integrations/README.md: the bridge
154
159
  ```
155
160
 
156
- More in [Develop and release](https://graffkevin.github.io/isard/guide/develop).
161
+ More in [Develop and release](https://ideal-adventure-zqn6y6p.pages.github.io/guide/develop).
157
162
 
158
163
  ## Roadmap
159
164
 
160
- - Flood maps over the relief (water depth as a ground shader) as a full example.
161
- - Text along curved lines, and repeated along long ones.
162
- - Labels fading in and out instead of popping.
165
+ The whole MapLibre style drawn as vectors, a 3D vector map to walk through, fluids on the globe (wind through the
166
+ streets, animated), several projections on the globe, and smaller items: see
167
+ [Roadmap](https://ideal-adventure-zqn6y6p.pages.github.io/guide/roadmap).
163
168
 
164
169
  ## Licence
165
170
 
@@ -37,7 +37,7 @@ export declare const IMAGE_SERVER: RegExp;
37
37
  * by its validity mask) of the box `{bbox}` in the Mercator of the body. On the Earth, Web Mercator (EPSG:3857);
38
38
  * elsewhere, a Mercator on the sphere of `radius` metres (Web Mercator's own formulas), given in WKT.
39
39
  */
40
- export declare function imageServerTerrain(url: string, earth: boolean, radius: number): string;
40
+ export declare const imageServerTerrain: (url: string, earth: boolean, radius: number) => string;
41
41
  /** The Earth's relief for `terrain: true`: the Terrain Tiles of AWS's open data registry, worldwide (SRTM, EU-DEM,
42
42
  * GMTED… merged by Mapzen), Terrarium PNGs of 256 px to level 14, altitudes above the mean sea level */
43
43
  export declare const TERRAIN_TILES: {
@@ -52,7 +52,7 @@ export const IMAGE_SERVER = /\/ImageServer\/?$/;
52
52
  * by its validity mask) of the box `{bbox}` in the Mercator of the body. On the Earth, Web Mercator (EPSG:3857);
53
53
  * elsewhere, a Mercator on the sphere of `radius` metres (Web Mercator's own formulas), given in WKT.
54
54
  */
55
- export function imageServerTerrain(url, earth, radius) {
55
+ export const imageServerTerrain = (url, earth, radius) => {
56
56
  const crs = earth
57
57
  ? '3857'
58
58
  : encodeURIComponent(JSON.stringify({
@@ -63,7 +63,7 @@ export function imageServerTerrain(url, earth, radius) {
63
63
  }));
64
64
  return (`${url.replace(/\/$/, '')}/exportImage?f=image&format=bsq&pixelType=F32&size=256,256` +
65
65
  `&bboxSR=${crs}&imageSR=${crs}&bbox={bbox}`);
66
- }
66
+ };
67
67
  /** The Earth's relief for `terrain: true`: the Terrain Tiles of AWS's open data registry, worldwide (SRTM, EU-DEM,
68
68
  * GMTED… merged by Mapzen), Terrarium PNGs of 256 px to level 14, altitudes above the mean sea level */
69
69
  export const TERRAIN_TILES = {
@@ -1 +1 @@
1
- {"version":3,"file":"basemaps.js","sourceRoot":"","sources":["../../src/basemap/basemaps.ts"],"names":[],"mappings":"AAAA;sEACsE;AACtE,OAAO,EAAE,iBAAiB,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGzE,OAAO,EAAE,eAAe,EAAE,CAAC;AAE3B,MAAM,IAAI,GAAG,mCAAmC,CAAC;AAEjD,uFAAuF;AACvF,MAAM,CAAC,MAAM,QAAQ,GAAsE;IACzF,UAAU,EAAE,iBAAiB,CAAC,IAAI,CAAC;IACnC,eAAe,EAAE,iBAAiB,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,CAAC,EAAE,CAAC;IAC3D,WAAW,EAAE,iBAAiB,CAAC,0BAA0B,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,CAAC;CACrF,CAAC;AAEF,0GAA0G;AAC1G,MAAM,CAAC,MAAM,gBAAgB,GAAgC;IAC3D,IAAI,EAAE,UAAU;IAChB,WAAW,EAAE,eAAe;IAC5B,KAAK,EAAE,WAAW;IAClB,aAAa,EAAE,iBAAiB;IAChC,kBAAkB,EAAE,sBAAsB;CAC3C,CAAC;AAEF,oEAAoE;AACpE,MAAM,CAAC,MAAM,uBAAuB,GAClC,+GAA+G;IAC/G,+EAA+E,CAAC;AAElF,+GAA+G;AAC/G,MAAM,CAAC,MAAM,yBAAyB,GACpC,4GAA4G,CAAC;AAE/G,wDAAwD;AACxD,MAAM,CAAC,MAAM,SAAS,GAAkB,iBAAiB,CAAC,6CAA6C,EAAE;IACvG,OAAO,EAAE,CAAC;IACV,OAAO,EAAE,EAAE;CACZ,CAAC,CAAC;AAEH,gHAAgH;AAChH,MAAM,CAAC,MAAM,WAAW,GACtB,yHAAyH;IACzH,oFAAoF,CAAC;AAEvF;;iFAEiF;AACjF,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE;QACJ,GAAG,EAAE,gGAAgG;QACrG,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,6FAA6F;KAC3G;IACD,IAAI,EAAE;QACJ,GAAG,EAAE,6GAA6G;QAClH,OAAO,EAAE,CAAC;QACV,WAAW,EAAE,6FAA6F;KAC3G;CACO,CAAC;AAEX,+DAA+D;AAC/D,MAAM,CAAC,MAAM,YAAY,GAAG,mBAAmB,CAAC;AAEhD;;;;GAIG;AACH,MAAM,UAAU,kBAAkB,CAAC,GAAW,EAAE,KAAc,EAAE,MAAc;IAC5E,MAAM,GAAG,GAAG,KAAK;QACf,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,kBAAkB,CAChB,IAAI,CAAC,SAAS,CAAC;YACb,GAAG,EACD,yDAAyD,MAAM,sCAAsC;gBACrG,yFAAyF;gBACzF,mGAAmG;gBACnG,kBAAkB;SACrB,CAAC,CACH,CAAC;IACN,OAAO,CACL,GAAG,GAAG,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,4DAA4D;QACrF,WAAW,GAAG,YAAY,GAAG,cAAc,CAC5C,CAAC;AACJ,CAAC;AAED;wGACwG;AACxG,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,GAAG,EAAE,yEAAyE;IAC9E,OAAO,EAAE,EAAE;CACH,CAAC;AAEX,qFAAqF;AACrF,MAAM,CAAC,MAAM,GAAG,GAA2D;IACzE,cAAc,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACrC,aAAa,EAAE,CAAC,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC;IAC/B,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACnC,UAAU,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACjC,eAAe,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACtC,iBAAiB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IACxC,sBAAsB,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAC7C,WAAW,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;IAClC,IAAI,EAAE,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,CAAC;CACzB,CAAC","sourcesContent":["/** The basemaps by name: OpenFreeMap's vector styles (OpenStreetMap data, worldwide) and the Géoplateforme's (IGN,\n * France), the credits of the sources, and the relief of each body */\nimport { geoplateformeWmts, IGN_ATTRIBUTION } from '../geoplateforme.ts';\nimport type { BasemapName, RasterOptions } from '../types.ts';\n\nexport { IGN_ATTRIBUTION };\n\nconst PLAN = 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2';\n\n/** The raster basemaps of the Géoplateforme (WMTS, Web Mercator), crediting the IGN */\nexport const BASEMAPS: Record<'ign-plan' | 'ign-plan-grey' | 'ign-ortho', RasterOptions> = {\n 'ign-plan': geoplateformeWmts(PLAN),\n 'ign-plan-grey': geoplateformeWmts(PLAN, { saturation: 0 }),\n 'ign-ortho': geoplateformeWmts('ORTHOIMAGERY.ORTHOPHOTOS', { format: 'image/jpeg' }),\n};\n\n/** The former names of the Géoplateforme basemaps (before 0.5), and their names now: an error tells it */\nexport const RENAMED_BASEMAPS: Record<string, BasemapName> = {\n plan: 'ign-plan',\n 'plan-grey': 'ign-plan-grey',\n ortho: 'ign-ortho',\n 'plan-vector': 'ign-plan-vector',\n 'plan-grey-vector': 'ign-plan-grey-vector',\n};\n\n/** Credits of OpenFreeMap's basemaps, as its TileJSON gives them */\nexport const OPENFREEMAP_ATTRIBUTION =\n '<a href=\"https://openfreemap.org\">OpenFreeMap</a> <a href=\"https://www.openmaptiles.org/\">© OpenMapTiles</a> ' +\n 'Data from <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>';\n\n/** Credits of the Terrain Tiles of AWS's open data registry (Mapzen's Terrarium tiles) and of their sources */\nexport const TERRAIN_TILES_ATTRIBUTION =\n '<a href=\"https://github.com/tilezen/joerd/blob/master/docs/attribution.md\">Terrain Tiles</a> (Mapzen, AWS)';\n\n/** IGN hillshade, grey on transparent, zooms 6 to 17 */\nexport const HILLSHADE: RasterOptions = geoplateformeWmts('IGNF_ELEVATION.ELEVATIONGRIDCOVERAGE.SHADOW', {\n minZoom: 6,\n maxZoom: 17,\n});\n\n/** IGN terrain model (RGE ALTI and its fill-ins, France), raw altitudes in metres from the Géoplateforme WMS */\nexport const TERRAIN_URL =\n 'https://data.geopf.fr/wms-r/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES' +\n '&STYLES=&CRS=EPSG:3857&BBOX={bbox}&WIDTH=256&HEIGHT=256&FORMAT=image/x-bil;bits=32';\n\n/** The relief of the Moon and Mars by default: NASA's Trek image services (ArcGIS), raw 32-bit altitudes in metres\n * asked for in the body's Mercator, with their credits. The Moon: LOLA's global model, 128 pixels per degree (237 m);\n * Mars: MOLA's, 128 and 64 pixels per degree merged (463 m), above the areoid */\nexport const BODY_TERRAINS = {\n moon: {\n url: 'https://trek.nasa.gov/moon/trekarcgis/rest/services/LRO_LOLA_DEM_Global_128ppd_v04/ImageServer',\n maxZoom: 8,\n attribution: '<a href=\"https://trek.nasa.gov/moon/\">NASA Moon Trek</a>: LOLA terrain model, NASA/GSFC/MIT',\n },\n mars: {\n url: 'https://trek.nasa.gov/mars/trekarcgis/rest/services/mola128_mola64_merge_90Nto90S_SimpleC_clon0/ImageServer',\n maxZoom: 8,\n attribution: '<a href=\"https://trek.nasa.gov/mars/\">NASA Mars Trek</a>: MOLA terrain model, NASA/JPL/GSFC',\n },\n} as const;\n\n/** An ArcGIS image service (a URL ending in `/ImageServer`) */\nexport const IMAGE_SERVER = /\\/ImageServer\\/?$/;\n\n/**\n * The `exportImage` template of an ArcGIS image service for the relief: 256 × 256 raw 32-bit floats (`bsq`, followed\n * by its validity mask) of the box `{bbox}` in the Mercator of the body. On the Earth, Web Mercator (EPSG:3857);\n * elsewhere, a Mercator on the sphere of `radius` metres (Web Mercator's own formulas), given in WKT.\n */\nexport function imageServerTerrain(url: string, earth: boolean, radius: number): string {\n const crs = earth\n ? '3857'\n : encodeURIComponent(\n JSON.stringify({\n wkt:\n `PROJCS[\"Mercator\",GEOGCS[\"GCS\",DATUM[\"D\",SPHEROID[\"S\",${radius},0]],PRIMEM[\"Reference_Meridian\",0],` +\n 'UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Mercator\"],PARAMETER[\"False_Easting\",0],' +\n 'PARAMETER[\"False_Northing\",0],PARAMETER[\"Central_Meridian\",0],PARAMETER[\"Standard_Parallel_1\",0],' +\n 'UNIT[\"Meter\",1]]',\n }),\n );\n return (\n `${url.replace(/\\/$/, '')}/exportImage?f=image&format=bsq&pixelType=F32&size=256,256` +\n `&bboxSR=${crs}&imageSR=${crs}&bbox={bbox}`\n );\n}\n\n/** The Earth's relief for `terrain: true`: the Terrain Tiles of AWS's open data registry, worldwide (SRTM, EU-DEM,\n * GMTED… merged by Mapzen), Terrarium PNGs of 256 px to level 14, altitudes above the mean sea level */\nexport const TERRAIN_TILES = {\n url: 'https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png',\n maxZoom: 14,\n} as const;\n\n/** Sea color of each basemap, for the globe under the tiles (polar caps), RGB 0-1 */\nexport const SEA: Record<BasemapName, [r: number, g: number, b: number]> = {\n 'osm-positron': [0.761, 0.784, 0.792],\n 'osm-liberty': [0.62, 0.741, 1],\n 'osm-bright': [0.682, 0.812, 0.886],\n 'ign-plan': [0.667, 0.835, 0.914],\n 'ign-plan-grey': [0.792, 0.792, 0.792],\n 'ign-plan-vector': [0.667, 0.835, 0.914],\n 'ign-plan-grey-vector': [0.792, 0.792, 0.792],\n 'ign-ortho': [0.039, 0.231, 0.349],\n none: [0.85, 0.85, 0.83],\n};\n"]}
1
+ {"version":3,"file":"basemaps.js","sourceRoot":"","sources":["../../src/basemap/basemaps.ts"],"names":[],"mappings":"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","sourcesContent":["/** The basemaps by name: OpenFreeMap's vector styles (OpenStreetMap data, worldwide) and the Géoplateforme's (IGN,\n * France), the credits of the sources, and the relief of each body */\nimport { geoplateformeWmts, IGN_ATTRIBUTION } from '../geoplateforme.ts';\nimport type { BasemapName, RasterOptions } from '../types.ts';\n\nexport { IGN_ATTRIBUTION };\n\nconst PLAN = 'GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2';\n\n/** The raster basemaps of the Géoplateforme (WMTS, Web Mercator), crediting the IGN */\nexport const BASEMAPS: Record<'ign-plan' | 'ign-plan-grey' | 'ign-ortho', RasterOptions> = {\n 'ign-plan': geoplateformeWmts(PLAN),\n 'ign-plan-grey': geoplateformeWmts(PLAN, { saturation: 0 }),\n 'ign-ortho': geoplateformeWmts('ORTHOIMAGERY.ORTHOPHOTOS', { format: 'image/jpeg' }),\n};\n\n/** The former names of the Géoplateforme basemaps (before 0.5), and their names now: an error tells it */\nexport const RENAMED_BASEMAPS: Record<string, BasemapName> = {\n plan: 'ign-plan',\n 'plan-grey': 'ign-plan-grey',\n ortho: 'ign-ortho',\n 'plan-vector': 'ign-plan-vector',\n 'plan-grey-vector': 'ign-plan-grey-vector',\n};\n\n/** Credits of OpenFreeMap's basemaps, as its TileJSON gives them */\nexport const OPENFREEMAP_ATTRIBUTION =\n '<a href=\"https://openfreemap.org\">OpenFreeMap</a> <a href=\"https://www.openmaptiles.org/\">© OpenMapTiles</a> ' +\n 'Data from <a href=\"https://www.openstreetmap.org/copyright\">OpenStreetMap</a>';\n\n/** Credits of the Terrain Tiles of AWS's open data registry (Mapzen's Terrarium tiles) and of their sources */\nexport const TERRAIN_TILES_ATTRIBUTION =\n '<a href=\"https://github.com/tilezen/joerd/blob/master/docs/attribution.md\">Terrain Tiles</a> (Mapzen, AWS)';\n\n/** IGN hillshade, grey on transparent, zooms 6 to 17 */\nexport const HILLSHADE: RasterOptions = geoplateformeWmts('IGNF_ELEVATION.ELEVATIONGRIDCOVERAGE.SHADOW', {\n minZoom: 6,\n maxZoom: 17,\n});\n\n/** IGN terrain model (RGE ALTI and its fill-ins, France), raw altitudes in metres from the Géoplateforme WMS */\nexport const TERRAIN_URL =\n 'https://data.geopf.fr/wms-r/wms?SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&LAYERS=ELEVATION.ELEVATIONGRIDCOVERAGE.HIGHRES' +\n '&STYLES=&CRS=EPSG:3857&BBOX={bbox}&WIDTH=256&HEIGHT=256&FORMAT=image/x-bil;bits=32';\n\n/** The relief of the Moon and Mars by default: NASA's Trek image services (ArcGIS), raw 32-bit altitudes in metres\n * asked for in the body's Mercator, with their credits. The Moon: LOLA's global model, 128 pixels per degree (237 m);\n * Mars: MOLA's, 128 and 64 pixels per degree merged (463 m), above the areoid */\nexport const BODY_TERRAINS = {\n moon: {\n url: 'https://trek.nasa.gov/moon/trekarcgis/rest/services/LRO_LOLA_DEM_Global_128ppd_v04/ImageServer',\n maxZoom: 8,\n attribution: '<a href=\"https://trek.nasa.gov/moon/\">NASA Moon Trek</a>: LOLA terrain model, NASA/GSFC/MIT',\n },\n mars: {\n url: 'https://trek.nasa.gov/mars/trekarcgis/rest/services/mola128_mola64_merge_90Nto90S_SimpleC_clon0/ImageServer',\n maxZoom: 8,\n attribution: '<a href=\"https://trek.nasa.gov/mars/\">NASA Mars Trek</a>: MOLA terrain model, NASA/JPL/GSFC',\n },\n} as const;\n\n/** An ArcGIS image service (a URL ending in `/ImageServer`) */\nexport const IMAGE_SERVER = /\\/ImageServer\\/?$/;\n\n/**\n * The `exportImage` template of an ArcGIS image service for the relief: 256 × 256 raw 32-bit floats (`bsq`, followed\n * by its validity mask) of the box `{bbox}` in the Mercator of the body. On the Earth, Web Mercator (EPSG:3857);\n * elsewhere, a Mercator on the sphere of `radius` metres (Web Mercator's own formulas), given in WKT.\n */\nexport const imageServerTerrain = (url: string, earth: boolean, radius: number): string => {\n const crs = earth\n ? '3857'\n : encodeURIComponent(\n JSON.stringify({\n wkt:\n `PROJCS[\"Mercator\",GEOGCS[\"GCS\",DATUM[\"D\",SPHEROID[\"S\",${radius},0]],PRIMEM[\"Reference_Meridian\",0],` +\n 'UNIT[\"Degree\",0.0174532925199433]],PROJECTION[\"Mercator\"],PARAMETER[\"False_Easting\",0],' +\n 'PARAMETER[\"False_Northing\",0],PARAMETER[\"Central_Meridian\",0],PARAMETER[\"Standard_Parallel_1\",0],' +\n 'UNIT[\"Meter\",1]]',\n }),\n );\n\n return (\n `${url.replace(/\\/$/, '')}/exportImage?f=image&format=bsq&pixelType=F32&size=256,256` +\n `&bboxSR=${crs}&imageSR=${crs}&bbox={bbox}`\n );\n};\n\n/** The Earth's relief for `terrain: true`: the Terrain Tiles of AWS's open data registry, worldwide (SRTM, EU-DEM,\n * GMTED… merged by Mapzen), Terrarium PNGs of 256 px to level 14, altitudes above the mean sea level */\nexport const TERRAIN_TILES = {\n url: 'https://s3.amazonaws.com/elevation-tiles-prod/terrarium/{z}/{x}/{y}.png',\n maxZoom: 14,\n} as const;\n\n/** Sea color of each basemap, for the globe under the tiles (polar caps), RGB 0-1 */\nexport const SEA: Record<BasemapName, [r: number, g: number, b: number]> = {\n 'osm-positron': [0.761, 0.784, 0.792],\n 'osm-liberty': [0.62, 0.741, 1],\n 'osm-bright': [0.682, 0.812, 0.886],\n 'ign-plan': [0.667, 0.835, 0.914],\n 'ign-plan-grey': [0.792, 0.792, 0.792],\n 'ign-plan-vector': [0.667, 0.835, 0.914],\n 'ign-plan-grey-vector': [0.792, 0.792, 0.792],\n 'ign-ortho': [0.039, 0.231, 0.349],\n none: [0.85, 0.85, 0.83],\n};\n"]}
@@ -52,20 +52,20 @@ interface Resolved {
52
52
  extent: [number, number, number, number] | undefined;
53
53
  }
54
54
  /** A tile grid ready to plan tiles: its CRS found, its matrices completed, its bounds projected */
55
- export declare function resolveGrid(grid: TileGrid): Resolved;
55
+ export declare const resolveGrid: (grid: TileGrid) => Resolved;
56
56
  /** The longitudes and latitudes of tiles in longitudes and latitudes, two 256 px tiles side by side at level 0, rows
57
57
  * from the north (NASA's Trek, WorldCRS84Quad), levels `minLevel` to `maxLevel` ({z} is the level) */
58
- export declare function equirectangularGrid(minLevel: number, maxLevel: number): TileGrid;
58
+ export declare const equirectangularGrid: (minLevel: number, maxLevel: number) => TileGrid;
59
59
  /**
60
60
  * The plan of Mercator tile `z`/`x`/`y` (`size` pixels a side) from a source of URL template `url` in grid `g`; null
61
61
  * where the source has nothing
62
62
  */
63
- export declare function planTile(g: Resolved, url: string, z: number, x: number, y: number, size: number): Job | null;
63
+ export declare const planTile: (g: Resolved, url: string, z: number, x: number, y: number, size: number) => Job | null;
64
64
  /**
65
65
  * The map zooms a grid's matrices span (the pixel size of the finest and of the coarsest, two levels coarser, where
66
66
  * the tiles still fit a mosaic), measured at the middle of its bounds, or of its coarsest matrix
67
67
  */
68
- export declare function gridZooms(g: Resolved): {
68
+ export declare const gridZooms: (g: Resolved) => {
69
69
  minZoom: number;
70
70
  maxZoom: number;
71
71
  };
@@ -77,5 +77,5 @@ export type RemoteReprojection = (job: Job, tile: [z: number, x: number, y: numb
77
77
  * A raster loader drawing Web Mercator tiles of `size` pixels from a source of URL template `url` in tile grid `grid`:
78
78
  * planned here, drawn in a worker of the map through `remote` when it can, else in the page
79
79
  */
80
- export declare function gridLoader(url: string, grid: Resolved, size: number, remote?: RemoteReprojection): Draw;
80
+ export declare const gridLoader: (url: string, grid: Resolved, size: number, remote?: RemoteReprojection) => Draw;
81
81
  export {};