Skip to content

Instantly share code, notes, and snippets.

@andrewharvey
Created March 6, 2017 07:56
Show Gist options
  • Save andrewharvey/bdea06939464679a867c7812cb35ee76 to your computer and use it in GitHub Desktop.
Save andrewharvey/bdea06939464679a867c7812cb35ee76 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,mapbox.mapbox-streets-v7"
}
},
"version" : 8,
"layers" : [
{
"type" : "background",
"id" : "background",
"paint" : {
"background-color" : {
"stops" : [
[
11,
"hsl(35, 32%, 91%)"
],
[
13,
"hsl(35, 12%, 89%)"
]
],
"base" : 1
}
},
"layout" : {}
},
{
"source-layer" : "hillshade",
"filter" : [
"==",
"level",
89
],
"paint" : {
"fill-opacity" :0.5,
"fill-color" : "hsl(0, 0%, 50%)"
},
"layout" : {},
"id" : "hillshade_shadow_faint",
"source" : "composite",
"type" : "fill"
}
]
},
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