Created
February 8, 2014 22:47
-
-
Save naveen/8891496 to your computer and use it in GitHub Desktop.
every place i've been map.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset=utf-8 /> | |
| <title>every place i've been.</title> | |
| <meta name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
| <script src='http://api.tiles.mapbox.com/mapbox.js/v1.5.2/mapbox.js'></script> | |
| <link href='http://api.tiles.mapbox.com/mapbox.js/v1.5.2/mapbox.css' rel='stylesheet' /> | |
| <style> | |
| body { margin:0; padding:0; } | |
| #map { position:absolute; top:0; bottom:0; width:100%; } | |
| </style> | |
| </head> | |
| <body> | |
| <div id='map'></div> | |
| <div id='legend-content' style='display: none;'> | |
| <div class='my-legend'> | |
| <div class='legend-title'>Every place I've been.</div> | |
| <div class='legend-description'>2008 – now via <a href="http://foursquare.com/naveen">foursquare</a>.</div> | |
| <div class='legend-source'><a href="http://naveen.com">← naveen.com</a></div> | |
| </div> | |
| <style type='text/css'> | |
| .my-legend .legend-title { | |
| text-align: left; | |
| font-weight: bold; | |
| font-size: 90%; | |
| } | |
| .my-legend .legend-description { | |
| font-size: 70%; | |
| } | |
| .my-legend .legend-source { | |
| font-size: 70%; | |
| color: #999; | |
| clear: both; | |
| } | |
| .my-legend a { | |
| color: #777; | |
| } | |
| </style> | |
| </div> | |
| <script> | |
| var map = L.mapbox.map('map', 'naveens.go61nf3o', { | |
| legendControl: { | |
| // any of the valid control positions: | |
| // http://leafletjs.com/reference.html#control-positions | |
| position: 'bottomleft' | |
| } | |
| }).setView([20, -0], 2); | |
| L.mapbox.markerLayer({ | |
| // this feature is in the GeoJSON format: see geojson.org | |
| // for the full specification | |
| type: 'Feature', | |
| geometry: { | |
| type: 'Point', | |
| // coordinates here are in longitude, latitude order because | |
| // x, y is the standard for GeoJSON and many formats | |
| coordinates: [-77, 37.9] | |
| }, | |
| properties: { | |
| title: 'A Single Marker', | |
| description: 'Just one of me', | |
| // one can customize markers by adding simplestyle properties | |
| // http://mapbox.com/developers/simplestyle/ | |
| 'marker-size': 'medium', | |
| 'marker-color': '#7d7d7d', | |
| 'marker-symbol': 'circle-stroked' | |
| } | |
| }).addTo(map); | |
| map.legendControl.addLegend(document.getElementById('legend-content').innerHTML); | |
| </script> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment