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

GSLUX-650: Time layers on map #86

Merged
merged 11 commits into from
Oct 19, 2023
Merged

GSLUX-650: Time layers on map #86

merged 11 commits into from
Oct 19, 2023

Conversation

AlitaBernachot
Copy link
Contributor

@AlitaBernachot AlitaBernachot commented Oct 16, 2023

JIRA issue

https://jira.camptocamp.com/browse/GSLUX-650

Description

  • Enable time layers on map
  • Improve ui slider: enable click on track
  • Use factory and helpers for layer creation according to layer type (WMS, WMTS, ...)
  • Refactor bg layer creation with layer creation that were exactly the same

@github-actions
Copy link
Contributor

GitHub Pages links: * Luxembourg-geoportail: https://geoportail-luxembourg.github.io/luxembourg-geoportail/GSLUX-650-TimeLayersMap/

Copy link
Contributor

@tkohr tkohr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this nice functionality and the refactoring @AlitaBernachot !

One minor things I noticed when testing was that the slider-thumb does not always land exactly on the click position when clicking on the slider on the first click, while it does on the second click. But I think this can be improved later.

} else if (+(maxValue.value - value) < +(minValue.value - value)) {
maxValue.value = value
} else {
maxValue.value = value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be minValue to move the left slider if the click is closer to it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right, thx!

olLayer.setOpacity(layer.opacity as number)

if (layer.metadata?.hasOwnProperty('attribution')) {
// TODO: fix this to display attribution, but at that time, this brokes the vue runtime-dom
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe needs a rebase after the attribution merge?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, will remove this since attribution is now handled by a vue component.


const olLayer = new MapLibreLayer({
maplibreOptions: options,
label: layer.name,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also be included in destructuring.

@AlitaBernachot AlitaBernachot force-pushed the GSLUX-650-TimeLayersMap branch 2 times, most recently from e84a455 to a4a87f8 Compare October 19, 2023 15:09
@AlitaBernachot
Copy link
Contributor Author

Thanks for this nice functionality and the refactoring @AlitaBernachot !

One minor things I noticed when testing was that the slider-thumb does not always land exactly on the click position when clicking on the slider on the first click, while it does on the second click. But I think this can be improved later.

Thank you for reporting this! some unneeded extra watchers were causing this. Now, it is fixed.

@AlitaBernachot AlitaBernachot merged commit 9d89741 into main Oct 19, 2023
2 checks passed
@AlitaBernachot AlitaBernachot deleted the GSLUX-650-TimeLayersMap branch October 19, 2023 16:02
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

Successfully merging this pull request may close these issues.

2 participants