Skip to content

Instantly share code, notes, and snippets.

@yuletide
Created January 16, 2018 23:54
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 yuletide/58f089840b19d26ff0a78d794670fd32 to your computer and use it in GitHub Desktop.
Save yuletide/58f089840b19d26ff0a78d794670fd32 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title></title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.39.1/mapbox-gl.css' rel='stylesheet' />
<script src='http://mapbox-gl-inspect.lukasmartinelli.ch/dist/mapbox-gl-inspect.min.js'></script>
<link href='http://mapbox-gl-inspect.lukasmartinelli.ch/dist/mapbox-gl-inspect.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
.mapboxgl-popup {
max-height: 400px;
}
.mapboxgl-popup-content {
overflow-y: scroll;
}
</style>
</head>
<body>
<div id='map'></div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoicmFmaWNvaGVuIiwiYSI6ImNqMHMwMng4MTAwMG8zM21zNHZxM3AwY24ifQ.yMXUWVwxOer1ms2muisOoA';
var map = new mapboxgl.Map({
container: 'map', // container id
style: 'mapbox://styles/raficohen/cjciagz97083b2sp9oyvx9g5c', // stylesheet location
center: [-96.069460,39.199217], // starting position [lng, lat]
zoom: 15,
pitch: 60,
hash: true,
minZoom: 10
});
map.addControl(new MapboxInspect({
showInspectMap: true,
showMapPopupOnHover: false,
showInspectMapPopupOnHover: false,
showMapPopup: true
}));
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment