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,  subspecies = feature.properties.subspecies;
+
         switch (feature.properties.subspecies) {
        if ( subspecies == "ellioti" ) fillColor = "#006837";
+
            case 'ellioti': return {color: "#ff0000"};
        else if ( subspecies == "schweinfurthii" ) fillColor = "#31a354";
+
            case 'schweinfurthii':  return {color: "#0000ff"};
        else if ( subspecies == "troglodytes" ) fillColor = "#78c679";
+
            case 'troglodytes':  return {color: "#78c679"};
        else if ( subspecies == "verus" ) fillColor = "#c2e699";
+
            case 'verus':  return {color: "#31a354"};
        return { color: "#999", weight: 1, fillColor: fillColor, fillOpacity: .6 };
+
        }
 
       }
 
       }
  
 
       // 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});
+
       var stateLayer2 = L.geoJson(null, {onEachFeature: forEachFeature, style: style2});
  
 
       $.getJSON(url, function(data) { stateLayer.addData(data);});
 
       $.getJSON(url, function(data) { stateLayer.addData(data);});

Revision as of 11:04, 25 February 2022

Avaiable Layers:

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

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