OneBusAway / wayfinder

Modern web app frontend for OneBusAway built in JavaScript with SvelteKit
GNU Affero General Public License v3.0
4 stars 1 forks source link

Load More Stops On Panning or Zooming #2

Closed aaronbrethorst closed 4 months ago

aaronbrethorst commented 4 months ago

Right now, the map only loads stops on first load. We need to improve this by continuing to load more stops whenever the user pans the map (i.e. moves left/right/up/down) or zooms in or out. Check out GoogleMaps.svelte's loadStopsForLocation function to see how to load more stops from the server. The (lat, lng) params should come from the current center of the Google Map.

It's ok to leave all of the existing stops on the map—i.e. for now we are only going to add more stops to the map as the user pans and zooms.

The only thing to watch out for is the possibility of loading duplicate stops. We must not load a stop twice on the map. For instance, if the server returns the stop "15th Ave E & Galer St" from two invocations of loadStopsForLocation(), we should ensure that only one marker for that stop is added to the map.

Acceptance criteria

tarunsinghofficial commented 4 months ago

Got the requirements. I'm interested in working on this now. Thanks.

aaronbrethorst commented 4 months ago

@tarunsinghofficial go for it!