activist
activist copied to clipboard
Add in clusters of markers to map component
Terms
- [X] I have searched open and closed feature requests
- [X] I agree to follow activist's Code of Conduct
Description
A great feature to add to the new MediaMap component component would be that the markers would cluster into circles if there are many next to one another. The map can be found on activist.org/events/123/about.
We use MapLibre GL JS for our mapping service, so their documentation and code related to it or MapBox that it was forked from would be where to look. As activist has two types of events - action and learn - it would be good if this was implemented using custom property clusters such that if the cluster is all action events it will be red, if it's all learn events it will be blue, and if there's a mix of the two then we can do a donut plot as in the examples with the breakdown of what the events within it are.
Contribution
It would be good to plan this out a little bit before we get started. Would be great if someone from the community wanted to jump in, or also welcome to a new contributor with some mapping experience. Happy to help and implement as well π
Hey @andrewtavis -
I could take this on if you'd like. I haven't worked with this specific package before, but I've worked with Leaflet maps - good chance there's some overlap.
I was just trying to think of an issue for you to work on, @BenTev28! Great thought here :) Yes the creator of Leaflet is/was actually at MapBox that then was forked for MapLibre, so there will be some overlap for sure π Please let us know if there's anything we can do to assist! For the PR, feel free to just add a bunch of markers to the map component to trigger this and then I can remove them in review :)
If you have a moment and want to look at something for the backend, feel free to also check out #1125 where the coverage report is not ignoring the files that it's supposed to as detailed in my comment here :)
Sounds good! Is the coverage issue time sensitive? I'm happy to take both issues, but not sure how much capacity/day I can realistically commit to.
Isn't time sensitive, no :) Feel free to focus here though! I'm asking for feedback from others in the coverage issue as well π
Quick note @BenTev28 that I just did a few updates of the map, so might be best if you pull so you're working with the most up to date file :)
@andrewtavis
I just want to clarify that I'm investigating the right application here. It looks like currently the map component is only implemented on the event detail page, where it's showing a pin only for that event's location. For clustering, is the idea to add other pins to the map on the event detail page? Or to add a map component to the 'events near me' page?
Personally, I think the latter would be more useful, but I don't want to set out down the wrong path.
Thanks for checking on this, @BenTev28! π So an in person event for now would be just one point, but maybe it could expand in the future if say there was an event that had a few locations or would move from one place to another. With that being said, focus for now is definitely just one point, and as you surmised the functionality you're working on would be to use the component for the events near me or map view of the events search :)
Let us know if there are further questions! πΊοΈ
Hey @BenTev28 π Checking in here to see if there's anything we can do to support :) Hope all's well!
Hi, I want to continue with this issue @andrewtavis
Adding @nicki182 to the assignees here :) Please let us know if you need any support, and also let us know if you'd like to work on this still, @BenTev28! π
Hi, I have setup the project and I was checking how it works, I have questions regarding this feature. Where would this map be? Because would that be in the events search page or a different page?
Hey @nicki182 π You can find the map component for now on an event page, so go select View events on the landing page when the project loads, then select an event and you'll see the map on the top right. I'd use that while you develop this functionality, but then specifically this will be for the events search page as you thought :) We won't need it for the events page, but then we just have list view for the /events route now. The map view will use the functionality you're working on here π
Let us know if you have further questions!
can we do it in the organization about page? I will just copy and paste some code there and ask the events from the organization and create clustering from there. Since I saw an empty space there
How does adding it to the home page at /home sound? Then we can review and remove the code from there once the functionality is what we want it to be?
perfect
Closed by #1268 πππ Thank you so much for all your efforts here, @nicki182! π