A Leaflet.js map created with Folium. This map was generated with the following Python code:
map_5 = folium.Map(location=[45.5236, -122.6750], zoom_start=13)
map_5.polygon_marker(location=[45.5012, -122.6655], popup='Ross Island Bridge',
fill_color='#132b5e', num_sides=3, radius=10)
map_5.polygon_marker(location=[45.5132, -122.6708], popup='Hawthorne Bridge',
fill_color='#45647d', num_sides=4, radius=10)
map_5.polygon_marker(location=[45.5275, -122.6692], popup='Steel Bridge',
fill_color='#769d96', num_sides=6, radius=10)
map_5.polygon_marker(location=[45.5318, -122.6745], popup='Broadway Bridge',
fill_color='#769d96', num_sides=8, radius=10)
map_5.create_map(path='bridges.html')
xxxxxxxxxx
<head>
<link rel="stylesheet" href="https://cdn.leafletjs.com/leaflet-0.5/leaflet.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/leaflet/0.5/leaflet.min.js"></script>
<script src="leaflet-dvf.markers.min.js"></script>
<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>
var map = L.map('map').setView([45.5236, -122.675], 13);
L.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
maxZoom: 18,
attribution: 'Map data (c) <a href="https://openstreetmap.org">OpenStreetMap</a> contributors'
}).addTo(map);
var polygon_1 = new L.RegularPolygonMarker(new L.LatLng(45.5012, -122.6655), {
color: 'black',
opacity: 1,
weight: 2,
fillColor: '#132b5e',
fillOpacity: 1,
numberOfSides: 3,
rotation: 0,
radius: 10
});
polygon_1._latlng = polygon_1._centerLatLng
polygon_1.bindPopup("Ross Island Bridge");
map.addLayer(polygon_1)
var polygon_2 = new L.RegularPolygonMarker(new L.LatLng(45.5132, -122.6708), {
color: 'black',
opacity: 1,
weight: 2,
fillColor: '#45647d',
fillOpacity: 1,
numberOfSides: 4,
rotation: 0,
radius: 10
});
polygon_2._latlng = polygon_2._centerLatLng
polygon_2.bindPopup("Hawthorne Bridge");
map.addLayer(polygon_2)
var polygon_3 = new L.RegularPolygonMarker(new L.LatLng(45.5275, -122.6692), {
color: 'black',
opacity: 1,
weight: 2,
fillColor: '#769d96',
fillOpacity: 1,
numberOfSides: 6,
rotation: 0,
radius: 10
});
polygon_3._latlng = polygon_3._centerLatLng
polygon_3.bindPopup("Steel Bridge");
map.addLayer(polygon_3)
var polygon_4 = new L.RegularPolygonMarker(new L.LatLng(45.5318, -122.6745), {
color: 'black',
opacity: 1,
weight: 2,
fillColor: '#769d96',
fillOpacity: 1,
numberOfSides: 8,
rotation: 0,
radius: 10
});
polygon_4._latlng = polygon_4._centerLatLng
polygon_4.bindPopup("Broadway Bridge");
map.addLayer(polygon_4)
</script>
</body>
Modified http://cdn.leafletjs.com/leaflet-0.5/leaflet.js to a secure url
https://cdn.leafletjs.com/leaflet-0.5/leaflet.js