Open gereons opened 7 years ago
I like this. If there isn't enough in your home country then it fills with the next closest.
Hmm... Yeah, you can do this geolocation thing in the browser. Though I like to keep it simple. What should be the default distance? I want to spare the UI from another field. 200km sounds reasonable in Europe. I'm not so sure about the rest of the world, especially US.
Donald: "closest country" is trivial from New Zealand, anywhere else it's not :D I could try "closest" but you would still not be happy if it found a tournament next door but a year later...
This is the best algorithm I thought up:
Any better ideas?
I don't think this will work. My IP-based geolocation is somewhere in the outskirts of Cologne, and as there will always be an upcoming tournament in downtown Cologne, this would reduce the distance to 20 or 30km. Doubling that wouldn't even show me events in Aachen or Dortmund which are two of the closest cities that run tournaments.
I would actually prefer to have two user profile fields, home town and distance for this.
I wrote in point "2" to use minimum distance of 150km, which is doubled. I guess you misunderstood me. So the search would be 300km minimum and twice the distance to the closest tournament.
I don't know if that's usable in the US.
Yeah, sorry, I totally misunderstood the "use that" to mean the "closest distance". :)
perhaps we can get a "europe" Country and/or US states too?
@gereons @GuvBubbs @ANR-PeterPan: I implemented a "Zoom to me" button on the Upcoming page. Please check it out if it works.
Limitations:
Works ok for me, but I would change two things:
a) make it zoom in 1 or 2 levels deeper. At the current zoom level, I still see everything from Cardiff to Vienna.
b) automatically remove the country selection, because for people near borders (i.e., everyone in continental Europe) stopping at borders kinda defeats the purpose :) (Also, the Zoom button and the "no country" selection are very far apart)
Agree with @gereons as I have to manually select the countries close to me, which is Poland & Czechia.
@gereons: thx for the feedback. "A" is a bug, "B" will be implemented later with the improved filtering feature (the browser will download all tournaments once and do the filtering in the frontend, currently filtering is done by the backend)
Instead of (optionally) restricting the view for upcoming tournaments to a user's country, it would be great to have the option to say e.g. "show me everything in a 200km radius".
Use case: I'm in Cologne, fairly close to the Netherlands and Belgium, so tournaments in Eindhoven and Liége are much closer and attractive to me than those in Berlin or Munich.