Skip to content

Commit

Permalink
Merge pull request osmlab#18 from fansanelli/https
Browse files Browse the repository at this point in the history
Go HTTPS
  • Loading branch information
fansanelli authored Mar 31, 2020
2 parents 7f6d0d0 + 6a69ae6 commit 1700c03
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 17 deletions.
18 changes: 9 additions & 9 deletions active.html
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<html lang="it">
<title>Active OnOSM Notes</title>
<link rel="stylesheet" href="http://necolas.github.io/normalize.css/2.1.3/normalize.css" />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js"></script>
<link rel="stylesheet" href="https://necolas.github.io/normalize.css/2.1.3/normalize.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@0.7.0/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@0.7.0/dist/leaflet.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<link rel="stylesheet" href="css/Leaflet.EditInOSM.css" />
Expand All @@ -15,7 +15,7 @@
//https://code.google.com/p/microajax/
function microAjax(B,A){this.bindFunction=function(E,D){return function(){return E.apply(D,[D])}};this.stateChange=function(D){if(this.request.readyState==4){this.callbackFunction(this.request.responseText)}};this.getRequest=function(){if(window.ActiveXObject){return new ActiveXObject("Microsoft.XMLHTTP")}else{if(window.XMLHttpRequest){return new XMLHttpRequest()}}return false};this.postBody=(arguments[2]||"");this.callbackFunction=A;this.url=B;this.request=this.getRequest();if(this.request){var C=this.request;C.onreadystatechange=this.bindFunction(this.stateChange,this);if(this.postBody!==""){C.open("POST",B,true);C.setRequestHeader("X-Requested-With","XMLHttpRequest"); C.setRequestHeader("Content-type","application/x-www-form-urlencoded");C.setRequestHeader("Connection","close")}else{C.open("GET",B,true)}C.send(this.postBody)}};
</script>
<link href='http://fonts.googleapis.com/css?family=Ledger&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<link href='https://fonts.googleapis.com/css?family=Ledger&subset=latin,latin-ext' rel='stylesheet' type='text/css'>
<style>
body{
font-family:Ledger,serif;
Expand Down Expand Up @@ -59,9 +59,9 @@
var lat=41.992,
lon=12.393,
zoom=5;
var osm = new L.TileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {maxZoom: 19, attribution: 'Map Data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'});
var cyclemap = new L.TileLayer('http://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png', {maxZoom: 18, attribution: 'Map Data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'});
var mapquest = new L.TileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {subdomains: '1234', maxZoom: 18, attribution: 'Map Data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'});
var osm = new L.TileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {maxZoom: 19, attribution: 'Map Data &copy; <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'});
var cyclemap = new L.TileLayer('https://{s}.tile.opencyclemap.org/cycle/{z}/{x}/{y}.png', {maxZoom: 18, attribution: 'Map Data &copy; <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'});
var mapquest = new L.TileLayer('https://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {subdomains: '1234', maxZoom: 18, attribution: 'Map Data &copy; <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'});

var map = new L.Map('mapdiv', {
editInOSMControl: true,
Expand Down Expand Up @@ -89,7 +89,7 @@
var geojson = L.geoJson(url,{
onEachFeature:function onEachFeature(feature, layer) {
if (feature.properties && feature.properties.id) {
var url="http://www.openstreetmap.org/note/"+feature.properties.id;
var url="https://www.openstreetmap.org/note/"+feature.properties.id;
layer.bindPopup("URL: <a href='"+url+"'>"+url+"</a><br/>Data: "+feature.properties.date_created);
}
},
Expand All @@ -102,7 +102,7 @@
map.addLayer(geojson);
}

var httpurl="http://api.openstreetmap.org/api/0.6/notes/search.json?q=su.openstreetmap.it&closed=0&limit=100";
var httpurl="https://api.openstreetmap.org/api/0.6/notes/search.json?q=su.openstreetmap.it&closed=0&limit=100";
microAjax(httpurl,function (res) {
var feat=JSON.parse(res);
loadLayer(feat);
Expand Down
6 changes: 3 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<link rel='stylesheet' type='text/css' href='css/style.css' />
<link rel='stylesheet' type='text/css' href='css/site.css' />
<link rel='stylesheet' type='text/css' href='css/select2.css' />
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.css" />
<link rel="stylesheet" href="https://unpkg.com/leaflet@0.7.1/dist/leaflet.css" />
<link rel="stylesheet" href="css/L.Control.Locate.css" />
<link rel="stylesheet" href="css/qtip.css" />

Expand All @@ -16,7 +16,7 @@
<link rel="stylesheet" href="css/L.Control.Locate.ie.css"/>
<![endif]-->

<script src="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.js"></script>
<script src="https://unpkg.com/leaflet@0.7.1/dist/leaflet.js"></script>
<script src="js/L.Control.Locate.js" ></script>
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="//code.jquery.com/jquery-migrate-1.2.1.min.js"></script>
Expand All @@ -27,7 +27,7 @@
</head>
<body>
<div class='container pad2 margin2 col8'>
<div style="float:right"><a href="http://su.openstreetmap.it/?setLng=it-IT">Italiano</a>&nbsp;&nbsp;<a href="http://su.openstreetmap.it/?setLng=en-GB">English</a></div>
<div style="float:right"><a href="https://su.openstreetmap.it/?setLng=it-IT">Italiano</a>&nbsp;&nbsp;<a href="https://su.openstreetmap.it/?setLng=en-GB">English</a></div>
<div class='pad2'>
<img src='img/osm.png' class='fl mr' alt='OpenStreetMap' />
<h2 data-i18n="app.title"></h2>
Expand Down
2 changes: 1 addition & 1 deletion js/Leaflet.EditInOSM.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

_Editors = {
Id: function (config) {
var url = 'http://www.openstreetmap.org/edit?editor=id#map=',
var url = 'https://www.openstreetmap.org/edit?editor=id#map=',
displayName = "iD",
buildUrl = function (map) {
return this.url + [
Expand Down
8 changes: 4 additions & 4 deletions js/site.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ i18n.init({ fallbackLng: onOSMlang, postAsync: 'false' }, function() {
/* HERE BE DRAGONS */
var findme_map = L.map('findme-map')
.setView([41.69, 12.71], 5),
osmUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osmUrl = 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',
osm = L.tileLayer(osmUrl, {minZoom: 2, maxZoom: 18, attribution: "Data © OpenStreetMap contributors"}).addTo(findme_map);

var category_data = [];
Expand Down Expand Up @@ -97,7 +97,7 @@ $("#find").submit(function(e) {
format: 'json',
q: address_to_find
};
var url_nominatim = "http://nominatim.openstreetmap.org/search?" + $.param(qwarg_nominatim);
var url_nominatim = "https://nominatim.openstreetmap.org/search?" + $.param(qwarg_nominatim);


$("#findme h4").text(loadingText);
Expand Down Expand Up @@ -201,10 +201,10 @@ $("#collect-data-done").click(function() {
text: note_body
};

$.post('http://api.openstreetmap.org/api/0.6/notes.json', qwarg, function( data ) {
$.post('https://api.openstreetmap.org/api/0.6/notes.json', qwarg, function( data ) {
console.log( data );
var noteId=data['properties']['id'];
var link='http://www.openstreetmap.org/?note='+noteId+'#map=19/'+latlon.lat+'/'+latlon.lon+'&layers=N';
var link='https://www.openstreetmap.org/?note='+noteId+'#map=19/'+latlon.lat+'/'+latlon.lon+'&layers=N';
$("#linkcoords").append('<a href="'+link+'">'+link+'</a>');
});
});
Expand Down

0 comments on commit 1700c03

Please sign in to comment.