From c90a99dd12e14d3c1b55b6f706c40542e0a52b05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Camilo=20Gonz=C3=A1lez?= Date: Mon, 27 Jan 2025 15:06:26 -0500 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20Usar=20datos=20geo=20desde?= =?UTF-8?q?=20sitio=20y=20no=20bodega=20de=20EnFlujo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aplicaciones/www/src/componentes/Mapa.astro | 4 +++- aplicaciones/www/src/utilidades/cerebro.ts | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/aplicaciones/www/src/componentes/Mapa.astro b/aplicaciones/www/src/componentes/Mapa.astro index 6d7c3f2..5a4ada2 100644 --- a/aplicaciones/www/src/componentes/Mapa.astro +++ b/aplicaciones/www/src/componentes/Mapa.astro @@ -489,13 +489,15 @@ const { ancho, alto } = Astro.props; stroke-opacity: 0.5; stroke-width: 0.5px; - .departamento { + .departamento, + .municipio { cursor: pointer; } .seleccionada { stroke-opacity: 1; stroke-width: 2px; + filter: drop-shadow(3px 3px 2px rgba(0, 0, 0, 0.4)); } } diff --git a/aplicaciones/www/src/utilidades/cerebro.ts b/aplicaciones/www/src/utilidades/cerebro.ts index aa6a284..7160f45 100644 --- a/aplicaciones/www/src/utilidades/cerebro.ts +++ b/aplicaciones/www/src/utilidades/cerebro.ts @@ -40,7 +40,7 @@ export async function datosMapaMunicipio() { if (cargando) cargador.classList.add('visible'); }, 150); - const respuesta = await pedirDatos('https://enflujo.com/bodega/colombia/municipios.json'); + const respuesta = await pedirDatos(`${import.meta.env.BASE_URL}/datos-geo/municipios.json`); respuesta.features.forEach((mun) => { const departamento = datosColombia.value.dep.features.find((dep) => dep.properties.nombre === mun.properties.dep); if (departamento) { @@ -96,8 +96,9 @@ export async function cargarDatos() { // Cargar datos departamentos const deps = await pedirDatos>( - 'https://enflujo.com/bodega/colombia/departamentos.json' + `${import.meta.env.BASE_URL}/datos-geo/departamentos.json` ); + console.log(deps); deps.features.forEach((dep, i) => { dep.properties.color = obtenerVariableCSS(`--color${i}`); if (dep.properties.codigo === '88') {