-
Notifications
You must be signed in to change notification settings - Fork 0
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
Add Multipoint support with useGeometry composable #190
Conversation
See also this commit Include a hack to get the MultiPoint into the app.
|
d3e4ae3
to
0af8505
Compare
@@ -191,6 +191,9 @@ export const menuStore = defineStore('menu', { | |||
) | |||
).filter(e => e) as ApiPois[] | |||
|
|||
const { flattenMultipoint } = useGeometry() | |||
posts = posts.map(p => ({ ...p, features: flattenMultipoint(p.features) as ApiPoi[] })) |
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.
No need for composable here, as std import is fine. Or even move the code here as it the only use.
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.
Of course we can make flattenMultipoint
as default export of useGeometry
composable.
I just dit it this way for separation of concerns :)
I think copying the function straight to menu.ts
will just increase the complexity of understanding and maintainability.
I could've think about a store getter
, but I think the correct usage of getters
is when you want a transformated format of state value.
In our case we want the state value to be always transformated, so I doesn't seems to be a correct option.
18e857e
to
051774f
Compare
I confirm the issue on marker come from the id The issue about color of cluster come from usage of unknown color on the POI. The color should be one the menu. We only have stats for colors from menu. |
Ok so we have two separated issues if I understand well ?
About the ID could you explain why we are doing |
Generate a diff id for each new Point from MultiPoint due to this https://github.com/teritorio/vido/blob/develop/lib/markerLayerFactory.ts#L212
That only a settings issue. |
dea2f8d
to
9809bb2
Compare
|
9809bb2
to
9602456
Compare
Should I close this PR as #203 fixes it ? |
Closed in favour of #203 |
See a basic exemple here: https://gist.github.com/wazolab/1338938826b9c317184bec64c5af6980
@frodrigo: For the moment I'm not sure the integration is perfect in Vido. I need to go deeper into map rendering lifecycles to be sure the feature flattening is always effective.
Can you tell me if the function suits our needs for the moment ?