Opened 12 years ago

Closed 12 years ago

#1362 closed enhancement (fixed)

Store preferences in API

Reported by: Colin Marquardt Owned by: Chris Browet
Priority: major Milestone:
Component: merkaartor Version:
Keywords: Cc:


The API allows storing user preferences to be used by editors:

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.

Change History (8)

comment:1 Changed 12 years ago by Chris Browet

Status: newassigned

Nice suggestion.

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

comment:2 in reply to:  1 Changed 12 years ago by Colin Marquardt

Replying to 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?

comment:3 Changed 12 years ago by Colin Marquardt

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 :)

comment:4 Changed 12 years ago by Chris Browet

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.

comment:5 Changed 12 years ago by Colin Marquardt

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:1:name=BE - Brussels

comment:6 Changed 12 years ago by Chris Browet

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;...

comment:7 Changed 12 years ago by Colin Marquardt

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 :).

comment:8 Changed 12 years ago by Chris Browet

Resolution: fixed
Status: assignedclosed

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

Note: See TracTickets for help on using tickets.