Preferences

From OpenStreetMap Wiki
Jump to navigation Jump to search

Every OpenStreetMap user profile includes preferences. They are stored like tags, meaning that every preference has a key and a value (of at most 255 characters). This functionality is documented at API v0.6#Preferences of the logged-in user.

[You can inspect your preferences directly via the API] (this will request your password)

Client applications can access the preferences via OAuth if "read their user preferences" or "modify their user preferences" were granted. It is not possible to read preferences of another user.

Known applications using preferences

Osm.org

The diary-part of the website uses diary.default_language to indicate the default language.

gps.trace.visibility indicates which privacy setting was used to upload the last GPX-trace onto OSM, it can be one of public, private, trackable and identifiable

overpass-turbo.eu

A logged-in user can save their queries into overpass. These will be saved as overpass-ide_query_[i]_[j], where [i] is the index of the saved query, and [j] describes the part. Concatenating all the parts of a query will yield query.

The total number of queries is saved with overpass-ide_query-count

MapComplete

MapComplete is a heavy user of the user preferences: it saves the selected language, the default license for pictures, which hidden themes have been visited before, which changeset it has last opened for a given theme and the theme location or full definition for visited unofficial themes.

The keys of these preferences are prefixed with mapcomplete-.

Furthermore, MapComplete will create a private key for use with Mangrove.reviews. This key can be retrieved by concatenating all keys of the following format: mangroveidentity-combined-[0-9]*. mangroveidentity-combined-length indicates how much parts the preference has.

History

There was a long-standing wish among developers (https://github.com/openstreetmap/trac-tickets/issues/149) for users to be able to set preferences, so that (for example) you could have your own favourite tag presets no matter which editor or computer you were using.

It was added in 2008.