rastapasta / mapscii

🗺 MapSCII is a Braille & ASCII world map renderer for your console - enter => telnet mapscii.me <= on Mac (brew install telnet) and Linux, connect with PuTTY on Windows
MIT License
7.75k stars 251 forks source link

Go to a specific coordinate. #105

Open array-in-a-matrix opened 3 years ago

array-in-a-matrix commented 3 years ago

It would be cool to press " / " then paste or type a coordinate and have the map automatically locate and render that area.

pedroelbanquero commented 3 years ago

any way to start the map in a cordenates from command line ?

piemadd commented 2 years ago

@pedroelbanquero if you look into the main.js file you can see any command line arguments you can use

Lucas-C commented 2 years ago

I think your initial idea @array-in-a-matrix would require some form of interactive prompt, which is non trivial to implement...

In the same spirit, I'd love to be able to telnet u4pruydqqvj.mapscii.me where u4pruydqqvj is a GeoHash for coordinates 57.64911,10.40744, and MapSCII would point to that location.

There are a few npm packages providing GeoHash conversion logic: https://www.npmjs.com/search?q=keywords:geohash

Technically, this would also require some wildcard DNS configuration, and to forward/retrieve the actual hostname specified in the TCP request...

What do you think about this idea @rastapasta ? (and should I open a separate issue maybe ?)

piemadd commented 2 years ago

Also about those command line arguments, one thing that I've noticed is that they don't even seem to work half of the time.

rastapasta commented 2 years ago

Ahoi, sorry for being so late to the discussion 😊 MapSCII is back on my schedule right now!

Next to an interactive interface, the idea of passing parameters via a subdomain is pretty lovely!

Only blocking issue I see here: the telnet protocol doesn't consider the transfer of a given host name (compared to the HTTP protocol's Host header field) 😢 This might be compensated in a (already half-implemented) ssh-server, but unlikely to be achieved in an telnet based approach.

Still: the easy way of (pre)selecting a location/feeding a geojson is top priority atm

Lucas-C commented 2 years ago

Thank you for your answer @rastapasta! Well spotted for the telnet protocol limitation... 😞 Feel free to ping me once the ssh-server is implemented, I'd like to help building the subdomain feature 😊