Skip to content

Instantly share code, notes, and snippets.

@kamicut
Last active April 26, 2016 19:11
Show Gist options
  • Save kamicut/1e452e26c88f23832eff13a7c79b6459 to your computer and use it in GitHub Desktop.
Save kamicut/1e452e26c88f23832eff13a7c79b6459 to your computer and use it in GitHub Desktop.
requirebin sketch
L.mapbox.accessToken = 'pk.eyJ1IjoiZHJld2JvMTkiLCJhIjoiWlpRb2lYUSJ9.aT3CQyI2_wYzqKPDqjgvyw';
var map = L.mapbox.map('map', 'mapbox.satellite')
.setView([33.889, 35.498], 17);
setTimeout(function(){L.mapbox.accessToken="pk.eyJ1IjoiZHJld2JvMTkiLCJhIjoiWlpRb2lYUSJ9.aT3CQyI2_wYzqKPDqjgvyw";var map=L.mapbox.map("map","mapbox.satellite").setView([33.889,35.498],17)},0);
{
"name": "mapbox-satellite-layer",
"version": "1.0.0",
"dependencies": {
"mapbox.js": "2.1.9"
}
}
<!-- contents of this file will be placed inside the <body> -->
<div id="map"></div>
<meta charset=utf-8 />
<title>Load GeoJSON</title>
<meta name='viewport' content='initial-scale=1,maximum-scale=1,user-scalable=no' />
<script src='https://api.mapbox.com/mapbox.js/v2.3.0/mapbox.js'></script>
<script src='https://api.tiles.mapbox.com/mapbox.js/plugins/turf/v2.0.0/turf.min.js'></script>
<link href='https://api.mapbox.com/mapbox.js/v2.3.0/mapbox.css' rel='stylesheet' />
<style>
body { margin:0; padding:0; }
#map { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment