radical-data / queering-the-map

Queering the Map is a community-based platform where individuals anonymously pin their queer experiences and stories on a global map.
https://queeringthemap.com
19 stars 6 forks source link

Center Popups on Pins #18

Closed queeringthemap closed 5 months ago

jokroese commented 8 months ago

Could you give more detail what we mean by this issue @queeringthemap?

queeringthemap commented 5 months ago

Apologies for the lack of clarity here, what I meant by this was:

Centering the body of the pop-up to the pop-up triangle anchor, so that it looks the same as the current design.

QTM_GAZA_3

nielsbom commented 5 months ago

Would centering the pin (when clicked) relative to the map help make this simpler?

I can imagine it also prevents the problem of a popup being rendered off-map partially.

jokroese commented 5 months ago

I've implemented this in https://github.com/radical-data/queering-the-map/pull/54 with one-line.

We could center the map on clicked pins but it requires an extra bit of work (would be worth distinguishing between desktop and mobile because it would be weird to do on desktop but could be nice for mobile). The underlying bit of it is simple though: https://maplibre.org/maplibre-gl-js/docs/examples/center-on-symbol/.