Can someone explain me why this leaflet code works for visualizing the GeoJson data of the state New York but I can't draw the data of the city new york. I used the same export preferences for the files in QGIS.
I used the data from the following links:
New York city http://www.nyc.gov/html/dcp/html/bytes/districts_download_metadata.shtml
New York state http://cugir.mannlib.cornell.edu/bucketinfo.jsp?id=7865
<!DOCTYPE html>
<html>
<meta charset="utf-8">
<head>
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
<link rel="stylesheet" href="style_blank.css" />
</head>
<body>
<script src="http://d3js.org/d3.v3.min.js"></script>
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
<script src="sdfgsdgdfgfdsgd.js"></script>
<div id="map"></div>
<script>
var map = L.map('map',{
center: [5,28],
zoom: 3,
minZoom: 2,
maxZoom: 18
});
L.geoJson(data, {
style: function (feature) {
return {color: feature.properties.color};
},
onEachFeature: function (feature, layer) {
layer.bindPopup(feature.properties.description);
}
}).addTo(map);
</script>
</body>
</html>