function openIn(editor) {
    if (map.getZoom() < 14){
        msg(config.strings.msgZoomInForEdit, 3);
        return false;
    };
    var bounds = map.getBounds();
    var sw = bounds.getSouthWest();
    var ne = bounds.getNorthEast();
	if (editor == 'j') { // JOSM
		var JOSMurl = "http://127.0.0.1:8111/load_and_zoom?left=" + sw.lng + "&right=" + ne.lng + "&top=" + ne.lat + "&bottom=" + sw.lat + "&new_layer=0&select=node" + currentWayId + ",way" + currentWayId;
		// Use the .ajax JQ method to load the JOSM link unobtrusively and alert when the JOSM plugin is not running.
		$.ajax({
			url: JOSMurl,
			complete: function(t) {
				if (t.status!=200) {
					msg("JOSM remote control did not respond ("+t.status+"). Do you have JOSM running?", 2);
				} else {
					setTimeout("confirmRemap('j')", 4000);
				}
			}
		});
	} else if (editor == 'p') { // potlatch
		var PotlatchURL = 'http://www.openstreetmap.org/edit?editor=potlatch2&bbox=' + map.getBounds().toBBoxString();
		window.open(PotlatchURL);
		setTimeout("confirmRemap('p')", 4000)
	}
}
// Opens the current highlighted OSM objects in JOSM or Potlatch.
Opens the current highlighted OSM objects in JOSM or Potlatch.
Opens the current highlighted OSM objects in JOSM or Potlatch .
function openIn(editor) {
    if (map.getZoom() < 14){
        msg(config.strings.msgZoomInForEdit, 3);
        return false;
    };
    var bounds = map.getBounds();
    var sw = bounds.getSouthWest();
    var ne = bounds.getNorthEast();
	if (editor == 'j') { 
		var JOSMurl = "http://127.0.0.1:8111/load_and_zoom?left=" + sw.lng + "&right=" + ne.lng + "&top=" + ne.lat + "&bottom=" + sw.lat + "&new_layer=0&select=node" + currentWayId + ",way" + currentWayId;
		$.ajax({
			url: JOSMurl,
			complete: function(t) {
				if (t.status!=200) {
					msg("JOSM remote control did not respond ("+t.status+"). Do you have JOSM running?", 2);
				} else {
					setTimeout("confirmRemap('j')", 4000);
				}
			}
		});
	} else if (editor == 'p') { 
		var PotlatchURL = 'http://www.openstreetmap.org/edit?editor=potlatch2&bbox=' + map.getBounds().toBBoxString();
		window.open(PotlatchURL);
		setTimeout("confirmRemap('p')", 4000)
	}
}
function openIn ( editor ) { if ( map . getZoom ( ) < 14 ) { msg ( config . strings . msgZoomInForEdit , 3 ) ; return false ; } ; var bounds = map . getBounds ( ) ; var sw = bounds . getSouthWest ( ) ; var ne = bounds . getNorthEast ( ) ; if ( editor == 'j' ) { var JOSMurl = "http://127.0.0.1:8111/load_and_zoom?left=" + sw . lng + "&right=" + ne . lng + "&top=" + ne . lat + "&bottom=" + sw . lat + "&new_layer=0&select=node" + currentWayId + ",way" + currentWayId ; $ . ajax ( { url : JOSMurl , complete : function ( t ) { if ( t . status != 200 ) { msg ( "JOSM remote control did not respond (" + t . status + "). Do you have JOSM running?" , 2 ) ; } else { setTimeout ( "confirmRemap('j')" , 4000 ) ; } } } ) ; } else if ( editor == 'p' ) { var PotlatchURL = 'http://www.openstreetmap.org/edit?editor=potlatch2&bbox=' + map . getBounds ( ) . toBBoxString ( ) ; window . open ( PotlatchURL ) ; setTimeout ( "confirmRemap('p')" , 4000 ) } }
Opens the current highlighted OSM objects in JOSM or Potlatch.
Opens the current highlighted OSM objects in JOSM or Potlatch .
// JOSM // Use the .ajax JQ method to load the JOSM link unobtrusively and alert when the JOSM plugin is not running. // potlatch