uMap/Tips

From OpenStreetMap Wiki
Jump to navigation Jump to search
StreetComplete quest star.svg

Add a media (video/sound) in a popup

Use an iframe to add a media in your popup. See iframe syntax here: uMap/Guide/Text formatting

Examples:

Add a link "Edit with JOSM" in a popup

Link to edit area on JOSM and focus on current osm object by his id

This solution is great. JOSM will zoom on the osm object and load all objects displayed on current view. Add the following code in your popup:

**Edit:** [[http://127.0.0.1:8111/load_and_zoom?left={west}&right={east}&top={north}&bottom={south}&select={id}|JOSM]]

Link to edit an OSM object by id

This will only load the osm object in JOSM. Add the following code in your popup:

**Edit:** [[http://127.0.0.1:8111/load_object?new_layer=true&objects={id}|JOSM]]

Link to edit the current view

This will load displayed area in JOSM. Add the following code in your popup:

**Edit:** [[http://127.0.0.1:8111/load_and_zoom?left={west}&right={east}&top={north}&bottom={south}|JOSM]]

Add a link "Edit with iD" in a popup

Link to edit area the current view

This will load displayed area in iD. Add the following code in your popup:

**Edit:** [[https://www.openstreetmap.org/edit#map={zoom}/{lat}/{lon}|iD]]

Note that you can force the zoom like so (zoom=12 in following example):

**Edit:** [[https://www.openstreetmap.org/edit#map=22/{lat}/{lon}|iD]]

Link to edit an OSM object by id

Not possible yet.

Use dynamic bbox with Remote Data

Note that the dynamic bounds need to have their curly braces *NOT* urlencoded.