forked from shurshur/Leaflet.Flickr
-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.html
31 lines (30 loc) · 1.08 KB
/
demo.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.css" />
<script src="http://cdn.leafletjs.com/leaflet-0.7.1/leaflet.js"></script>
<script src="Flickr.js"></script>
</head>
<body onload="init()">
<script>
function init() {
var OSM_COPY = 'Map data © <a href="http://www.openstreetmap.org/copyright" target="_new">OpenStreetMap</a> contributors';
var center = new L.LatLng(55.75, 37.6);
var zoom = 10;
var map = new L.Map('map', {center: center, zoom: zoom});
var mapnik = new L.TileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', { maxZoom: 18, attribution: OSM_COPY });
var flickr = new L.Flickr('YOUR_FLICKR_API_KEY',{maxLoad: 50, maxTotal: 250});
map.addLayer(mapnik);
map.addLayer(flickr);
var layers = { "Map": mapnik };
var overlays = { "Flickr": flickr };
control_layers = new L.Control.Layers(layers, overlays);
}
</script>
<table border=0 width=100% height=100%>
<tr><td><h2>Flickr Demo</h2></td></tr>
<tr><td height=100%>
<div id="map" style="width: 100%; height: 100%"></div>
</td></tr>
</table>
</body>
</html>