by adamlynch · 4y ago · 0 comments
I made it for my dad as a Christmas present. It also gave me an opportunity to learn about geocoding, etc.
Tech: serverless, Leaflet, Turf, Svelte, TypeScript, Cloudflare pages. I tried to use as many open / free tools as I could. I originally used map tiles from OpenStreetMap but they were discontinued so it uses Mapbox and Maptiler now.
Questions / feedback welcome. I also wrote a blog post with more information: https://adamlynch.com/back-of-your-hand. The code: https://github.com/adam-lynch/back-of-your-hand
Warning: it’s pretty difficult, unless your streets are numbered :)
As a small feedback: adjustable radius would be more fun. For example in the town were I had my childhood, this area is too big and takes other neighbourhood/cities that I don't know, but for where I live now it fits great.
Again, nice job and congratulations for making it!
This has come up so much. I'll be adding it, thanks!
Having the next 1.5 neighborhood is also valuable: if you live so close, it’s not a stretch to go learn the neighboring neighborhood (in fact, why not!?).
There maybe a level of “insult” (you don’t really know your ‘hood outside of the 5 streets), but used positively, I think the game is great.
I can do something with the pin too. Probably not possible to snap though, no.
Thanks!
Perhaps the ability to choose the sample area could be based on the zoom level and hidden under a settings cog?
Cool concept though. This would be a nice game at many geographic magnitudes.
Edge too, is the service just down?
My hosting provider (Cloudflare Pages) seem to have a limit on "functions" I cannot increase. I've worked around it for now but it might open at Cork for everyone. If so, you can zoom out and tap the map to select somewhere else.
What do you mean by functions? I would just request location with javascript and use Google geolocation as a fallback.
These functions receive geolocation information via a function argument. So I've a function that intercepts requests to the app, grabs the geolocation information, and rewrites the URL (inserting the coordinates e.g. /lat,lng).
I go into more detail about this in the blog post but originally it just opened in Cork for everyone. I disliked the idea of having an annoying browser prompt for location permissions. I made it for my dad so having no geolocation was fine to begin with and I eventually added the geolocation I described above. Less friction, no extra client-side requests.
I also did my area twice and around 6/10 were either numbered or major roads that are very easy to ID. It might make sense to deemphasize larger or longer roads and numbered roads for a better balance of true local knowledge.
Sometimes I get stumped and I also want a picture to explain it
Along with what you mentioned about having different difficulties in terms of radius, would also be fun to be able to choose the difficulty in terms of what types of streets (main streets vs side streets - e.g. only one type, or a mix, or turning down the selection of numbered streets somehow)
only bit of feedback I have is that the street names may need some cleanup / filtering of some kind.
I picked a starting location in downtown Seattle (47.60882,-122.33087) and was told to locate "escalator"...it seems to have picked the escalator to the Pioneer Square light rail station as a "street" to be located.