Skip to content

Instantly share code, notes, and snippets.

@tmcw
Created November 7, 2013 20:21
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 tmcw/7361200 to your computer and use it in GitHub Desktop.
Save tmcw/7361200 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<title></title>
<script src='//api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.js'></script>
<link href='//api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.css' rel='stylesheet' />
<link href='play.css' rel='stylesheet' />
<!--[if lte IE 8]>
<link href='//api.tiles.mapbox.com/mapbox.js/v1.4.0/mapbox.ie.css' rel='stylesheet'>
<![endif]-->
<style>
body { margin:0; padding:0; }
#map, #wrap { position:absolute; top:0; bottom:0; width:100%; }
</style>
</head>
<body>
<div id='wrap'>
<div class='play'></div>
<div id='map'></div>
</div>
<script type='text/javascript'>
var map = L.mapbox.map('map', 'examples.map-9ijuk24y')
.setView([40, -74.50], 9);
</script>
</body>
</html>
/* Loading overlay
------------------------------------------------------- */
.play:after,
.play:before {
content:'';
display:block;
position:absolute;
z-index:10;
}
.play:before {
background:transparent;
background-color: rgba(0, 0, 0, 0.5);
left:0;
top:0;
width:100%;
height:100%;
}
.play:after {
background-position: 50% 50%;
background-color: #eee;
background-color: rgba(255, 255, 255, 0.5);
content: 'play';
text-align:center;
line-height:80px;
vertical-align:center;
font-size:20px;
left:50%;
top:50%;
margin:-40px 0 0 -40px;
width:80px;
height:80px;
border-radius:50%;
}
.play:active {
display:none;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment