Skip to content

Instantly share code, notes, and snippets.

@ptpt
Last active August 7, 2018 23:04
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 ptpt/1cd565b8d311ee62870c63a049d95927 to your computer and use it in GitHub Desktop.
Save ptpt/1cd565b8d311ee62870c63a049d95927 to your computer and use it in GitHub Desktop.
Demo page for Mapillary raster tiles
<!DOCTYPE html>
<html>
<head>
<title>Raster Tiles - Mapillary</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.0.1/dist/leaflet.css" />
<script src="https://unpkg.com/leaflet@1.0.1/dist/leaflet.js"></script>
</head>
<body>
<div id="mapid" style="position:absolute; top:0; bottom:0; width:100%;"></div>
<script>
var map = L.map('mapid').setView([57.704077, 12.91286], 13);
L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token=pk.eyJ1IjoicHQiLCJhIjoiYzNkMDlmYzFkY2FmYjE3Y2E3MTAxNjgwMWE0YTI2ZDcifQ.MQenQX1GtH2UuXkKzLWJag', {
maxZoom: 18,
attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, ' +
'<a href="http://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, ' +
'Imagery © <a href="http://mapbox.com">Mapbox</a>',
id: 'mapbox.streets'
}).addTo(map);
L.tileLayer('https://d6a1v2w10ny40.cloudfront.net/v0.1/{z}/{x}/{y}.png', {
maxZoom: 18,
maxNativeZoom: 17,
id: 'mapillary.sequences'
}).addTo(map);
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment