var size = 0; var categories_airports = {"Civilian/Public": [ new ol.style.Style({ image: new ol.style.Circle({radius: 4.0 + size, 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,26,193,1.0)"})}) })], "Joint Military/Civilian": [ new ol.style.Style({ image: new ol.style.Circle({radius: 4.0 + size, 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(112,117,206,1.0)"})}) })], "Military": [ new ol.style.Style({ image: new ol.style.Circle({radius: 4.0 + size, 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(215,134,93,1.0)"})}) })], "Other": [ new ol.style.Style({ image: new ol.style.Circle({radius: 4.0 + size, 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(122,222,41,1.0)"})}) })], "": [ new ol.style.Style({ image: new ol.style.Circle({radius: 4.0 + size, 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(86,218,185,1.0)"})}) })]}; var styleCache_airports={} var style_airports = function(feature, resolution){ var value = feature.get("USE"); var style = categories_airports[value]; if ("" !== null) { var labelText = String(""); } else { var labelText = "" } var key = value + "_" + labelText if (!styleCache_airports[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_airports[key] = new ol.style.Style({"text": text}) } var allStyles = [styleCache_airports[key]]; allStyles.push.apply(allStyles, style); return allStyles; };