Use smaller range before loading suggestions #50
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Very cool to see this "Restaurants, Coffee, Groceries…" thing at the top 🙌🏽
It's also cool but a bit scary that it can load half a country worth of recommendations. This is visually challenging to parse and can slow down the browser. Maybe more useful if it's limited to a smaller window around the current location?
Yeah, it's too much at that range.
Like almost everything with maps, this is a tricky one, too. When you look at the countryside, you often need a considerably wider range for it to be useful, because you need to cover many villages far apart from each other, while in a city like Berlin, anything more than a few blocks is already too much.
I'm not yet sure what the best solution is. GMaps actually preloads place data on the server and then renders the quick search suggestions based on what's there (so they're also more useful). But as an unhosted app, Marco currently does all of that on the client side.
I guess the Overpass API could be extended with some kind of indexed, cached search endpoint for larger ranges, but we're not running our own Overpass server yet. Also, loading photos and reviews from Nostr relays can be used for quickly gauging how many places there would be (once used enough).
I'm open for any ideas and suggestions that don't immediately make the app less useful for browsing the countryside. However, a minimum zoom level is definitely also needed in general, because searching a whole country makes no sense whatsoever.
Use smaller range before loading suggestions?to Use smaller range before loading suggestionsI imagine limiting a query to X points nearest to the current location if that's possible, or simply sorting/limiting them after the query if that's not too expensive client-side. Maybe there's some number that fits well to human perception (probably not productive to look through 1000 items, but maybe 50–100 is more comfortable?
Not sure if the country level thing was also a result of me skipping the OS location permission first time and then reactivating later. Seems like on another try the map zoomed into a more precise area/neighborhood. IIRC there was no feedback that location was disabled btw.
Search is not limited to the current location, and you can zoom in and out as well as pan at will.
Limiting makes sense, but how do you decide what to show? Review and photo events from Nostr will make this possible, but without those, you'd have to do it rather randomly.