Created
August 9, 2013 18:51
-
-
Save tmcw/6196128 to your computer and use it in GitHub Desktop.
This file contains 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 name='viewport' content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no' /> | |
<style> | |
body { margin:0; padding:0; } | |
#map { position:absolute; top:0; bottom:0; width:100%; } | |
.marker-properties { | |
border-collapse:collapse; | |
font-size:11px; | |
border:1px solid #eee; | |
margin:0; | |
} | |
.marker-properties th { | |
white-space:nowrap; | |
border:1px solid #eee; | |
padding:5px 10px; | |
} | |
.marker-properties td { | |
border:1px solid #eee; | |
padding:5px 10px; | |
} | |
.marker-properties tr:last-child td, | |
.marker-properties tr:last-child th { | |
border-bottom:none; | |
} | |
.marker-properties tr:nth-child(even) th, | |
.marker-properties tr:nth-child(even) td { | |
background-color:#f7f7f7; | |
} | |
</style> | |
<script src='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.js'></script> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js" ></script> | |
<link href='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.css' rel='stylesheet' /> | |
<!--[if lte IE 8]> | |
<link href='//api.tiles.mapbox.com/mapbox.js/v1.3.1/mapbox.ie.css' rel='stylesheet' > | |
<![endif]--> | |
</head> | |
<body> | |
<div id='map'></div> | |
<script type='text/javascript'> | |
var map = L.mapbox.map('map'); | |
L.mapbox.tileLayer('tmcw.map-ajwqaq7t', { | |
retinaVersion: 'tmcw.map-u8vb5w83', | |
detectRetina: true | |
}).addTo(map); | |
var geojson = {"type":"FeatureCollection","features":[ | |
{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-22.4425587930444,37.80666418607323]}}, | |
{"type":"Feature","properties":{},"geometry":{"type":"Point","coordinates":[-22.4425587930444,38.80666418607323]}} | |
]}; | |
var markerOptions = { | |
'marker-color': '0055fa', | |
'marker-opacity': 0.6, | |
'marker-size': 'small' | |
}; | |
var geojsonLayer = L.geoJson(geojson, { | |
pointToLayer: function(feature, latlon) { | |
return L.marker(latlon, { | |
icon: L.mapbox.marker.icon(markerOptions) | |
}); | |
} | |
}).addTo(map); | |
map.fitBounds(geojsonLayer.getBounds()); | |
</script> | |
</body> | |
</html> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment