Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Copy shareable link #896

Open
sancarn opened this issue Jun 21, 2024 · 1 comment
Open

Copy shareable link #896

sancarn opened this issue Jun 21, 2024 · 1 comment

Comments

@sancarn
Copy link

sancarn commented Jun 21, 2024

With small geojson layers the data can be included in the url as some base64-encoded string:

geojson.io/data=eyJ0eXBlIjoiRmVhdHVyZUNvbGxlY3Rpb24iLCJmZWF0dXJlcyI6W3sidHlwZSI6IkZlYXR1cmUiLCJwcm9wZXJ0aWVzIjp7fSwiZ2VvbWV0cnkiOnsiY29vcmRpbmF0ZXMiOlstMS4yODM3NTY2ODY1MzQxODk4LDUyLjI4Mzc5NDU1OTAwMDU3XSwidHlwZSI6IlBvaW50In19LHsidHlwZSI6IkZlYXR1cmUiLCJwcm9wZXJ0aWVzIjp7fSwiZ2VvbWV0cnkiOnsiY29vcmRpbmF0ZXMiOlstMS4yNjgzNDA3ODE5NDA2NTExLDUyLjI5NDU4MTM4NTg0OTYyNV0sInR5cGUiOiJQb2ludCJ9fSx7InR5cGUiOiJGZWF0dXJlIiwicHJvcGVydGllcyI6e30sImdlb21ldHJ5Ijp7ImNvb3JkaW5hdGVzIjpbWy0xLjI1NDIwOTUzNzMzNzk5OTMsNTIuMjk0MzY3MTAyOTk0Mzg2XSxbLTEuMjU5ODc3NDQ3ODc4Mjk1Nyw1Mi4yODMzODU2Mjc3NTE1XSxbLTEuMjgwNTQ4Nzc0NDkwMzcsNTIuMjgxMzEzNjY1NzI4MzM0XSxbLTEuMjc5NzY3NzYwMzgzOTQ3NSw1Mi4yNzMzNDc1NDMxOTI2N11dLCJ0eXBlIjoiTGluZVN0cmluZyJ9fV19

Alternatively could use jsonurl:

geojson.io/data=(type:FeatureCollection,features:((type:Feature,properties:(),geometry:(coordinates:(-1.2837566865341898,52.28379455900057),type:Point)),(type:Feature,properties:(),geometry:(coordinates:(-1.2683407819406511,52.294581385849625),type:Point)),(type:Feature,properties:(),geometry:(coordinates:((-1.2542095373379993,52.294367102994386),(-1.2598774478782957,52.2833856277515),(-1.28054877449037,52.281313665728334),(-1.2797677603839475,52.27334754319267)),type:LineString))))

Or perhaps better still would be encoding as Proto Buffers as these will be significantly smaller urls

@sancarn
Copy link
Author

sancarn commented Jun 21, 2024

Oops, I've just spotted this is already half implemented in the API section. Just a clickable "share" button would need adding to the UI

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant