Skip to content

Commit b5e2ea8

Browse files
answerquesttyrasd
andauthored
update params structure for OSM hosted iD (openstreetmap#9095)
* update params structure for OSM iD update params structure for the iD editor hosted at openstreetmap.org/edit : have to keep the params after a # instead of ? * working osm editor with-gpx-hash-param link * update list of query/hash params on osm.org Some hash parameters are not supported on osm.org, while there are some query parameters which work slightly differently when used on osm.org See https://github.com/openstreetmap/openstreetmap-website/blob/66656e1d1d58e6073efd453007d7452920531b37/app/assets/javascripts/edit/id.js.erb This should accurately the currently state of the iD integration in the openstreetmap-website (aka as the rails port). Co-authored-by: Martin Raifer <[email protected]>
1 parent 977d680 commit b5e2ea8

File tree

1 file changed

+36
-20
lines changed

1 file changed

+36
-20
lines changed

API.md

+36-20
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ of iD (e.g. `https://ideditor-release.netlify.app`), the following parameters ar
2323
`boundaries`, `water`, `rail`, `pistes`, `aerialways`, `power`, `past_future`, `others`
2424
* __`gpx`__ - A custom URL for loading a gpx track. Specifying a `gpx` parameter will
2525
automatically enable the gpx layer for display.<br/>
26-
_Example:_ `gpx=https://tasks.hotosm.org/project/592/task/16.gpx`
26+
_Example:_ `gpx=https://gist.githubusercontent.com/answerquest/9445352b60ca5b44714675eae00f243a/raw/56a6343a29223318f4a697bfd16cbb2c3b8155ad/sample_boundary.gpx`
2727
* __`hashtags`__ - Prefills the changeset hashtags. Pass a url encoded list of event
2828
hashtags separated by commas, semicolons, or spaces. Leading '#' symbols are
2929
optional and will be added automatically. (Note that hashtag-like strings are
@@ -65,25 +65,41 @@ of iD (e.g. `https://ideditor-release.netlify.app`), the following parameters ar
6565

6666
##### iD on openstreetmap.org (Rails Port)
6767

68-
When constructing a URL to an instance of iD embedded in the OpenStreetMap Rails
69-
Port (e.g. `http://www.openstreetmap.org/edit?editor=id`), the following parameters
70-
are available as **regular URL query parameters**:
71-
72-
* __`map`__ - same as standalone
73-
* __`lat`__, __`lon`__, __`zoom`__ - Self-explanatory.
74-
* __`node`__, __`way`__, __`relation`__ - Select the specified entity.
75-
* __`background`__ - same as standalone
76-
* __`disable_features`__ - same as standalone
77-
* __`gpx`__ - same as standalone
78-
* __`maprules`__ - same as standalone
79-
* __`offset`__ - same as standalone
80-
* __`presets`__ - same as standalone
81-
* __`comment`__ - same as standalone
82-
* __`source`__ - same as standalone
83-
* __`hashtags`__ - same as standalone
84-
* __`locale`__ - same as standalone, but the default locale is set by the language settings in your OSM user account.
85-
* __`walkthrough`__ - same as standalone
86-
68+
When constructing a URL to an instance of iD embedded on the [OpenStreetMap website](github.com/openstreetmap/openstreetmap-website/) (e.g. `https://www.openstreetmap.org/edit?editor=id`), the following parameters
69+
are available as **URL hash parameters**.
70+
_Example:_ `https://www.openstreetmap.org/edit?editor=id#gpx=https://gist.githubusercontent.com/answerquest/9445352b60ca5b44714675eae00f243a/raw/56a6343a29223318f4a697bfd16cbb2c3b8155ad/sample_boundary.gpx`
71+
72+
* __`map`__
73+
* __`gpx`__
74+
* __`background`__
75+
* __`comment`__
76+
* __`disable_features`__
77+
* __`hashtags`__
78+
* __`locale`__
79+
* __`maprules`__
80+
* __`offset`__
81+
* __`photo`__
82+
* __`photo_dates`__
83+
* __`photo_overlay`__
84+
* __`photo_username`__
85+
* __`presets`__
86+
* __`source`__
87+
* __`validationDisable`__
88+
* __`validationWarning`__
89+
* __`validationError`__
90+
91+
For a description of these parameters, refer to the [_iD standalone_ section](#id-standalone) above.
92+
93+
In addition, the following parameters are available as **URL query parameters**:
94+
95+
* __`lat`__, __`lon`__, __`zoom`__<br/>
96+
_Example:_ `https://www.openstreetmap.org/edit?editor=id&lat=46.4705&lon=11.2423&zoom=16`<br/>
97+
* __`node`__, __`way`__, __`relation`__ - Selects the specified OSM object (similar to the `id` parameter of the standalone version of iD).<br/>
98+
_Example:_ `https://www.openstreetmap.org/edit?editor=id&node=1`<br/>
99+
* __`locale`__ - Same as standalone, but the default locale is set by the language settings in your OSM user account.<br/>
100+
_Example:_ `https://www.openstreetmap.org/edit?editor=id&locale=de`<br/>
101+
* __`gpx`__ - Expects a trace ID of a [public gps trace](https://www.openstreetmap.org/traces) uploaded on OpenStreetMap.<br/>
102+
_Example:_ `https://www.openstreetmap.org/edit?editor=id&gpx=4009513`<br/>
87103

88104
## CSS selectors
89105

0 commit comments

Comments
 (0)