OSS-team-zulu / Zulu

Location-centric local discovery app. An open-source react-native app where users can pin points of interest on a shared map. Visibility is limited to nearby points of interest.
MIT License
8 stars 9 forks source link

Geo markers alternate every 15 seconds on the map #25

Open nvgoldin opened 4 years ago

nvgoldin commented 4 years ago

How to reproduce

  1. Bring up a development environment: Frontend instructions & Backend instructions
  2. Load test data points by running at ./backend
    PYTHONPATH=$PYTHONPATH:$PWD python contrib/load_points.py
  3. Open browser at http://localhost:3000/
  4. Wait for 15 seconds, see the cities geo-points disappear, after 15 seconds they come back (keeps alternating)

See video at: https://drive.google.com/file/d/1zizAQ3-U2dm5HJQ_Nu9xANfgxH9nW9yk/view?usp=sharing

Additional information

This seems like a ReactJS rendering info, see this code: https://github.com/OSS-team-zulu/Zulu/blob/4b39d0a6118d43c272ac0fa191b08233b7b8b675/frontend/zulu/src/components/Map/MapGeojsonMarkers.jsx#L64-L74

In componentDidMount we set an interval to take the user location from the browser every 15 seconds - this seems to cause them to alternate - we're probably not doing something right in the interval logic.

jherskow commented 4 years ago

^ this PR also fixes this issue

nvgoldin commented 4 years ago

@ornokrean - note that #38 didn't fix it as far as I can tell (checked it this morning).