Skip to content

Instantly share code, notes, and snippets.

@jatorre jatorre/index.html
Last active May 26, 2016

Embed
What would you like to do?
Mapzen
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.0-beta.2/leaflet.css">
<link rel="stylesheet" href="https://erasermap.com/css/main.css">
</head>
<body>
<div id="map"></div>
<script src='https://geoiplookup.wikimedia.org/'></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/1.0.0-beta.2/leaflet.js"></script>
<script src="https://mapzen.com/tangram/tangram.min.js"></script>
<script src="https://erasermap.com/map/bundle.min.js"></script>
<script>
// when GeoIP is available, set the map's initial view to detected coords.
var lat, lon;
if (typeof Geo === 'object') {
lon = Geo.lon
lat = Geo.lat
} else {
lon = -74.009
lat = 40.70531
}
var webmap = WebMap.init(document.getElementById('map'), [lat, lon], 14);
//going with rawgit file since bubble wrap style is still work in process,
//and has some dependancies.
webmap.setupScene('https://mapzen.com/carto/bubble-wrap-style/2/bubble-wrap.yaml');
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.