Last active
December 17, 2015 03:48
-
-
Save wrobstory/5545719 to your computer and use it in GitHub Desktop.
Folium OpenStreetMap 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 basic OSM map''' | |
import folium | |
#Standard OSM | |
map = folium.Map(location=[45.5236, -122.6750]) | |
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], 10); | |
L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { | |
maxZoom: 18, | |
attribution: 'Map data © <a href="http://openstreetmap.org">OpenStreetMap</a> contributors' | |
}).addTo(map); | |
</script> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment