phlask / phlask-map

Code behind the Phlask Web Map
https://beta.phlask.me
34 stars 34 forks source link

Two markers for the Indy hall address on the search bar #357

Closed mandyshri101 closed 8 months ago

mandyshri101 commented 9 months ago

Describe the bug Two markers populating after entering Indy hall address on the search bar. Picture attached for the reference

To Reproduce Steps to reproduce the behavior:

  1. Go to phlask.me
  2. Click on search Indy hall and select it and press enter
  3. Scroll down to google maps area
  4. You would find the two makers for the same address.

Expected behavior Indy hall with "Indy Hall Clubhouse at 709 N 2nd St, North 2nd Street, Philadelphia, PA, USA" entry should have only one marker of the google marker as show in the below expected screenshot marker

bug Screenshots

image

Expected screenshot

image

Desktop (please complete the following information):

Smartphone (please complete the following information):

Additional context Add any other context about the problem here.

vontell commented 9 months ago

I'm happy to take on this task! Seems like an additional marker is being placed on the pin for Philadelphia as a whole. Not sure how to assign myself to this, but would like to take it on!

vontell commented 9 months ago

@mandyshri101 Dug into this issue more, and I found that two markers aren't actually appearing for a search - what's happening is that when the map and your location loads, there is a default pin being placed at the center of your map (I noticed this because with my location services off, it places a pin on Philadelphia, but when turned on (and I'm traveling) it placed a pin at the center of my current location).

I looked at the history of this code, and it's been there for a long time (the last change to that block of code was a year ago during a refactor) so I can't determine if the change is intentional or not. I personally think it doesn't make much sense to show their current location as a pin - instead we should enable a blue dot indicator or some other smaller icon.

Opened a PR here: https://github.com/phlask/phlask-map/pull/360

Here is a screenshot with the change:

Screenshot 2023-12-16 at 12 31 27 PM