freemap-v3-react icon indicating copy to clipboard operation
freemap-v3-react copied to clipboard

Urls could contain coordinates encoded by geohash

Open jose1711 opened this issue 7 years ago • 5 comments

if coordinates in url are stored using geohash they could become substantially shorter. consider this: https://www.freemap.sk/?map=16/48.161649/17.165365&layers=Tt&distance-measurement-points=48.157183/17.172993,48.156675/17.166685,48.156252/17.166728,48.156209/17.165805,48.156292/17.165585,48.156077/17.164904,48.156056/17.163997,48.156295/17.163783 becoming (precision=10) https://www.freemap.sk/?map=16/u2s1yxe3vy&layers=Tt&distance-measurement-points=u2s1yy8zzt,u2s1ywskuy,u2s1yws6tb,u2s1ywef20,u2s1ywedep,u2s1ywe17r,u2s1ywd3q5,u2s1ywd6c0 that's 248 characters vs 167.

ref: https://www.movable-type.co.uk/scripts/geohash.html

jose1711 avatar Sep 30 '18 11:09 jose1711

what about geobuf: https://github.com/mapbox/geobuf ?

it's even shorter, plus more used in OSRM routing.

MichalPP avatar Sep 30 '18 16:09 MichalPP

geobuf is a binary encoding so you'd still need to transcode it to ascii therefore i don't think it would help much

jose1711 avatar Sep 30 '18 20:09 jose1711

...for all other things there's bit.ly ;-)

zdila avatar Sep 30 '18 21:09 zdila

shortening service (like the one overpass turbo has) would be nice too. the question is whether it's not too much to ask.

jose1711 avatar Oct 01 '18 19:10 jose1711

Anything can be asked. Low priority label to the rescue. Pull requests are of course welcome ;-). For now you can also use eg. https://chrome.google.com/webstore/detail/bitly-unleash-the-power-o/iabeihobmhlgpkcgjiloemdbofjbdcic?hl=en

zdila avatar Oct 01 '18 19:10 zdila