Bookmarklet to load the current section of a slippy map into JOSM

In the meantime there are quite a lot of nice OSM based Slippy-Maps all around the Web. Usually they are based on Openlayers.

Now it happens from time to time, that I find something on one of this maps which needs to be corrected in the Openstreetmap database.

Unfortunately it is not very straight forward to load exactly the corresponding bounding box of the map into josm.

This has been solved in a very convenient way as far as the OSM Inpector is concerned. All you need to do there is to press the “load in josm” button on the Website.

Wouldn’t it be nice to have this feature in any Slippy Map?

Well, here we go:

Based on Jochens code I have been able to code a Bookmarklet which does exactly this!

All you need to do is to add this URL to your Bookmarks.

Now, if you call the bookmark while browsing a Slippy-map an running josm with the remote plugin enabled, then josm is instructed to download all the OSM-data for the section displayed in the slippy-map.

Update: This is confirmed to work with IE6-8 and Firefox. This does not work with Opera, because they have a security code in place which is blocking access to localhost from within scripts (see discussion on Opera forum).

4 Gedanken zu „Bookmarklet to load the current section of a slippy map into JOSM“

    1. I’m not shure if it is possible to use bookmarklets with opera at all. I just tested with IE6 which works like a charm. Could not test with IE7/8 because these do not work with Linux/wine AFAIK.

Kommentare sind geschlossen.