summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
Diffstat (limited to 'index.html')
-rw-r--r--index.html22
1 files changed, 18 insertions, 4 deletions
diff --git a/index.html b/index.html
index cabc27f..61a1dfd 100644
--- a/index.html
+++ b/index.html
@@ -1,19 +1,33 @@
<!doctype html>
<html>
<head>
+ <meta charset="utf8">
<title>Elections 2013 Map</title>
<link rel="stylesheet" href="http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.css">
<script src='http://api.tiles.mapbox.com/mapbox.js/v0.6.7/mapbox.js'></script>
- <script>
- var map = mapbox.map('map');
- </script>
</head>
<body>
<h1>Elections 2013 Map</h1>
<div id='map' style='width:500px;height:400px;'></div>
<script>
- mapbox.auto('map', 'http://a.tiles.mapbox.com/v3/yuvadm.map-8zhg56t1.jsonp');
+ var map = mapbox.map('map');
+ map.addLayer(mapbox.layer().id('yuvadm.map-8zhg56t1'));
+
+ var markerLayer = mapbox.markers.layer();
+ mapbox.markers.interaction(markerLayer);
+ map.addLayer(markerLayer);
+ map.centerzoom({lat: 31.54, lon: 35.23}, 7);
+
+ markerLayer.add_feature({
+ geometry: { coordinates: [35.2, 31.5] },
+ properties: {
+ 'marker-color': '#000',
+ 'marker-symbol': 'star-stroked',
+ title: 'Example Marker',
+ description: 'This is a single marker.'
+ }
+ });
</script>
</body>
</html>