{"id":21166,"date":"2026-07-08T12:22:43","date_gmt":"2026-07-08T15:22:43","guid":{"rendered":"https:\/\/www.comodoro.gov.ar\/miciudad\/?p=21166"},"modified":"2026-07-17T11:36:27","modified_gmt":"2026-07-17T14:36:27","slug":"barrios","status":"publish","type":"post","link":"https:\/\/www.comodoro.gov.ar\/miciudad\/2026\/07\/08\/barrios\/","title":{"rendered":"Variables censales por barrio"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"21166\" class=\"elementor elementor-21166\">\n\t\t\t\t<div class=\"elementor-element elementor-element-afae6dc e-flex e-con-boxed e-con e-parent\" data-id=\"afae6dc\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-ded8b6f elementor-widget elementor-widget-html\" data-id=\"ded8b6f\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.css\" \/>\r\n<style>\r\n  \/* Popups compactos: fuerza el mismo interlineado dentro de WordPress *\/\r\n  .leaflet-popup-content { line-height: 1.25 !important; margin: 8px 12px !important; }\r\n  .leaflet-popup-content p, .leaflet-popup-content b { line-height: 1.25 !important; margin: 0 !important; }\r\n<\/style>\r\n\r\n<div class=\"visor-geo\" id=\"visor-poblacion\" style=\"max-width:100%;font-family:system-ui,Segoe UI,Roboto,sans-serif;border:1px solid #e2dfe8;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,0.08);\">\r\n\r\n  <!-- Cabecera del visor: logo + t\u00edtulo + descripci\u00f3n -->\r\n  <div style=\"display:flex;align-items:center;gap:14px;padding:14px 18px;background:#134768;color:#fff;\">\r\n    <div>\r\n      <div style=\"font-size:17px;font-weight:700;line-height:1.2;\">Poblaci\u00f3n y densidad por barrios<\/div>\r\n      <div style=\"font-size:12.5px;opacity:0.9;margin-top:2px;\">Comodoro Rivadavia. 77 barrios. Hac\u00e9 clic en cada barrio para ver poblaci\u00f3n y densidad<\/div>\r\n    <\/div>\r\n    <img decoding=\"async\" src=\"https:\/\/agstnrdz.github.io\/gestor-geoestadistico\/assets\/img\/logotipo_MCR_DGMIT_blanco.png\"\r\n         alt=\"Logo\" style=\"height:44px;width:auto;flex-shrink:0;margin-left:auto;\" onerror=\"this.style.display='none'\">\r\n  <\/div>\r\n\r\n  <div id=\"map-poblacion\" style=\"height:520px;\"><\/div>\r\n<\/div>\r\n\r\n<script src=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.js\"><\/script>\r\n<script src=\"https:\/\/agstnrdz.github.io\/gestor-geoestadistico\/assets\/data\/barrios_data.js\"><\/script>\r\n\r\n<script>\r\n(function () {\r\n  const map = L.map('map-poblacion').setView([-45.83448112101565, -67.49450745314675], 12);\r\n\r\n  \/\/ Mapa base: Argenmap (IGN)\r\n  const argenmap = L.tileLayer('https:\/\/wms.ign.gob.ar\/geoserver\/gwc\/service\/tms\/1.0.0\/capabaseargenmap@EPSG%3A3857@png\/{z}\/{x}\/{-y}.png', {\r\n    attribution: 'Instituto Geogr\u00e1fico Nacional + OpenStreetMap | Fuente: INDEC, 2022. Procesamiento: Modernizaci\u00f3n e Investigaci\u00f3n Territorial',\r\n    minZoom: 3,\r\n    maxZoom: 18\r\n  }).addTo(map);\r\n\r\n  \/\/ Mapa base: Sat\u00e9lite (Google)\r\n  const satelite = L.tileLayer('https:\/\/mt1.google.com\/vt\/lyrs=s&x={x}&y={y}&z={z}', {\r\n    attribution: 'Im\u00e1genes \u00a9 Google | Fuente: INDEC, 2022. Procesamiento: Modernizaci\u00f3n e Investigaci\u00f3n Territorial',\r\n    minZoom: 3,\r\n    maxZoom: 20\r\n  });\r\n\r\n  const breaks = [0, 500, 1800, 5300, 8500];\r\n  const colors = ['#e8e0f5', '#c5aee8', '#9f7ed0', '#7b5ea7', '#4a2d7f'];\r\n  const nullColor = '#d0cdd6';\r\n\r\n  function getColor(val) {\r\n    if (val == null) return nullColor;\r\n    for (let i = breaks.length - 1; i >= 0; i--) if (val >= breaks[i]) return colors[i];\r\n    return colors[0];\r\n  }\r\n\r\n  const barriosLayer = L.geoJSON(BARRIOS_DATA, {\r\n    style: feat => ({\r\n      fillColor:   getColor(feat.properties.dens_pob),\r\n      fillOpacity: 0.75,\r\n      color:       '#070707',\r\n      weight:      1,\r\n      opacity:     0.5\r\n    }),\r\n    onEachFeature: (feat, layer) => {\r\n      const p = feat.properties;\r\n      const pob  = p.pob != null ? Number(p.pob).toLocaleString('es-AR') + ' hab.' : 'Sin dato';\r\n      const dens = p.dens_pob != null ? Number(p.dens_pob).toLocaleString('es-AR') + ' hab\/km\u00b2' : 'Sin dato';\r\n      layer.bindPopup(`<b>${p.Nombre}<\/b><br>Poblaci\u00f3n: ${pob}<br>Densidad: ${dens}`);\r\n      layer.on('mouseover', () => layer.setStyle({ fillOpacity: 0.75, weight: 3 }));\r\n      layer.on('mouseout',  () => layer.setStyle({ fillOpacity: 0.75, weight: 1 }));\r\n    }\r\n  }).addTo(map);\r\n\r\n  \/\/ Control de capas: mapas base (excluyentes) + capa de datos\r\n  L.control.layers(\r\n    { 'Argenmap (IGN)': argenmap, 'Sat\u00e9lite (Google)': satelite },\r\n    { 'Poblaci\u00f3n y densidad': barriosLayer },\r\n    { collapsed: false }\r\n  ).addTo(map);\r\n\r\n  const legend = L.control({ position: 'bottomright' });\r\n  legend.onAdd = function () {\r\n    const div = L.DomUtil.create('div', 'info legend');\r\n    div.style.cssText = 'background:#fff;padding:8px 10px;border-radius:8px;font-size:12px;line-height:1.5;box-shadow:0 1px 4px rgba(0,0,0,0.3)';\r\n    const labels = ['0 \u2013 500', '500 \u2013 1.800', '1.800 \u2013 5.300', '5.300 \u2013 8.500', '> 8.500'];\r\n    div.innerHTML = '<strong>Densidad (hab\/km\u00b2)<\/strong><br>';\r\n    colors.forEach((c, i) => {\r\n      div.innerHTML += `<span style=\"display:inline-block;width:12px;height:12px;background:${c};margin-right:6px;border:1px solid #000\"><\/span>${labels[i]}<br>`;\r\n    });\r\n    return div;\r\n  };\r\n  legend.addTo(map);\r\n})();\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1f1eef5 elementor-widget elementor-widget-html\" data-id=\"1f1eef5\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.css\" \/>\r\n\r\n<style>\r\n  \/* Popups compactos: fuerza el mismo interlineado dentro de WordPress *\/\r\n  .leaflet-popup-content { line-height: 1.25 !important; margin: 8px 12px !important; }\r\n  .leaflet-popup-content p, .leaflet-popup-content b { line-height: 1.25 !important; margin: 0 !important; }\r\n<\/style>\r\n\r\n<div class=\"visor-geo\" id=\"visor-sexo\" style=\"max-width:100%;font-family:system-ui,Segoe UI,Roboto,sans-serif;border:1px solid #e2dfe8;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,0.08);\">\r\n\r\n  <div style=\"display:flex;align-items:center;gap:14px;padding:14px 18px;background:#134768;color:#fff;\">\r\n    <div>\r\n      <div style=\"font-size:17px;font-weight:700;line-height:1.2;\">Distribuci\u00f3n por sexo por barrios<\/div>\r\n      <div style=\"font-size:12.5px;opacity:0.9;margin-top:2px;\">Comodoro Rivadavia. 77 barrios. Azul: mayor\u00eda de varones \u00b7 Rosa: mayor\u00eda de mujeres<\/div>\r\n    <\/div>\r\n    <img decoding=\"async\" src=\"https:\/\/agstnrdz.github.io\/gestor-geoestadistico\/assets\/img\/logotipo_MCR_DGMIT_blanco.png\"\r\n         alt=\"Logo\" style=\"height:44px;width:auto;flex-shrink:0;margin-left:auto;\" onerror=\"this.style.display='none'\">\r\n  <\/div>\r\n\r\n  <div id=\"map-sexo\" style=\"height:520px;\"><\/div>\r\n<\/div>\r\n\r\n<script src=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.js\"><\/script>\r\n<script src=\"https:\/\/agstnrdz.github.io\/gestor-geoestadistico\/assets\/data\/barrios_sexo_data.js\"><\/script>\r\n\r\n<script>\r\n(function () {\r\n  const map = L.map('map-sexo').setView([-45.83448112101565, -67.49450745314675], 12);\r\n\r\n  const argenmap = L.tileLayer('https:\/\/wms.ign.gob.ar\/geoserver\/gwc\/service\/tms\/1.0.0\/capabaseargenmap@EPSG%3A3857@png\/{z}\/{x}\/{-y}.png', {\r\n    attribution: 'Instituto Geogr\u00e1fico Nacional + OpenStreetMap | Fuente: INDEC, 2022. Procesamiento: Modernizaci\u00f3n e Investigaci\u00f3n Territorial',\r\n    minZoom: 3,\r\n    maxZoom: 18\r\n  }).addTo(map);\r\n\r\n  \/\/ Mapa base: Sat\u00e9lite (Google)\r\n  const satelite = L.tileLayer('https:\/\/mt1.google.com\/vt\/lyrs=s&x={x}&y={y}&z={z}', {\r\n    attribution: 'Im\u00e1genes \u00a9 Google | Fuente: INDEC, 2022. Procesamiento: Modernizaci\u00f3n e Investigaci\u00f3n Territorial',\r\n    minZoom: 3,\r\n    maxZoom: 20\r\n  });\r\n\r\n  \/\/ Escala divergente: % de mujeres por barrio\r\n  const breaks = [47, 49, 51, 53];\r\n  const colors = ['#2166ac', '#92c5de', '#f7f7f7', '#f4a582', '#b5546a'];\r\n  const labels = ['< 47 % mujeres', '47 \u2013 49 %', '49 \u2013 51 % (equilibrado)', '51 \u2013 53 %', '> 53 % mujeres'];\r\n  const nullColor = '#d0cdd6';\r\n\r\n  function getColor(pct) {\r\n    if (pct == null) return nullColor;\r\n    for (let i = 0; i < breaks.length; i++) if (pct < breaks[i]) return colors[i];\r\n    return colors[colors.length - 1];\r\n  }\r\n\r\n  function pctMujeres(p) {\r\n    return p.total > 0 ? (p.mujer \/ p.total) * 100 : null;\r\n  }\r\n\r\n  const capa = L.geoJSON(BARRIOS_SEXO_DATA, {\r\n    style: feat => ({\r\n      fillColor:   getColor(pctMujeres(feat.properties)),\r\n      fillOpacity: 0.75,\r\n      color:       '#070707',\r\n      weight:      1,\r\n      opacity:     0.5\r\n    }),\r\n    onEachFeature: (feat, layer) => {\r\n      const p = feat.properties;\r\n      const pctM = p.total > 0 ? ((p.mujer \/ p.total) * 100).toFixed(1) + '%' : '\u2014';\r\n      const pctV = p.total > 0 ? ((p.varon \/ p.total) * 100).toFixed(1) + '%' : '\u2014';\r\n      const fmt = v => v != null ? Number(v).toLocaleString('es-AR') : 'Sin dato';\r\n      layer.bindPopup(`<b>${p.nombre}<\/b><br>Mujeres: ${fmt(p.mujer)} (${pctM})<br>Varones: ${fmt(p.varon)} (${pctV})<br>Total: ${fmt(p.total)}`);\r\n      layer.on('mouseover', () => layer.setStyle({ fillOpacity: 0.75, weight: 3 }));\r\n      layer.on('mouseout',  () => layer.setStyle({ fillOpacity: 0.75, weight: 1 }));\r\n    }\r\n  }).addTo(map);\r\n\r\n  \/\/ Control de capas: mapas base (excluyentes) + capa de datos\r\n  L.control.layers(\r\n    { 'Argenmap (IGN)': argenmap, 'Sat\u00e9lite (Google)': satelite },\r\n    { 'Distribuci\u00f3n por sexo': capa },\r\n    { collapsed: false }\r\n  ).addTo(map);\r\n\r\n  const legend = L.control({ position: 'bottomright' });\r\n  legend.onAdd = function () {\r\n    const div = L.DomUtil.create('div', 'info legend');\r\n    div.style.cssText = 'background:#fff;padding:8px 10px;border-radius:8px;font-size:12px;line-height:1.5;box-shadow:0 1px 4px rgba(0,0,0,0.3)';\r\n    div.innerHTML = '<strong>% de mujeres<\/strong><br>';\r\n    colors.forEach((c, i) => {\r\n      div.innerHTML += `<span style=\"display:inline-block;width:12px;height:12px;background:${c};margin-right:6px;border:1px solid #999\"><\/span>${labels[i]}<br>`;\r\n    });\r\n    div.innerHTML += `<span style=\"display:inline-block;width:12px;height:12px;background:${nullColor};margin-right:6px;border:1px solid #999\"><\/span>Sin dato<br>`;\r\n    return div;\r\n  };\r\n  legend.addTo(map);\r\n})();\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t<div class=\"elementor-element elementor-element-4faec27 e-flex e-con-boxed e-con e-parent\" data-id=\"4faec27\" data-element_type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-56654d7 elementor-widget elementor-widget-html\" data-id=\"56654d7\" data-element_type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<link rel=\"stylesheet\" href=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.css\" \/>\r\n<style>\r\n  \/* Popups compactos: fuerza el mismo interlineado dentro de WordPress *\/\r\n  .leaflet-popup-content { line-height: 1.25 !important; margin: 8px 12px !important; }\r\n  .leaflet-popup-content p, .leaflet-popup-content b { line-height: 1.25 !important; margin: 0 !important; }\r\n  .leaflet-popup-content table td { line-height: 1.2 !important; padding-top: 0 !important; padding-bottom: 0 !important; }\r\n<\/style>\r\n\r\n<div class=\"visor-geo\" id=\"visor-instruccion\" style=\"max-width:100%;font-family:system-ui,Segoe UI,Roboto,sans-serif;border:1px solid #e2dfe8;border-radius:12px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,0.08);\">\r\n\r\n  <div style=\"display:flex;align-items:center;gap:14px;padding:14px 18px;background:#134768;color:#fff;\">\r\n    <div>\r\n      <div style=\"font-size:17px;font-weight:700;line-height:1.2;\">Nivel de instrucci\u00f3n por barrios<\/div>\r\n      <div style=\"font-size:12.5px;opacity:0.9;margin-top:2px;\">Comodoro Rivadavia. 77 barrios. Eleg\u00ed un indicador en el selector del mapa<\/div>\r\n    <\/div>\r\n    <img decoding=\"async\" src=\"https:\/\/agstnrdz.github.io\/gestor-geoestadistico\/assets\/img\/logotipo_MCR_DGMIT_blanco.png\"\r\n         alt=\"Logo\" style=\"height:44px;width:auto;flex-shrink:0;margin-left:auto;\" onerror=\"this.style.display='none'\">\r\n  <\/div>\r\n\r\n  <div id=\"map-instruccion\" style=\"height:520px;\"><\/div>\r\n<\/div>\r\n\r\n<script src=\"https:\/\/unpkg.com\/leaflet@1.9.4\/dist\/leaflet.js\"><\/script>\r\n<script src=\"https:\/\/agstnrdz.github.io\/gestor-geoestadistico\/assets\/data\/barrios_nivel_instruccion_data.js\"><\/script>\r\n\r\n<script>\r\n(function () {\r\n  const map = L.map('map-instruccion').setView([-45.83448112101565, -67.49450745314675], 12);\r\n\r\n  const argenmap = L.tileLayer('https:\/\/wms.ign.gob.ar\/geoserver\/gwc\/service\/tms\/1.0.0\/capabaseargenmap@EPSG%3A3857@png\/{z}\/{x}\/{-y}.png', {\r\n    attribution: 'Instituto Geogr\u00e1fico Nacional + OpenStreetMap | Fuente: INDEC, 2022. Procesamiento: Modernizaci\u00f3n e Investigaci\u00f3n Territorial',\r\n    minZoom: 3,\r\n    maxZoom: 18\r\n  }).addTo(map);\r\n\r\n  \/\/ Mapa base: Sat\u00e9lite (Google)\r\n  const satelite = L.tileLayer('https:\/\/mt1.google.com\/vt\/lyrs=s&x={x}&y={y}&z={z}', {\r\n    attribution: 'Im\u00e1genes \u00a9 Google | Fuente: INDEC, 2022. Procesamiento: Modernizaci\u00f3n e Investigaci\u00f3n Territorial',\r\n    minZoom: 3,\r\n    maxZoom: 20\r\n  });\r\n\r\n  const CAMPOS = [\r\n    { key: 'sin_instruccion', label: 'Sin instrucci\u00f3n' },\r\n    { key: 'prim_incompleto', label: 'Primario incompleto' },\r\n    { key: 'prim_completo',   label: 'Primario completo' },\r\n    { key: 'sec_incompleto',  label: 'Secundario incompleto' },\r\n    { key: 'sec_completo',    label: 'Secundario completo' },\r\n    { key: 'terc_incompleto', label: 'Terciario incompleto' },\r\n    { key: 'terc_completo',   label: 'Terciario completo' },\r\n    { key: 'univ_incompleto', label: 'Universitario incompleto' },\r\n    { key: 'univ_completo',   label: 'Universitario completo' },\r\n    { key: 'pos_incompleto',  label: 'Posgrado incompleto' },\r\n    { key: 'pos_completo',    label: 'Posgrado completo' }\r\n  ];\r\n\r\n  const INDICADORES = [\r\n    { key: 'sin_instruccion',   label: 'Sin instrucci\u00f3n',\r\n      campos: ['sin_instruccion'],\r\n      breaks: [8, 10, 12, 14],  labels: ['< 8 %', '8 \u2013 10 %', '10 \u2013 12 %', '12 \u2013 14 %', '\u2265 14 %'],\r\n      colores: ['#fee5d9', '#fcae91', '#fb6a4a', '#de2d26', '#a50f15'] },\r\n    { key: 'primario',          label: 'Nivel primario',\r\n      campos: ['prim_incompleto', 'prim_completo'],\r\n      breaks: [15, 22, 28, 35], labels: ['< 15 %', '15 \u2013 22 %', '22 \u2013 28 %', '28 \u2013 35 %', '\u2265 35 %'],\r\n      colores: ['#feedde', '#fdbe85', '#fd8d3c', '#e6550d', '#a63603'] },\r\n    { key: 'secundario',        label: 'Nivel secundario',\r\n      campos: ['sec_incompleto', 'sec_completo'],\r\n      breaks: [35, 42, 45, 48], labels: ['< 35 %', '35 \u2013 42 %', '42 \u2013 45 %', '45 \u2013 48 %', '\u2265 48 %'],\r\n      colores: ['#eff3ff', '#bdd7e7', '#6baed6', '#2171b5', '#084594'] },\r\n    { key: 'superior',          label: 'Nivel superior (terc\/univ\/pos)',\r\n      campos: ['terc_incompleto', 'terc_completo', 'univ_incompleto', 'univ_completo', 'pos_incompleto', 'pos_completo'],\r\n      breaks: [12, 20, 28, 38], labels: ['< 12 %', '12 \u2013 20 %', '20 \u2013 28 %', '28 \u2013 38 %', '\u2265 38 %'],\r\n      colores: ['#edf8e9', '#bae4b3', '#74c476', '#31a354', '#006d2c'] },\r\n    { key: 'superior_completo', label: 'Superior completo',\r\n      campos: ['terc_completo', 'univ_completo', 'pos_completo'],\r\n      breaks: [4, 7, 12, 20],   labels: ['< 4 %', '4 \u2013 7 %', '7 \u2013 12 %', '12 \u2013 20 %', '\u2265 20 %'],\r\n      colores: ['#f2f0f7', '#cbc9e2', '#9e9ac8', '#756bb1', '#54278f'] }\r\n  ];\r\n\r\n  const nullColor = '#d0cdd6';\r\n  let indActivo = INDICADORES.find(i => i.key === 'secundario');\r\n\r\n  const calcTotal = p => CAMPOS.reduce((s, c) => s + (p[c.key] || 0), 0);\r\n  function calcPct(p, ind) {\r\n    const total = calcTotal(p);\r\n    if (!total) return null;\r\n    return ind.campos.reduce((s, k) => s + (p[k] || 0), 0) \/ total * 100;\r\n  }\r\n  function getColor(pct, ind) {\r\n    if (pct === null) return nullColor;\r\n    for (let i = ind.breaks.length - 1; i >= 0; i--) if (pct >= ind.breaks[i]) return ind.colores[i + 1];\r\n    return ind.colores[0];\r\n  }\r\n  const estilo = feat => ({\r\n    fillColor:   getColor(calcPct(feat.properties, indActivo), indActivo),\r\n    fillOpacity: 0.75,\r\n    color:       '#070707',\r\n    weight:      1,\r\n    opacity:     0.5\r\n  });\r\n\r\n  function makePopup(p) {\r\n    const total = calcTotal(p);\r\n    const filas = CAMPOS.map(c => {\r\n      const v = p[c.key] || 0;\r\n      const pct = total ? (v \/ total * 100).toFixed(1) : '\u2014';\r\n      return `<tr><td style=\"padding:1px 8px 1px 0;color:#555\">${c.label}<\/td><td style=\"text-align:right\">${v.toLocaleString('es-AR')} <span style=\"color:#999\">(${pct}%)<\/span><\/td><\/tr>`;\r\n    }).join('');\r\n    return `<b>${p.nombre}<\/b><br>Total relevado: ${total.toLocaleString('es-AR')} personas<table style=\"font-size:11px;margin-top:4px;border-collapse:collapse\">${filas}<\/table>`;\r\n  }\r\n\r\n  const capa = L.geoJSON(BARRIOS_NIVEL_INSTRUCCION_DATA, {\r\n    style: estilo,\r\n    onEachFeature: (feat, layer) => {\r\n      layer.bindPopup(makePopup(feat.properties), { maxWidth: 320 });\r\n      layer.on('mouseover', () => layer.setStyle({ fillOpacity: 0.75, weight: 3 }));\r\n      layer.on('mouseout',  () => layer.setStyle(estilo(feat)));\r\n    }\r\n  }).addTo(map);\r\n\r\n  \/\/ Control de capas: mapas base (excluyentes) + capa de datos\r\n  L.control.layers(\r\n    { 'Argenmap (IGN)': argenmap, 'Sat\u00e9lite (Google)': satelite },\r\n    { 'Nivel de instrucci\u00f3n': capa },\r\n    { collapsed: false }\r\n  ).addTo(map);\r\n\r\n  \/\/ Selector de indicador (arriba a la derecha)\r\n  const selector = L.control({ position: 'topright' });\r\n  selector.onAdd = function () {\r\n    const div = L.DomUtil.create('div');\r\n    div.style.cssText = 'background:#fff;padding:6px 8px;border-radius:8px;box-shadow:0 1px 4px rgba(0,0,0,0.3)';\r\n    const opts = INDICADORES.map(i => `<option value=\"${i.key}\"${i.key === indActivo.key ? ' selected' : ''}>${i.label}<\/option>`).join('');\r\n    div.innerHTML = `<select id=\"sel-indicador\" style=\"font-size:12px;max-width:200px\">${opts}<\/select>`;\r\n    L.DomEvent.disableClickPropagation(div);\r\n    return div;\r\n  };\r\n  selector.addTo(map);\r\n\r\n  \/\/ Leyenda din\u00e1mica\r\n  const legend = L.control({ position: 'bottomright' });\r\n  legend.onAdd = function () {\r\n    const div = L.DomUtil.create('div', 'info legend');\r\n    div.id = 'leyenda-instruccion';\r\n    div.style.cssText = 'background:#fff;padding:8px 10px;border-radius:8px;font-size:12px;line-height:1.5;box-shadow:0 1px 4px rgba(0,0,0,0.3)';\r\n    return div;\r\n  };\r\n  legend.addTo(map);\r\n\r\n  function updateLeyenda() {\r\n    const div = document.getElementById('leyenda-instruccion');\r\n    div.innerHTML = `<strong>${indActivo.label} (%)<\/strong><br>`;\r\n    indActivo.colores.forEach((c, i) => {\r\n      div.innerHTML += `<span style=\"display:inline-block;width:12px;height:12px;background:${c};margin-right:6px;border:1px solid #999\"><\/span>${indActivo.labels[i]}<br>`;\r\n    });\r\n    div.innerHTML += `<span style=\"display:inline-block;width:12px;height:12px;background:${nullColor};margin-right:6px;border:1px solid #999\"><\/span>Sin dato<br>`;\r\n  }\r\n  updateLeyenda();\r\n\r\n  document.getElementById('sel-indicador').addEventListener('change', function () {\r\n    indActivo = INDICADORES.find(i => i.key === this.value);\r\n    capa.setStyle(estilo);\r\n    updateLeyenda();\r\n  });\r\n})();\r\n<\/script>\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Entrada de prueba con visores html insertados llamando capas .js desde el repo remoto.<\/p>\n","protected":false},"author":1,"featured_media":21243,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[269],"tags":[],"class_list":["post-21166","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visores"],"_links":{"self":[{"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/posts\/21166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/comments?post=21166"}],"version-history":[{"count":23,"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/posts\/21166\/revisions"}],"predecessor-version":[{"id":21248,"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/posts\/21166\/revisions\/21248"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/media\/21243"}],"wp:attachment":[{"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/media?parent=21166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/categories?post=21166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.comodoro.gov.ar\/miciudad\/wp-json\/wp\/v2\/tags?post=21166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}