-
Notifications
You must be signed in to change notification settings - Fork 7
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
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
? "pointer" | ||
: "auto"; | ||
}); | ||
getFeatureInfoAtCoordinate(coordinate, queryableLayers, "pointermove").then( |
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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 ?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this 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.
How to
Others