Skip to content

Instantly share code, notes, and snippets.

@andrewharvey
Created March 6, 2017 07:57
Show Gist options
  • Save andrewharvey/592399e17aa9db45c90cd216cfea3820 to your computer and use it in GitHub Desktop.
Save andrewharvey/592399e17aa9db45c90cd216cfea3820 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.32.1/mapbox-gl.js'></script>
<link href='https://api.tiles.mapbox.com/mapbox-gl-js/v0.32.1/mapbox-gl.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:1914px; height:1008px }
</style>
</head>
<body>
<div id='map'></div>
<script>
mapboxgl.accessToken = 'pk.eyJ1IjoiYW5kcmV3aGFydmV5NCIsImEiOiJQUGlGbmRRIn0.QXGAIfNhyVBmLvz0BwAhRg';
var map = new mapboxgl.Map({
container: 'map',
style: {
"sources" : {
"composite" : {
"type" : "vector",
"url" : "mapbox://mapbox.mapbox-terrain-v2"
}
},
"version" : 8,
"layers" : [
{
"paint" : {},
"source-layer" : "contour",
"id" : "contour-line",
"type" : "line",
"source" : "composite",
"layout" : {}
}
]
},
center: [150.7313, -34.6844],
zoom: 12.31,
bearing: -44.4,
pitch: 60
});
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment