Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Store preferences in API #1362

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 8 comments
Closed

Store preferences in API #1362

openstreetmap-trac opened this issue Jul 23, 2021 · 8 comments

Comments

@openstreetmap-trac
Copy link

Reporter: ColinMarquardt
[Submitted to the original trac issue database at 3.43pm, Saturday, 22nd November 2008]

The API allows storing user preferences to be used by editors: http://wiki.openstreetmap.org/wiki/OSM_Protocol_Version_0.5#Preferences

It would be nice if my bookmarks, selected style etc. would be the same for whatever computer I use Merkaartor from.

It might make sense to differentiate some settings based on the device I'm running though, since I might not want to get the same style on my PDA as I do on the PC for example - but certainly the bookmarks.

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 10.15am, Monday, 24th November 2008]

Nice suggestion.

Do you think the loading of the prefs from OSM should be automatic or manual?

@openstreetmap-trac
Copy link
Author

Author: ColinMarquardt
[Added to the original trac issue at 7.37pm, Monday, 24th November 2008]

Replying to [comment:1 koying]:

Do you think the loading of the prefs from OSM should be automatic or manual?

Hmm. I suppose Merkaartor should ask if it should merge settings that are different when an API-prefs-enabled Merkaartor is first run on that installation, but later on... I guess I would just make it automatic.

Maybe first start with storing bookmarks on the API and see how it works out for a while, then follow with other settings?

@openstreetmap-trac
Copy link
Author

Author: ColinMarquardt
[Added to the original trac issue at 8.16pm, Tuesday, 25th November 2008]

While reading the mailing list thread about this issue (thanks for engaging there), I thought that maybe some specific setting keys (like the bookmarks) should not be in a Merkaartor "namespace", but in a generic one. When I'm switching editors, I'm likely to be interested in the same bookmarks. (Whether that other editor actually gets the capability to read those from the API is another matter :)

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 8.32pm, Tuesday, 25th November 2008]

Reading from the preferences is one thing, having a common format for bookmarks is another! ;-)

I'm definitely done spending time trying to agree anything with the JOSM guys, but if anyone succeeds, I'd be very happy to implement it.

@openstreetmap-trac
Copy link
Author

Author: ColinMarquardt
[Added to the original trac issue at 7.47am, Wednesday, 26th November 2008]

I don't think it's strictly necessary to agree anything yet, let us simply take the lead with a format instead. Just don't make it unnecessarily hard for other editors by hiding behind a key that has "merkaartor" in its name.

Something simple like

loc:0:name=GB - London
loc:0:bllon=51.488459848353145
loc:0:bllat=-0.12913583060590134
loc:0:trlon=51.5303607711691
loc:0:trlat=-0.0795339390988775
loc:1:name=BE - Brussels
...

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 9.17am, Wednesday, 26th November 2008]

That would be fine.

Unfortunately, if you followed the thread, values are limited to 255 chars, so we can't put every bookmarks in a single value.

The only way I see now is something like:

k=loc0 v=GB - London;51.4884;-0.1291;51.5303;-0.07953
k=loc1 v=BE - Brussels;...

@openstreetmap-trac
Copy link
Author

Author: ColinMarquardt
[Added to the original trac issue at 3.05pm, Wednesday, 26th November 2008]

Yes, I read that, and it sounds as if the restriction of 150 settings might go away, and in that case, just use many key/value pairs? That's the way my example was intended:

k=loc:0:name v=GB - London
k=loc:0:bllon v=51.488459848353145
k=loc:0:bllat v=-0.12913583060590134
k=loc:0:trlon v=51.5303607711691
k=loc:0:trlat v=-0.0795339390988775
k=loc:1:name v=BE - Brussels

If parsing the semicolons is no problem either, it's also fine with me (being just an interested user :).

@openstreetmap-trac
Copy link
Author

Author: koying
[Added to the original trac issue at 10.17am, Monday, 1st December 2008]

(In [12158]) * ADD : Automatically save/restore bookmarks, TMS servers & WMS servers to OSM user preferences (closes #1362)

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

No branches or pull requests

1 participant