Warn if we fail to contact JOSM
This commit is contained in:
parent
04a6c41be9
commit
b26adef905
2 changed files with 7 additions and 0 deletions
|
@ -272,9 +272,15 @@ end
|
|||
|
||||
function josmEditHandler() {
|
||||
var extent = getMapExtent();
|
||||
var loaded = false;
|
||||
|
||||
$("linkloader").onload = function () { loaded = true; };
|
||||
$("linkloader").src = "http://127.0.0.1:8111/load_and_zoom?left=" + extent.left + "&top=" + extent.top + "&right=" + extent.right + "&bottom=" + extent.bottom;
|
||||
|
||||
setTimeout(function () {
|
||||
if (!loaded) alert("<%= t('site.index.josm_failed') %>");
|
||||
}, 1000);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue