Skip to content

Instantly share code, notes, and snippets.

@jueyang
Forked from anonymous/map.geojson
Last active December 20, 2015 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jueyang/6122842 to your computer and use it in GitHub Desktop.
Save jueyang/6122842 to your computer and use it in GitHub Desktop.
<!DOCTYPE html>
<meta charset="utf-8">
<head>
<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]-->
<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>
</head>
<body>
<div id='map'></div>
</body>
<script>
var map = L.mapbox.map('map', 'examples.map-y7l23tes')
.setView([37.9, -77], 5);
var geojson = [];
var circle = function(geoJsonFeature,options,popup){
L.geoJson(geoJsonFeature,{
pointToLayer:function(feature,latlng){
return L.circleMarker(latlng,options
).bindPopup(popup,{
closeButton: false,
offset:(100,0)
})
}
}).addTo(markers
).addTo(map);
};
$.getJSON('map.geojson',function(data){
console.log(data);
L.featureGroup();
});
</script>
</html>
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment