Commit 0027fb2
committed
fix(raster): render restored rasters and keep globe view on the WASM engine
Two follow-ups to making cog-tiler-wasm the default engine.
Opening a saved project in a running app left the raster invisible. The
engine deferred its first layer-add until the style could accept it, but
waited on MapLibre's `load` event, which fires exactly once per map -- so
an engine whose first apply landed after the map had loaded (while the
project's style swap was in flight) attached a handler that never fired
and never added its layers at all. The layer sat in the panel with
correct bounds, bands, and symbology, rendering nothing. Fixed upstream
in maplibre-gl-raster v0.14.1 (opengeos/maplibre-gl-raster#57), which
waits on `styledata` instead; this bumps to it.
Adding a raster no longer drops the map out of globe view. The mercator
switch exists because deck.gl's COG tile traversal cannot draw on the
globe -- which is true of the deck.gl engine only. The WASM and TiTiler
engines render through a native MapLibre raster layer that draws on the
globe like any other raster source, so the switch is now gated on the
engine. It still fires on `rasterchange`, which is what setEngine emits,
so switching back to the GPU engine forces mercator for the rasters
already on the map rather than only the next one added.1 parent 13b5a3a commit 0027fb2
6 files changed
Lines changed: 37 additions & 9 deletions
File tree
- apps/geolibre-desktop
- packages/plugins
- src/plugins
- tests
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| |||
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| |||
729 | 730 | | |
730 | 731 | | |
731 | 732 | | |
732 | | - | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
| 742 | + | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
733 | 747 | | |
734 | 748 | | |
735 | 749 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
| 69 | + | |
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| |||
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
81 | 95 | | |
82 | 96 | | |
83 | 97 | | |
| |||
0 commit comments