diff options
| author | Yuval Adam <yuv.adm@gmail.com> | 2013-01-14 20:57:18 +0200 |
|---|---|---|
| committer | Yuval Adam <yuv.adm@gmail.com> | 2013-01-14 20:57:18 +0200 |
| commit | f0afad8de526b4f1206e9bd43a3510c8c8ebcb4d (patch) | |
| tree | 20e9ae8b9f7a5f8652aa316ff109c56d2a535a37 /index.html | |
| parent | 737a16295474ed8a5fc391fe920f440d2f12ebba (diff) | |
Dummy marker
Diffstat (limited to 'index.html')
| -rw-r--r-- | index.html | 22 |
1 files changed, 18 insertions, 4 deletions
@@ -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> |
