activist icon indicating copy to clipboard operation
activist copied to clipboard

Add in clusters of markers to map component

Open andrewtavis opened this issue 1 year ago β€’ 9 comments
trafficstars

Terms

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 😊

andrewtavis avatar Jan 29 '24 21:01 andrewtavis

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.

BenTev28 avatar Feb 26 '25 22:02 BenTev28

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 :)

andrewtavis avatar Feb 26 '25 22:02 andrewtavis

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 :)

andrewtavis avatar Feb 26 '25 22:02 andrewtavis

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.

BenTev28 avatar Feb 26 '25 22:02 BenTev28

Isn't time sensitive, no :) Feel free to focus here though! I'm asking for feedback from others in the coverage issue as well 😊

andrewtavis avatar Feb 27 '25 07:02 andrewtavis

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 avatar Mar 02 '25 00:03 andrewtavis

@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.

BenTev28 avatar Mar 07 '25 17:03 BenTev28

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! πŸ—ΊοΈ

andrewtavis avatar Mar 07 '25 23:03 andrewtavis

Hey @BenTev28 πŸ‘‹ Checking in here to see if there's anything we can do to support :) Hope all's well!

andrewtavis avatar Apr 18 '25 16:04 andrewtavis

Hi, I want to continue with this issue @andrewtavis

nicki182 avatar Apr 30 '25 10:04 nicki182

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! 😊

andrewtavis avatar Apr 30 '25 12:04 andrewtavis

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?

nicki182 avatar May 01 '25 09:05 nicki182

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!

andrewtavis avatar May 01 '25 09:05 andrewtavis

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

nicki182 avatar May 01 '25 09:05 nicki182

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?

andrewtavis avatar May 01 '25 10:05 andrewtavis

perfect

nicki182 avatar May 01 '25 10:05 nicki182

Closed by #1268 πŸš€πŸš€πŸš€ Thank you so much for all your efforts here, @nicki182! πŸ™Œ

andrewtavis avatar May 26 '25 22:05 andrewtavis