Last active
December 17, 2015 03:48
-
-
Save wrobstory/5545751 to your computer and use it in GitHub Desktop.
Folium MapBox Control Room Base
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
'''Test of Folium MapBox Control Room''' | |
import folium | |
#Standard MapBox Control Room (Dark) | |
map = folium.Map(location=[45.5236, -122.6750], tiles='MapBox Dark', | |
zoom_start=4, max_zoom=8) | |
map.create_map() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<head> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.css" /> | |
<!--[if lte IE 8]> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.5/leaflet.ie.css" /> | |
<![endif]--> | |
<style> | |
#map { | |
position:absolute; | |
top:0; | |
bottom:0; | |
right:0; | |
left:0; | |
} | |
</style> | |
</head> | |
<body> | |
<div id="map" style="width: 960px; height: 500px"></div> | |
<script src="http://cdn.leafletjs.com/leaflet-0.5/leaflet.js"></script> | |
<script> | |
var map = L.map('map').setView([45.5236, -122.675], 4); | |
L.tileLayer('http://a.tiles.mapbox.com/v3/mapbox.control-room/{z}/{x}/{y}.png', { | |
maxZoom: 8, | |
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors, Imagery © <a href="http://mapbox.com">MapBox</a>' | |
}).addTo(map); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment