-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #105 from ArcaneDots/gh-pages
Sabas merge
- Loading branch information
Showing
58 changed files
with
12,681 additions
and
553 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<!DOCTYPE html> | ||
<html lang="it"> | ||
<title>Active OnOSM Notes</title> | ||
<link rel="stylesheet" href="https://necolas.github.io/normalize.css/2.1.3/normalize.css" /> | ||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
|
||
<link rel="stylesheet" href="css/Leaflet.EditInOSM.css" /> | ||
<script src="js/Leaflet.EditInOSM.js"></script> | ||
|
||
<script src="js/leaflet-hash.js"></script> | ||
|
||
<script type="text/javascript"> | ||
//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='https://fonts.googleapis.com/css?family=Ledger&subset=latin,latin-ext' rel='stylesheet' type='text/css'> | ||
<style> | ||
body{ | ||
font-family:Ledger,serif; | ||
} | ||
#mapdiv{ | ||
position:fixed; | ||
top:0; | ||
right:0; | ||
width:75%; | ||
bottom:0; | ||
} | ||
#text{ | ||
width:25%; | ||
} | ||
|
||
@media all and (max-width:600px) | ||
{ | ||
#text{ | ||
height:25%; | ||
width:100%; | ||
overflow-y:scroll; | ||
} | ||
#mapdiv{ | ||
position:fixed; | ||
top:auto; | ||
left:0; | ||
right:0; | ||
height:75%; | ||
width:100%; | ||
bottom:0; | ||
} | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<div id="text"> | ||
|
||
</div> | ||
<div id="mapdiv"></div> | ||
<script type="text/javascript"> | ||
var lat=41.992, | ||
lon=12.393, | ||
zoom=5; | ||
var osm = new L.TileLayer('https://{s}.tile.osm.org/{z}/{x}/{y}.png', {maxZoom: 19, attribution: 'Map Data © <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 © <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 © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'}); | ||
|
||
var map = new L.Map('mapdiv', { | ||
editInOSMControl: true, | ||
editInOSMControlOptions: { | ||
position: "topright" | ||
}, | ||
center: new L.LatLng(lat, lon), | ||
zoom: zoom, | ||
layers: [osm] | ||
}); | ||
|
||
var baseMaps = { | ||
"Mapnik": osm, | ||
"OpenCycleMap": cyclemap, | ||
"Mapquest Open": mapquest | ||
}; | ||
L.control.layers(baseMaps).addTo(map); | ||
|
||
var hash = new L.Hash(map); | ||
|
||
var ico=L.icon({iconUrl:'img/Open_note_marker.png', iconSize:[25,40],iconAnchor:[12,40],popupAnchor: [0, -40] }); | ||
|
||
function loadLayer(url) | ||
{ | ||
var geojson = L.geoJson(url,{ | ||
onEachFeature:function onEachFeature(feature, layer) { | ||
if (feature.properties && 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); | ||
} | ||
}, | ||
pointToLayer: function (feature, latlng) { | ||
var marker=L.marker(latlng, {icon:ico}); | ||
return marker; | ||
} | ||
}); | ||
|
||
map.addLayer(geojson); | ||
} | ||
|
||
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); | ||
} ); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* Compatible with Leaflet 0.6 */ | ||
|
||
.leaflet-touch .leaflet-bar-part-single { | ||
-webkit-border-radius: 7px 7px 7px 7px; | ||
border-radius: 7px 7px 7px 7px; | ||
border-bottom: none; | ||
} | ||
|
||
.leaflet-control-locate a { | ||
background-image: url(locate_alt.png); | ||
background-position: -2px -2px; | ||
} | ||
|
||
.leaflet-touch .leaflet-control-locate a { | ||
background-image: url(locate_touch_alt.png); | ||
} | ||
|
||
.leaflet-control-locate.requesting a { | ||
background-image: url(spinner.gif); | ||
background-position: 50% 50%; | ||
} | ||
|
||
.leaflet-control-locate.active a { | ||
background-position: -32px -2px; | ||
} | ||
|
||
.leaflet-control-locate.active.following a { | ||
background-position: -62px -2px; | ||
} | ||
|
||
.leaflet-touch .leaflet-control-locate { | ||
box-shadow: none; | ||
border: 4px solid rgba(0,0,0,0.3); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
/* Conditional stylesheet for IE. */ | ||
.leaflet-control-locate { | ||
border: 3px solid #999; | ||
} | ||
|
||
.leaflet-control-locate a { | ||
background-color: #eee; | ||
} | ||
|
||
.leaflet-control-locate a:hover { | ||
background-color: #fff; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
.leaflet-control-edit-in-osm { | ||
background: none repeat scroll 0 0 #F8F8F9; | ||
border: 1px solid #888888; | ||
border-radius: 5px 5px 5px 5px; | ||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.4); | ||
} | ||
.leaflet-control-edit-in-osm .leaflet-control-edit-in-osm-toggle { | ||
background-position: 50% 50%; | ||
background-repeat: no-repeat; | ||
height: 36px; | ||
width: 36px; | ||
display: block; | ||
} | ||
.leaflet-control-edit-in-osm .leaflet-control-edit-in-osm-toggle { | ||
background-image: url("./edit-in-osm.png"); | ||
} | ||
.leaflet-control-edit-in-osm .osm-editor + .osm-editor { | ||
border-left: 1px solid black; | ||
} | ||
.leaflet-control-edit-in-osm a.osm-editor { | ||
display: none; | ||
height: 36px; | ||
min-width: 36px; | ||
text-align: center; | ||
line-height: 36px; | ||
color: #333; | ||
padding: 0 5px; | ||
text-decoration: none; | ||
font-family: sans-serif; | ||
} | ||
.leaflet-control-edit-in-osm:hover a.osm-editor { | ||
display: inline-block; | ||
} | ||
a.osm-editor:hover { | ||
box-shadow: 0 0 2px 0 black inset; | ||
} | ||
.leaflet-control-edit-in-osm:hover .leaflet-control-edit-in-osm-toggle { | ||
display: none; | ||
} | ||
|
||
.leaflet-control-edit-hidden { | ||
display: none; | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.