var size = 0; function categories_lakes(feature, value) { switch(value) {case "Becharof Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(89,109,204,1.0)"}) })]; break; case "Dall Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(222,104,137,1.0)"}) })]; break; case "Iliamna Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(72,200,68,1.0)"}) })]; break; case "Kenai Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(72,145,209,1.0)"}) })]; break; case "Lake Clark": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(228,78,230,1.0)"}) })]; break; case "Lake George": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(232,205,47,1.0)"}) })]; break; case "Lake Minchumina": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(228,146,137,1.0)"}) })]; break; case "Lake Nerka": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(23,240,179,1.0)"}) })]; break; case "Lower Ugashik Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(202,62,153,1.0)"}) })]; break; case "Naknek Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(169,63,239,1.0)"}) })]; break; case "Nunavakpak Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(76,210,222,1.0)"}) })]; break; case "Nuvakuk Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(130,109,207,1.0)"}) })]; break; case "Skilak Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(90,207,131,1.0)"}) })]; break; case "Teshekpuk Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(192,220,90,1.0)"}) })]; break; case "Tustumena Lake": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(142,211,96,1.0)"}) })]; break; case "": return [ new ol.style.Style({ stroke: new ol.style.Stroke({color: "rgba(0,0,0,1.0)", lineDash: null, lineCap: 'butt', lineJoin: 'miter', width: 0}), fill: new ol.style.Fill({color: "rgba(203,127,61,1.0)"}) })]; break;}}; var styleCache_lakes={} var style_lakes = function(feature, resolution){ var value = feature.get("NAMES"); var style = categories_lakes(feature, value); if ("" !== null) { var labelText = String(""); } else { var labelText = "" } var key = value + "_" + labelText if (!styleCache_lakes[key]){ var text = new ol.style.Text({ font: '10.725px \'MS Shell Dlg 2\', sans-serif', text: labelText, textBaseline: "center", textAlign: "left", offsetX: 5, offsetY: 3, fill: new ol.style.Fill({ color: "rgba(0, 0, 0, 255)" }), }); styleCache_lakes[key] = new ol.style.Style({"text": text}) } var allStyles = [styleCache_lakes[key]]; allStyles.push.apply(allStyles, style); return allStyles; };