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

fix(kilometrage): add support for multiple lines in popup #1207

Draft
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

danji90
Copy link
Contributor

@danji90 danji90 commented Jan 14, 2025

How to

Others

  • It's not a hack or at least an unauthorized hack :).
  • The images added are optimized.
  • Everything in ticket description has been fixed.
  • The author of the MR has made its own review before assigning the reviewer.
  • The title means something for a human being and follows the conventional commits specification.
  • The title contains [WIP] if it's necessary.
  • Labels applied. if it's a release? a hotfix?
  • Tests added.

@danji90 danji90 added the enhancement New feature or request label Jan 14, 2025
@danji90 danji90 self-assigned this Jan 14, 2025
Copy link

vercel bot commented Jan 14, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dev-trafimage-maps ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 2:18pm
trafimage-maps ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 2:18pm

.env Outdated Show resolved Hide resolved
? "pointer"
: "auto";
});
getFeatureInfoAtCoordinate(coordinate, queryableLayers, "pointermove").then(
Copy link
Collaborator

Choose a reason for hiding this comment

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

this third parameter seems a bad idea. can we avoid it ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I propose to do the fetchKilometrage call inside the Kilometrage popup. What do you think ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also thought about that, I liked the idea of having the Popup just handle the UI and letting the layer handle the data. Is there a benefit from doing it in the popup?

And why is the eventType Parameter bad? I thought it might be useful also for other use cases and was surprised we didn't already have a way to access the event. Maybe we could pass in the whole event, not just the type

Copy link
Collaborator

@oterral oterral Jan 23, 2025

Choose a reason for hiding this comment

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

if you want a hell of a mess yes. If you start doing this you will lose sight on what does the getFeatureInfoAtCoordinates , you will have to check every layer every time to be sure what's happening.

What you could do is renaming the parameter: 'loadExternalData` true or false, default to true. and if true, this parameter will append some extenal data to the feature your request when you want it .

Ideally we should have a hasFeatureInfoAtCoordinate(coordiante, layers) on layers. And this function will only test if there a clickable feature for this layer at the coordinate. Can you do it ? . I m not sure if it's doable without changing too much code.

Copy link
Collaborator

@oterral oterral left a comment

Choose a reason for hiding this comment

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

Just one minor change to think about.

@oterral oterral mentioned this pull request Jan 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

Successfully merging this pull request may close these issues.

2 participants