Commit Graph
3 Commits
Author SHA1 Message Date
c629e10af7 set correct map view if opened stylefile provides a map view and the current map is empty (#1552)
## Launch Checklist

closes https://github.com/maplibre/maputnik/issues/1546

 - [x] Link to related issues.
 https://github.com/maplibre/maputnik/issues/1546
 - [x] Write tests for all new functionality.
 - [x] Add an entry to `CHANGELOG.md` under the `## main` section.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Harel M <harel.mazor@gmail.com>
2026-01-21 21:04:21 +00:00
Lukas Weber f24031dd5c fix root relative paths (#1643)
## Launch Checklist

this is a follow up to https://github.com/maplibre/maputnik/pull/1549

when testing this, I only used raster tiles. However root relative
vector tiles are not loaded correctly by maplibre gl js:
https://github.com/maplibre/maplibre-gl-js/issues/6818

The current state is problematic as with
https://github.com/maplibre/maputnik/pull/1549 we don't have the visuals
that the url is wrong.

Till [the maplibre
issue](https://github.com/maplibre/maplibre-gl-js/issues/6818) is fixed
(if it even need to be fixed), we can make use of
[transformRequest](https://maplibre.org/maplibre-gl-js/docs/API/type-aliases/MapOptions/#transformrequest)
where we convert root relative requests to "real" requests

 - [x] Briefly describe the changes in this PR.
 - [x] Link to related issues.
- [x] Include before/after visuals or gifs if this PR includes visual
changes -> in maplibre ticket
2026-01-20 07:45:21 +02:00
Lukas Weber 74a21e1b77 allow root relative paths (#1549)
## Launch Checklist

<!-- Thanks for the PR! Feel free to add or remove items from the
checklist. -->


 - [x] Briefly describe the changes in this PR.

when launching maputnik with `--static /data` those files are available
under e.g. `localhost:8000/static`. In this case, root relative urls are
enough (e.g. requsting `/static/fonts`...). This does currently lead to
a validation error:

<img width="361" height="61" alt="grafik"
src="https://github.com/user-attachments/assets/2be1d649-51c9-4e64-ac44-c0089b462be2"
/>

- [x] Include before/after visuals or gifs if this PR includes visual
changes.

after this change it works:

<img width="338" height="68" alt="grafik"
src="https://github.com/user-attachments/assets/27f23d1b-11f6-4efc-b508-2f51bf254953"
/>

 - [x] Write tests for all new functionality.
 - [x] Add an entry to `CHANGELOG.md` under the `## main` section.
2025-12-02 12:03:09 +02:00