Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement JOSM/SSL connector #985

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions osmtm/static/js/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ osmtm.project = (function() {
L.control.scale().addTo(lmap);
// create the tile layer with correct attribution
var osmUrl='//tile-{s}.openstreetmap.fr/hot/{z}/{x}/{y}.png';

var osmAttrib=osmAttribI18n;
var osm = new L.TileLayer(osmUrl, {attribution: osmAttrib});
lmap.addLayer(osm);
Expand Down Expand Up @@ -454,6 +455,37 @@ osmtm.project = (function() {
}
});
break;
case "josmssl":
if (typeof licenseAgreementUrl != 'undefined') {
alert(requiresLicenseAgreementMsg);
window.location = licenseAgreementUrl;
break;
}
url = getLink({
base: 'https://127.0.0.1:8112/load_and_zoom?',
bounds: task_bounds,
protocol: 'lbrt'
});
$.ajax({
url: url,
complete: function(t) {
if (t.status != 200) {
alert(josmRcDidNotRespondI18n);
} else {
if (typeof imagery_url != "undefined" && imagery_url !== '') {
$.ajax({
url: 'https://127.0.0.1:8112/imagery',
data: {
title: "Tasking Manager - #" + project_id,
type: imagery_url.toLowerCase().substring(0,3),
url: imagery_url
}
});
}
}
}
});
break;
case "potlatch2":
url = getLink({
base: 'http://www.openstreetmap.org/edit?editor=potlatch2&',
Expand Down
1 change: 1 addition & 0 deletions osmtm/templates/task.editors.mako
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
</button>
<ul id="editDropdown" class="dropdown-menu text-left">
<li id="josm"><a role="menuitem">JOSM</a></li>
<li id="josmssl"><a role="menuitem">JOSM-SSL</a></li>
<li id="iDeditor"><a role="menuitem">iD editor</a></li>
<li id="potlatch2"><a role="menuitem">Potlatch 2</a></li>
<li id="wp"><a role="menuitem">Walking Papers</a></li>
Expand Down