Skip to content

Commit

Permalink
♻️ Usar datos geo desde sitio y no bodega de EnFlujo
Browse files Browse the repository at this point in the history
  • Loading branch information
1cgonza committed Jan 27, 2025
1 parent 797ff5a commit c90a99d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion aplicaciones/www/src/componentes/Mapa.astro
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}
}

Expand Down
5 changes: 3 additions & 2 deletions aplicaciones/www/src/utilidades/cerebro.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export async function datosMapaMunicipio() {
if (cargando) cargador.classList.add('visible');
}, 150);

const respuesta = await pedirDatos<FeatureCollection>('https://enflujo.com/bodega/colombia/municipios.json');
const respuesta = await pedirDatos<FeatureCollection>(`${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) {
Expand Down Expand Up @@ -96,8 +96,9 @@ export async function cargarDatos() {

// Cargar datos departamentos
const deps = await pedirDatos<FeatureCollection<Polygon | MultiPolygon>>(
'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') {
Expand Down

0 comments on commit c90a99d

Please sign in to comment.