Last active
December 2, 2017 22:21
-
-
Save aborruso/0d5a84af0cd6b0d22961b7de6d725e4a to your computer and use it in GitHub Desktop.
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Mapillary per Ricostruzione Trasparente</title> | |
<meta charset="utf-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script> | |
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.2.0/dist/leaflet.css" integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ==" crossorigin=""/> | |
<script src="https://unpkg.com/leaflet@1.2.0/dist/leaflet.js" integrity="sha512-lInM/apFSqyy1o6s89K4iQUKg6ppXEgsVxT35HbzUupEVRh2Eu9Wdl4tHj7dZO0s1uvplcYGmt3498TtHq+log==" crossorigin=""></script> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
</style> | |
</head> | |
<body> | |
<div id="map" ></div> | |
<script> | |
var bbComune = $.ajax({ | |
url:"boundingbox.geojson", | |
dataType: "json", | |
error: function (xhr) { | |
alert(xhr.statusText) | |
} | |
}) | |
$.when(bbComune).done(function() { | |
var mapillaryRT = L.map('map').setView([51.505, -0.09], 13); | |
L.tileLayer('https://tiles.wmflabs.org/bw-mapnik/{z}/{x}/{y}.png ', { | |
maxZoom: 18, | |
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors' | |
}).addTo(mapillaryRT); | |
L.tileLayer('https://d6a1v2w10ny40.cloudfront.net/v0.1/{z}/{x}/{y}.png', { | |
maxZoom: 17, | |
id: 'mapillary.sequences' | |
}).addTo(mapillaryRT); | |
var kyCounties = L.geoJSON(bbComune.responseJSON, { | |
style: {color: "#999", weight: 2, fillColor: "#000000", fillOpacity: .1} | |
}).addTo(mapillaryRT); | |
mapillaryRT.fitBounds(kyCounties.getBounds()); | |
}); | |
</script> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment