mapa_mapStyles.js 19.5 KB
/**** CartoCSS for styling tax lot data ****/
var app = app || {};

var conficha, sinficha = '';

var actualizar_navegacion = function () {
    switch (mapa) {
        case 'morosidad':
            subseccion = 'Por tipo de Impuestos';
            break;
        case 'zonas':
            subseccion = 'Por Zona Tributaria';
            ttc1 = 'FICHA';
            ttc2 = 'ZONA';
            ttc3 = 'OBS';
            break;
        case 'frentes': subseccion = 'Por tipo de Pavimento'; break;
        case 'notificacion': subseccion = 'Estado de Notificación'; break;
        case 'migracion': subseccion = 'Seguimiento de actualizaciones'; break;
        case 'baldios': subseccion = 'Lotes Baldios'; break;
        case 'baches':
            //render pagina baches
        break;
    }

    //Nombrar Seccion y Subseccion
    $("#seccion").text(seccion);
    $("#subseccion").text(subseccion);

    //Mostrar elementos ocultos (template)
    $("#search-container").removeAttr('hidden');
    $("#ui-zoom").removeAttr('hidden');
    $("#ui-legend").removeAttr('hidden');
    $("#tool-tip").removeAttr('hidden');

    Pace.restart();

}


//app.mapStyles = (function(idactual){
app.mapStyles = (function(){
    return  {
        // default style, all lots are the same color
        regular : '' +
            '#e'+entidad+'_lotes_conccc{'+
                'polygon-fill: hsl(200,40%,90%);' +'polygon-opacity: 0.2;' +'line-color: #000;' +'line-width: 0.2;' +'line-opacity: 0.5;' +
            '}',
        inicio : '' +
            '#e'+entidad+'_lotes_conccc{'+
                'polygon-fill: #FFFFFF;'+'polygon-opacity: 0.7;'+'line-color: #000000;'+'line-width: 0.5;'+'line-opacity: 1;'+
            '}',
        iniciomanz : '' +
            '#e'+entidad+'_lotes_conccc{'+
                'polygon-fill: #FFFFFF;'+'polygon-opacity: 0.7;'+'line-color: #000000;'+'line-width: 0.5;'+'line-opacity: 1;'+
            '}',
        manzanas : ''+
            '#e'+entidad+'_manzanas{' +
                'polygon-fill: #FFA300; polygon-opacity: 0.2; line-color: #FFF; line-width: 0.5; line-opacity: 1;' +
            '}' +
            '#e'+entidad+'_manzanas::labels [zoom >= 16] {'+
                'text-name: [cc_man];'+ 'text-face-name: "DejaVu Sans Book";'+
                'text-size: 16;'+ 'text-label-position-tolerance: 10;'+ 'text-fill: #000;'+
                'text-halo-fill: #7f7676;'+ 'text-halo-radius: 3;'+
                'text-dy: 0;'+ 'text-opacity: 0.2;'+ 'text-allow-overlap: false;'+
                'text-placement: point;'+ 'text-placement-type: simple;'+
            '}'+
            '#e'+entidad+'_manzanas::labels [zoom >= 18] {'+
                'text-name: [cc_man];'+ 'text-face-name: "DejaVu Sans Book";'+
                'text-size: 40;'+ 'text-label-position-tolerance: 10;'+ 'text-fill: #000;'+
                'text-halo-fill: #3f3e3e;'+ 'text-halo-radius: 5;'+
                'text-dy: 0;'+'text-opacity: 0.2;'+'text-allow-overlap: false;'+
                'text-placement: point;'+'text-placement-type: simple;'+
            '}',
        manzanascarga : ''+
        '#e'+entidad+'_manzanas{' +
        'polygon-fill: #FFA300; polygon-opacity: 0; line-color: #FFF; line-width: 1; line-opacity: 1;' +
        '}' +
        '#e'+entidad+'_manzanas::labels [zoom >= 16] {'+
        'text-name: [cc_man];'+ 'text-face-name: "DejaVu Sans Book";'+
        'text-size: 16;'+ 'text-label-position-tolerance: 10;'+ 'text-fill: #FFF;'+
        'text-halo-fill: #7f7676;'+ 'text-halo-radius: 3;'+
        'text-dy: 0;'+ 'text-opacity: 0.5;'+ 'text-allow-overlap: false;'+
        'text-placement: point;'+ 'text-placement-type: simple;'+
        '}'+
        '#e'+entidad+'_manzanas::labels [zoom >= 18] {'+
        'text-name: [cc_man];'+ 'text-face-name: "DejaVu Sans Book";'+
        'text-size: 40;'+ 'text-label-position-tolerance: 10;'+ 'text-fill: #FFF;'+
        'text-halo-fill: #3f3e3e;'+ 'text-halo-radius: 5;'+
        'text-dy: 0;'+'text-opacity: 0.5;'+'text-allow-overlap: false;'+
        'text-placement: point;'+'text-placement-type: simple;'+
        '}',
        calles  :   '#e'+entidad+'_calles{line-color: #0F3B82; line-width: 2; line-opacity: 0.7; }',
        lotesincc   :   '#e'+entidad+'_lotes_sinccc{polygon-fill: #A53ED5; polygon-opacity: 0.6; line-color: #FFF; line-width: 0.5; line-opacity: 1;}',
        capazonastrib : '' +
            '#e'+entidad+'_zonas_tributarias{'+
                'polygon-fill: #FF6600;'+'polygon-opacity: 0;'+'line-color: #000000;'+'line-width: 3;'+'line-opacity: 1;'+
            '}'+
            '#e'+entidad+'_zonas_tributarias::labels {'+
                'text-name: [description];'+
                'text-face-name: "DejaVu Sans Book";'+
                'text-size: 20;'+
                'text-label-position-tolerance: 0;'+
                'text-fill: #000;'+
                'text-halo-fill: #FFF;'+
                'text-halo-radius: 3;'+
                'text-dy: -10;'+
                'text-allow-overlap: true;'+
                'text-placement: line;'+
                'text-placement-type: simple;'+
        '}',
        //POR ZONAS - ZONAS TRIBUTARIAS
        zonas : {
            todos : '' +
                '#e'+entidad+'_lotes_conccc {'+
                    'polygon-opacity: 0.7;'+'line-color: #FFF;'+'line-width: 0.5;'+'line-opacity: 1;'+
                '}'+
                '#e'+entidad+'_lotes_conccc[inm_tipo_ur="R"] {'+'polygon-fill: #229A00;'+'}'+
                '#e'+entidad+'_lotes_conccc[inm_tipo_ur="U"] {'+'polygon-fill: #2167AB;'+'}'+
                '#e'+entidad+'_lotes_conccc[inm_tipo_ur=null] {'+'polygon-fill: #FFA300;'+'}'
            ,
            R : '' +
                '#e'+entidad+'_lotes_conccc[inm_tipo_ur="R"] {'+'line-color: #FFF;'+'line-width: 0.5;'+'line-opacity: 1;'+'polygon-fill: #229A00;'+'}'
            ,
            U : '' +
                '#e'+entidad+'_lotes_conccc[inm_tipo_ur="U"] {'+'line-color: #FFF;'+'line-width: 0.5;'+'line-opacity: 1;'+'polygon-fill: #2167AB;'+'}'
            ,
            null : '' +
                '#e'+entidad+'_lotes_conccc[inm_tipo_ur=null] {'+'line-color: #FFF;'+'line-width: 0.5;'+'line-opacity: 1;'+'polygon-fill: #FFA300;'+'}'
        }
        ,
        //ZONAS TRIBUTARIAS
        zonastributarias : {
            todos : '' +
            '#e'+entidad+'_lotes_conccc {'+
                'polygon-opacity: 0.7;'+'line-color: #FFF;'+'line-width: 0.5;'+'line-opacity: 1;'+
            '}'+
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="0-0-0"] {'+'polygon-fill: #000000;'+'}'+
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="R-1-1"] {'+'polygon-fill: #229A00;'+'}'+
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="U-1-0"] {'+'polygon-fill: #F84F40;'+'}'+
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="U-2-0"] {'+'polygon-fill: #0F3B82;'+'}'+
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="U-3-0"] {'+'polygon-fill: #ffff00;'+'}'+
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="U-4-0"] {'+'polygon-fill: #ff0000;'+'}'
            ,
            //{color: "#ffff00", label: "U-3-0"},
                //{color: "#ff0000", label: "U-4-0"},
            null : '' +
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="0-0-0"] {'+'polygon-fill: #000000;'+'}'
            ,
            R11 : '' +
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="R-1-1"] {'+'polygon-fill: #229A00;'+'}'
            ,
            U10 : '' +
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="U-1-0"] {'+'polygon-fill: #F84F40;'+'}'
            ,
            U20 : '' +
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="U-2-0"] {'+'polygon-fill: #0F3B82;'+'}'
            ,
            U30 : '' +
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="U-3-0"] {'+'polygon-fill: #ffff00;'+'}'
            ,
            U40 : '' +
            '#e'+entidad+'_lotes_conccc[zonas_tributarias="U-4-0"] {'+'polygon-fill: #ff0000;'+'}'
        }
        ,
        //TIPO PAVIMENTO
        frentepavimento : {
            todos : '' +
            '#e'+entidad+'_lotes_conccc{'+
                'polygon-opacity: 0.7;'+'line-color: #FFF;'+'line-width: 0.5;'+'line-opacity: 1;'+
            '}'+
            '#e'+entidad+'_lotes_conccc[inm_tpav="T"] {'+'polygon-fill: #FF2900;'+'}'+
            '#e'+entidad+'_lotes_conccc[inm_tpav="R"] {'+'polygon-fill: #894c4c;'+'}'+
            '#e'+entidad+'_lotes_conccc[inm_tpav="E"] {'+'polygon-fill: #305784;'+'}'+
            '#e'+entidad+'_lotes_conccc[inm_tpav="D"] {'+'polygon-fill: #6ba75f;'+'}'+
            '#e'+entidad+'_lotes_conccc[inm_tpav="A"] {'+'polygon-fill: #222222;'+'}'+
            '#e'+entidad+'_lotes_conccc[inm_tpav="H"] {'+'polygon-fill: #6ba75f;'+'}'+
            '#e'+entidad+'_lotes_conccc[inm_tpav=null] {'+'polygon-fill: #FFCC00;'+'}'//TODOS
            ,
            asfalto : '' +
            '#e'+entidad+'_lotes_conccc[inm_tpav="A"] {'+'polygon-fill: #222222;'+'}'//TODO: VARIABLE DINAMICA
            ,
            hormigon : '' +
            '#e'+entidad+'_lotes_conccc[inm_tpav="H"] {'+'polygon-fill: #6ba75f;'+'}'//TODO: VARIABLE DINAMICA
            ,
            empedrado : '' +
            '#e'+entidad+'_lotes_conccc[inm_tpav="E"] {'+'polygon-fill: #305784;'+'}'
            ,
            adoquin : '' +
            '#e'+entidad+'_lotes_conccc[inm_tpav="D"] {'+'polygon-fill: #6ba75f;'+'}'
            ,
            tierra : '' +
            '#e'+entidad+'_lotes_conccc[inm_tpav="T"] {'+'polygon-fill: #FF2900;'+'}'
            ,
            ripio : '' +
            '#e'+entidad+'_lotes_conccc[inm_tpav="R"] {'+'polygon-fill: #894c4c;'+'}'
            ,
            nohab : '' +
            '#e'+entidad+'_lotes_conccc[inm_tpav="R"] {'+'polygon-fill: #894c4c;'+'}'
            ,
            sindatos : '' +
            '#e'+entidad+'_lotes_conccc[inm_tpav=null] {'+'polygon-fill: #FFCC00;'+'}'
        }
        ,
        // red highlight
        red : '' +
            '#e'+entidad+'_lotes_conccc{'+
                'polygon-fill: #006D2C;' +'polygon-opacity: 0.8;' +'line-color: #FFF;' +'line-width: 0.5;' +'line-opacity: 1;' +
            '}'
        ,
        notificaciones: '' +
        '#e'+entidad+'_lotes_conccc {'+
            'polygon-opacity: 0.7;'+'line-color: #000000;'+'line-width: 0.5;'+'line-opacity: 0.5;'+
        '}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=9] {'+'polygon-fill: #69A9DC;'+'}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=6] {'+'polygon-fill: #95AD42;'+'}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=7] {'+'polygon-fill: #38A73B;'+'}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=4] {'+'polygon-fill: #2A722F;'+'}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=1] {'+'polygon-fill: #FDD344;'+'}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=2] {'+'polygon-fill: #CD9335;'+'}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=3] {'+'polygon-fill: #DF7C2B;'+'}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=8] {'+'polygon-fill: #F73235;'+'}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=5] {'+'polygon-fill: #FF9900;'+'}'+
        '#e'+entidad+'_lotes_conccc[tipo_instancia=null] {'+'polygon-fill: #FFFFFF;'+'}',
        migracion: '' +
        '#e'+entidad+'_lotes_conccc {'+
            'polygon-opacity: 0.7;'+'line-color: #FFF;'+'line-width: 0.5;'+'line-opacity: 1;'+
        '}'+
        '#e'+entidad+'_lotes_conccc[actualizacion_status=0] {'+'polygon-fill: #5CA2D1;'+'}'+
        '#e'+entidad+'_lotes_conccc[actualizacion_status=1] {'+'polygon-fill: #229A00;'+'}'
        ,
        migraciontipo: '' +
        '#e'+entidad+'_lotes_conccc {'+
            'polygon-opacity: 0.7;'+ 'line-color: #FFF;'+ 'line-width: 0.5;'+ 'line-opacity: 1;'+
        '}'+
        '#e'+entidad+'_lotes_conccc[actualizacion_codigo=1] {'+'polygon-fill: #79797a;'+'}'+
        '#e'+entidad+'_lotes_conccc[actualizacion_codigo=2] {'+'polygon-fill: #f73235;'+'}'+
        '#e'+entidad+'_lotes_conccc[actualizacion_codigo=3] {'+'polygon-fill: #447fbf;'+'}'+
        '#e'+entidad+'_lotes_conccc[actualizacion_codigo=4] {'+'polygon-fill: #154a18;'+'}',
        baldios : {
            todos: '' +
                '#e' + entidad + '_lotes_conccc {' + 'polygon-opacity: 0.7;' + 'line-color: #FFF;' + 'line-width: 0.5;' + 'line-opacity: 1;' + '}' +
                '#e' + entidad + '_lotes_conccc{' +
                    '[valor_porcentaje=0] {polygon-fill: #F11810;}' +
                    '[valor_porcentaje >0][valor_porcentaje <=10]{polygon-fill: #FF6600;}' +
                    '[valor_porcentaje > 10] {polygon-fill: #229A00;}' +
                    '[valor_porcentaje=null] {polygon-fill: #FFCC00;}' +
                '}',
            baldio: '#e' + entidad + '_lotes_conccc[valor_porcentaje = 0] {' + 'polygon-fill: #F11810;' + '}',
            baldioconst: '#e' + entidad + '_lotes_conccc[valor_porcentaje >0][valor_porcentaje <=10] {' + 'polygon-fill: #FF6600;' + '}',
            nobaldio: '#e' + entidad + '_lotes_conccc[valor_porcentaje > 10] {' + 'polygon-fill: #229A00;' + '}',
            sindatos: '#e' + entidad + '_lotes_conccc[valor_porcentaje = null] {' + 'polygon-fill: #FFCC00;' + '}'
        },
        lotes_recoleccion: '' +
            '#e9999_lotes_conccc {' + 'polygon-opacity: 0.7;' + 'line-color: #FFF;' + 'line-width: 0.5;' + 'line-opacity: 1;' + '}' +
            '#e9999_lotes_conccc[ruta_id="1"] {' + 'polygon-fill: #A53ED5;' + '}' +
            '#e9999_lotes_conccc[ruta_id="2"] {' + 'polygon-fill: #229A00;' + '}',
        sigem: {
            todos: '' +
                '#e'+entidad+'_lotes {' + 'polygon-opacity: 0.7;' + 'line-color: #FFF;' + 'line-width: 0.5;' + 'line-opacity: 1;' + '}' +
                '#e9999_lotes[inm_estado="ACT"] {' + 'polygon-fill: #229A00;' + '}' +
                '#e9999_lotes[inm_estado="FRA"] {' + 'polygon-fill: #229A00;' + '}' +
                '#e9999_lotes[inm_estado="NOT"] {' + 'polygon-fill: #229A00;' + '}' +
                '#e9999_lotes[inm_estado=null] {' + 'polygon-fill: #F11810;' + '}',
            conficha: ''+
                '#e9999_lotes[inm_estado="ACT"] {' + 'polygon-fill: #229A00;' + '}' +
                '#e9999_lotes[inm_estado="FRA"] {' + 'polygon-fill: #229A00;' + '}' +
                '#e9999_lotes[inm_estado="NOT"] {' + 'polygon-fill: #229A00;' + '}',
            sinficha: '#e9999_lotes[inm_estado=null] {' + 'polygon-fill: #F11810;' + '}'
        },
        nuevos: '' +
        '#e' + entidad + '_lotes_conccc {' + 'polygon-opacity: 0.3;' + 'line-color: #FFF;' + 'line-width: 0.7;' + 'line-opacity: 0.5;' + '}' +
        '#e' + entidad + '_lotes_conccc{' +
            '[valor_porcentaje=0] {polygon-fill: #F11810;}' +
            '[valor_porcentaje >0][valor_porcentaje <=10]{polygon-fill: #FF6600;}' +
            '[valor_porcentaje > 10] {polygon-fill: #229A00;}' +
            '[valor_porcentaje=null] {polygon-fill: #FFCC00;}' +
        '}',
        nuevoszoom: '' +
        '#e' + entidad + '_lotes_conccc {' + 'polygon-opacity: 0.3;' +  'line-color: #FFF;' + 'line-width: 0.5;' + 'line-opacity: 1;' + '}' +
        '#e' + entidad + '_lotes_conccc{' +
        '[valor_porcentaje=0] {polygon-fill: #F11810;}' +
        '[valor_porcentaje >0][valor_porcentaje <=10]{polygon-fill: #FF6600;}' +
        '[valor_porcentaje > 10] {polygon-fill: #229A00;}' +
        '[valor_porcentaje=null] {polygon-fill: #FFCC00;}' +
        '}'+
        '#e'+entidad+'_lotes_concc::labels [zoom > 18] {'+
        'text-name: [cc_lote];'+ 'text-face-name: "DejaVu Sans Book";'+
        'text-size: 20;'+ 'text-label-position-tolerance: 10;'+ 'text-fill: #FFF;'+
        'text-dy: 0;'+'text-opacity: 0.5;'+'text-allow-overlap: false;'+
        'text-placement: point;'+'text-placement-type: simple;'+
        '}',
        mejoras: '' +
            '#e'+entidad+'_mejoras{polygon-fill: #A53ED5; polygon-opacity: 0.6; line-color: #FFF; line-width: 0.5; line-opacity: 1;}',
        estado_mejoras: '' +
            '#e505_mejoras {' + 'polygon-opacity: 0.7;' + 'line-color: #000000;' + 'line-width: 0.5;' + '   line-opacity: 0;' + '}' +
            '#e505_mejoras[layer="MEJORAS-CARGADAS"] {' + 'polygon-fill: #229A00;' + '}' +
            '#e505_mejoras[layer=null] {' + 'polygon-fill: #1F78B4;' + '}',
        estado_lotes: '' +
            '#e505_lotes_conccc {' + 'polygon-opacity: 0.7;' + 'line-color: #000000;' + 'line-width: 0.1;' + 'line-opacity: 0.6;' + '}' +
            '#e505_lotes_conccc[layer="DATOS-EDITADOS"] {' + 'polygon-fill: #229A00;' + '}' +
            '#e505_lotes_conccc[layer="LOTES-EDITADOS"] {' + 'polygon-fill: #5CA2D1;' + '}' +
            '#e505_lotes_conccc[layer=null] {' + 'polygon-fill: #FFFFFF;' + '}'
    };
})();

app.leyendas = (function () {
    return {
        pavimento: {title: "Tipo de Pavimento",
            items: [
                {color: "#222222", label: "Asfalto"},
                {color: "#6ba75f", label: "Hormigón"},
                {color: "#305784", label: "Empedrado"},
                {color: "#6ba75f", label: "Adoquín"},
                {color: "#FF2900", label: "Tierra"},
                {color: "#894c4c", label: "Ripio"},
                {color: "#FFCC00", label: "Sin Datos"},
            ]
        },
        zonas: {title: "Tipos de Zona",
            items: [
                {color: "#229A00", label: "Rural"},
                {color: "#2167AB", label: "Urbano"},
                {color: "#FFA300", label: "Sin Datos"},
            ]
        },
        zonastributarias: {title: "Zonas Tributarias",
            items: [
                {color: "#229A00", label: "R-1-1"},
                {color: "#F84F40", label: "U-1-0"},
                {color: "#0F3B82", label: "U-2-0"},
                {color: "#ffff00", label: "U-3-0"},
                {color: "#ff0000", label: "U-4-0"},
                {color: "#000000", label: "Sin Datos"},
            ]
        },
        notificaciones: {title: "Notificaciones",
            items: [
                {color: "#69a9dc", label: "INICIO SEGUIMIENTO"},
                {color: "#95ad42", label: "RELIQUID. y ACTUALIZ."},
                {color: "#38a73b", label: "EMIS. 1RA NOTIF."},
                {color: "#2a722f", label: "1RA NOTIF. ENTREGADA"},
                {color: "#fdd344", label: "EMIS. 2DA NOTIF."},
                {color: "#cd9335", label: "2DA NOTIF. ENTREGADA"},
                {color: "#df7c2b", label: "EMIS. CERTIF. DEUDA"},
                {color: "#f73235", label: "JUICIO EJECUTIVO"},
                {color: "#FFFFFF", label: "SIN DATOS"},
            ]
        },
        migracion: {title: "Estado Migracion",
            items: [
                {color: "#5CA2D1", label: "SIN ACTUALIZACIONES"},
                {color: "#229A00", label: "ACTUALIZADO"},
            ]
        },
        migraciontipo: {title: "Estado Migracion",
            items: [
                {color: "#79797a", label: "Linea de Base"},
                {color: "#f73235", label: "Zonas Tributarias"},
                {color: "#447fbf", label: "Frentes"},
                {color: "#154a18", label: "Frentes y Zonas"},
            ]
        },
        baldios: {title: "Estado LOTE",
            items: [
                {color: "#F11810", label: "LOTE BALDIO"},
                {color: "#FF6600", label: "BALDIO C/ CONSTRUC."},
                {color: "#229A00", label: "LOTE NO BALDIO"},
                {color: "#FFCC00", label: "SIN DATOS"},
            ]
        },
        estado_lotes: {title: "ACT. DE LOTES",
            items: [
                {color: "#229A00", label: "DATOS EDITADOS"},
                {color: "#5CA2D1", label: "LOTES EDITADOS"},
                {color: "#FFFFFF", label: "LINEA BASE"},
            ]
        },
        estado_mejoras: {title: "ACT. DE MEJORAS",
            items: [
                {color: "#229A00", label: "MEJORAS NUEVAS"},
                {color: "#5CA2D1", label: "CARGA MASIVA"},
            ]
        }
    }

})();
GitLab Appliance - Powered by TurnKey Linux