Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter fixed in osm-verkehrswende-repo #1

Closed
tordans opened this issue Apr 3, 2024 · 3 comments
Closed

Filter fixed in osm-verkehrswende-repo #1

tordans opened this issue Apr 3, 2024 · 3 comments

Comments

@tordans
Copy link

tordans commented Apr 3, 2024

FYI, I fixed and improved the filter system in https://github.com/osmberlin/www.osm-verkehrswende.org/commits/main/

I did not look into how we might keep the codebase of this stand alone version in sync with the project website. Might be easiest to copy paste the components. However, we should extract the parts that need to be configured per page. Likely the pmtiles URL mainly?

@Findus23
Copy link
Owner

Findus23 commented Apr 3, 2024

Thanks for the fixes, I already saw the commits and was thinking about applying them once I have some time.
And yes, the way I did the fork is not the best from a maintainability point of view. But it should still be pretty easy to apply.

And thanks again for your great work!

@Findus23
Copy link
Owner

Findus23 commented Apr 3, 2024

I just went through all of the commits and indeed applying them manually wasn't that hard (thanks to typescript).
And now the filters are working exactly the way they should!

I just noticed two things:

There are a lot of JS errors like layers.track markings.filter[3][0]: expected one of [==, !=, >, >=, <, <=, in, !in, all, any, none, has, !has, within], "match" found. I don't know maplibre-gl well enough to fix this (I normally don't use vector tiles), but also as I replace the background map in my code (so I don't have to worry about how to serve vector tiles), I avoid that issue.

And because of the id-change in the legend, the colors in the mapinspector are broken, but that's a simple fix you should be able to directly reuse: 13ed2d2

@tordans
Copy link
Author

tordans commented Apr 4, 2024

I just went through all of the commits and indeed applying them manually wasn't that hard (thanks to typescript). And now the filters are working exactly the way they should!

Perfect, thanks!

There are a lot of JS errors like layers.track markings.filter[3][0]: expected one of [==, !=, >, >=, <, <=, in, !in, all, any, none, has, !has, within], "match" found. I don't know maplibre-gl well enough to fix this (I normally don't use vector tiles), but also as I replace the background map in my code (so I don't have to worry about how to serve vector tiles), I avoid that issue.

Yeah, this is super annoying and I don't know why it happens. I have asked about it in the maplibre Slack but no answer. And I started looking into it in maplibre/maplibre-style-spec#555 but did not get very far. TBH I don't even understand why I cannot find any issues on it, because I think I am doing everything like I should … so it cannot be that I am the only one having those issues. 🤷 — I am very open to suggestions :).

And because of the id-change in the legend, the colors in the mapinspector are broken, but that's a simple fix you should be able to directly reuse: 13ed2d2

Thanks, great catch, did the same in osmberlin/www.osm-verkehrswende.org@b1d4a29

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants