Skip to content

Instantly share code, notes, and snippets.

@aborruso
Last active December 2, 2017 22:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aborruso/0d5a84af0cd6b0d22961b7de6d725e4a to your computer and use it in GitHub Desktop.
Save aborruso/0d5a84af0cd6b0d22961b7de6d725e4a to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
<!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 &copy; <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