I cannot figure out how to style all feature points from a local GeoJson file at once using the Mapbox.js. My GeoJSON file has roughly 500 points. I could go through each point in the GeoJSON file and set their properties individually but that is impractical because of the number of points in my file. I'm able to display my points on my map with the code below but can't figure out what code is involved in styling all of these points with a certain color or symbol.
Here is what I have so far (my mapbox api key has been removed):
<!DOCTYPE html>
<html>
<head>
<title>A leaflet map!</title>
<link rel="stylesheet" href="/Users/zacharyrobinson1/Desktop/mapbox_tutorial/mapbox.css">
<script src="/Users/zacharyrobinson1/Desktop/mapbox_tutorial/mapbox.js"></script>
<script type="text/javascript" src="/Users/zacharyrobinson1/Desktop/mapbox_tutorial/rodents1.geojson"></script>
<style>
body {
margin:0;
padding:0;
}
.map {
position: absolute;
top: 0px;
bottom: 0px;
width:100%;
}
</style>
</head>
<body>
<div id="map" class='map'></div>
<script>
L.mapbox.accessToken = '';
L.mapbox.map('map','mapbox.streets')
.setView([42.35,-71.08],13)
.featureLayer.setGeoJSON(rodents1);
</script>
And here's a snippet of my GeoJSON file:
var rodents1 = {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [ -71.1491,42.3419 ]
},
"properties": {
"FIELD3":"Rodent"
}
},