Warn if we fail to contact JOSM

This commit is contained in:
Tom Hughes 2010-11-15 09:34:09 +00:00
parent 04a6c41be9
commit b26adef905
2 changed files with 7 additions and 0 deletions

View file

@ -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;
}