Map.Styles.styles.poi = {externalGraphic: Utils.iconLocation+"${type}.png", graphicWidth: 32, graphicHeight: 37, graphicYOffset: -37, graphicOpacity: 1, cursor: "pointer"};
Map.Styles.styles.question = {strokeColor: "blue", strokeWidth: 2, externalGraphic: Utils.imageLocation+"question.png", graphicWidth: 32, graphicHeight: 32, graphicYOffset: -32, graphicOpacity: 1, cursor: "pointer"};
Map.Styles.styles.smallerIcon = {graphicWidth: 24, graphicHeight: 27.75, graphicYOffset: -27.75};
Map.Styles.filters.type_eq_null = {
    type: OpenLayers.Filter.Comparison.EQUAL_TO, property: "type", value: null
}
Map.Styles.rules.iconType = {
    filter: 'type_ne_null',
    symbolizer: 'poi'
};
Map.Styles.rules.invalidIcon = {
    filter: 'type_eq_null',
    symbolizer: 'edit'
};
Map.Styles.rules.questionIcon = {
    filter: 'type_eq_null',
    symbolizer: 'question'
}
Map.Styles.rules.smallerIcon = {
    minScaleDenominator: 300000,
    symbolizer: 'smallerIcon'
};

Map.getPoiLayerOptions = function() {
    var layerOptions = {};
    for (var i = 0; i < ServerVars['categories'].length; i++) {
        var cat = ServerVars['categories'][i];
        var options = {
            strategyTypes: ['Fixed'],
            type: 'FS',
            fsFile: "poi?bbox=",
            passThrough: {visibility: false},
            defaultStyle: 'poi',
            rulesArray: ['smallerIcon', 'elseFilter']
        };
        options.fsFile += ServerVars['poiExtent']+"&category="+cat;
        layerOptions[cat] = options;
    }
    return layerOptions;
}

