Difference between revisions of "Range Layers"

From A.P.E.S. wiki
Jump to navigation Jump to search
Line 54: Line 54:
 
       }
 
       }
 
       function style2(feature) {
 
       function style2(feature) {
      var fillColor,
+
        var fillColor, subspecies = feature.properties.subspecies;
            subspecies = feature.properties.subspecies;
 
 
         if ( subspecies == "ellioti" ) fillColor = "#006837";
 
         if ( subspecies == "ellioti" ) fillColor = "#006837";
 
         else if ( subspecies == "schweinfurthii" ) fillColor = "#31a354";
 
         else if ( subspecies == "schweinfurthii" ) fillColor = "#31a354";
 
         else if ( subspecies == "troglodytes" ) fillColor = "#78c679";
 
         else if ( subspecies == "troglodytes" ) fillColor = "#78c679";
 
         else if ( subspecies == "verus" ) fillColor = "#c2e699";
 
         else if ( subspecies == "verus" ) fillColor = "#c2e699";
        else fillColor = "#f7f7f7";  // no data
 
 
         return { color: "#999", weight: 1, fillColor: fillColor, fillOpacity: .6 };
 
         return { color: "#999", weight: 1, fillColor: fillColor, fillOpacity: .6 };
 
       }
 
       }
Line 66: Line 64:
 
       // Null variable that will hold layer
 
       // Null variable that will hold layer
 
       var stateLayer = L.geoJson(null, {style: style});
 
       var stateLayer = L.geoJson(null, {style: style});
       var stateLayer2 = L.geoJson(null, {onEachFeature: forEachFeature, style: style2});
+
       var stateLayer2 = L.geoJson(null, {onEachFeature: forEachFeature});
  
 
       $.getJSON(url, function(data) { stateLayer.addData(data);});
 
       $.getJSON(url, function(data) { stateLayer.addData(data);});

Revision as of 11:55, 25 February 2022

Avaiable Layers:

Ape range Download: Geographic shapefile (ZIP; 171 kB)]

Refugia after Maley 1996 Download: Geographic shapefile (ZIP; 85 kB)]