summaryrefslogtreecommitdiff
path: root/index.html
diff options
context:
space:
mode:
authorYuval Adam <yuv.adm@gmail.com>2013-01-14 20:57:18 +0200
committerYuval Adam <yuv.adm@gmail.com>2013-01-14 20:57:18 +0200
commitf0afad8de526b4f1206e9bd43a3510c8c8ebcb4d (patch)
tree20e9ae8b9f7a5f8652aa316ff109c56d2a535a37 /index.html
parent737a16295474ed8a5fc391fe920f440d2f12ebba (diff)
Dummy marker
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>