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

Feature request: configure map by URL param #90

Open
tomviner opened this issue May 17, 2020 · 3 comments
Open

Feature request: configure map by URL param #90

tomviner opened this issue May 17, 2020 · 3 comments

Comments

@tomviner
Copy link

Is your feature request related to a problem? Please describe.
My friends and I like to do the daily challenges together. I'd like to share a URL to a map showing today's herbs/birds/fish we need to find.

Describe the solution you'd like
I don't think there's a machine readable online listing of the daily challenges, so I would configure the map myself, then click a new copy settings as url button, which like the search feature on RDR2CollectorsMap would give me a URL with, in this case, something like ?settings=X appended. We'd need to come up with a URL safe format, whether it's standard URL encoding on its own or base64 etc.

Obviously this also implies code to then read that query param upon page load. But this should be able to share code with the current settings import/export.

Describe alternatives you've considered
One alternative would be to copy the search feature directly from RDR2CollectorsMap, as that already enables this "share by URL" workflow. Although in that case the control would just be by text matching, rather than control of all settings.

Additional context
I'm a developer myself, so I'd be happy to get involved in the implementation if that's helpful, after we can agree the feature.

@MichalD96
Copy link
Collaborator

I have some ideas about it, but link will be very long, we need to find the way how to shorten it.
If you have any ideas we are open for your suggestions or pull requests.
For now the best way to share the settings is export settings to .json file

@rjvbeek
Copy link

rjvbeek commented Feb 24, 2021

Coming back to this because I'm interested in something similar. Would you need to export all settings or only a selection of animals/plants(/missions/whatever)? If you could limit it to that, you could simplify by only implementing category/ID pairs (perhaps comma separated) so you'd get something like ?animal=34&plant=12,14&birds=4.

@tomviner
Copy link
Author

So one way to get round the url size limit is to offload the storage to an external location. I used this technique for the RDR2Collectors map. For my use case, I wrote a webapp to convert a spreadsheet of collection items into a valid settings file, then added a settingsUrl query param and had the map fetch and import the settings.

For this issue though, users won't want the spreadsheet/webapp bit. Hence the storage in url request. Certainly limiting the export selection to a subset helps with url size. Converting to base62 or base64 would also really help to minimise the size. As would your category/ID pairs encoding suggestion.

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

No branches or pull requests

3 participants