From 7c3999096c961302f0b2e6102003f31f8ccca2a4 Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Sun, 17 Jun 2018 16:03:29 -0400 Subject: [PATCH] Automatic background setting --- plugins/osm-quickedit/public/main.js | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/plugins/osm-quickedit/public/main.js b/plugins/osm-quickedit/public/main.js index c4783ab2..98a82973 100644 --- a/plugins/osm-quickedit/public/main.js +++ b/plugins/osm-quickedit/public/main.js @@ -16,15 +16,8 @@ PluginsAPI.Map.addActionButton(function(options){ var mapLocation = options.map.getZoom() + "/" + options.map.getCenter().lat + "/" + options.map.getCenter().lng; - - if (window.prompt("To start digitizing this map on OpenStreetMap:\n\n" + - "1. Copy the URL below.\n" + - "2. When the editor loads, open the Background Settings (press B) and select \"Custom\".\n" + - "3. Press \"Edit Custom Background\".\n" + - "4. Paste the URL you copied below.\n\n" + - "Press OK to go to OpenStreetMap", url)){ - window.location.href = "https://www.openstreetmap.org/edit?editor=id#map=" + mapLocation; - } + window.location.href = "https://www.openstreetmap.org/edit?editor=id#map=" + mapLocation + + "&background=custom:" + url; } }, React.createElement("i", {className: "fa fa-map"}, ""), " OSM Digitize");