Commit 90be5c7
committed
fix(web): use the main-map style for the photo-gallery minimap
The minimap was hardcoded to `maptilerStyleUrl("bright-v2", env)` and
also bailed early when `env.maptilerKey` was empty. On the self-hosted
deployment (`NEXT_PUBLIC_STYLE_PROVIDER=openmapx`, MapTiler key empty)
both branches failed: the bail-out skipped MapLibre instantiation
entirely, leaving just the bordered container — which is what the
gallery rendered as a black box.
Mirror the MapCanvas style-loading split: when `env.styleProvider ===
"openmapx"` resolve `loadOpenMapXStyle(env)` (same self-hosted
openmapx-streets style, tiles/sprite/glyphs patched in from env);
otherwise fall back to the cloud style URL. The MapLibre import and
style fetch run in parallel via `Promise.all`, and a top-level catch
keeps a failed style load from surfacing as an unhandled rejection.
The minimap now uses the same tiles and style as the main map.1 parent 076162a commit 90be5c7
1 file changed
Lines changed: 17 additions & 4 deletions
Lines changed: 17 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
| 28 | + | |
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
517 | | - | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
518 | 529 | | |
519 | 530 | | |
520 | 531 | | |
521 | | - | |
| 532 | + | |
522 | 533 | | |
523 | 534 | | |
524 | 535 | | |
| |||
528 | 539 | | |
529 | 540 | | |
530 | 541 | | |
| 542 | + | |
| 543 | + | |
531 | 544 | | |
532 | 545 | | |
533 | 546 | | |
| |||
0 commit comments