@datosgeo-atdt/geo-ui 0.9.1 → 0.9.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -309,25 +309,32 @@ Puedes usar **fuentes de datos separadas** para entidades y municipios. Cuando e
309
309
  **Ejemplo completo con popup y CSV dual:**
310
310
  ```tsx
311
311
  <MapaPMTiles
312
- // Vista inicial: entidades
312
+ // Vista inicial: entidades con clasificación booleana
313
313
  csvUrl="https://example.com/datos_entidades.csv"
314
- field="poblacion_total"
314
+ field="tiene_cobertura"
315
+ mode="boolean"
315
316
 
316
- // Drill-down: municipios
317
+ // Drill-down: municipios con clasificación Jenks
317
318
  csvUrlMunicipios="https://example.com/datos_municipios.csv"
318
- fieldMunicipios="densidad"
319
+ fieldMunicipios="poblacion"
320
+ modeMunicipios="jenks"
319
321
 
320
322
  fitToIds={["09", "15", "14"]}
321
- mode="jenks"
322
323
  jenksK={5}
323
324
 
324
- // Popup se adapta automáticamente
325
+ // Popup se adapta automáticamente:
326
+ // - En entidades: solo muestra nombre (sin datos)
327
+ // - En municipios: muestra nombre + datos del CSV municipal
325
328
  enablePopup={true}
326
- popupDataLabel="Valor"
327
- popupDataField="poblacion_total" // En entidades muestra población_total, en municipios muestra densidad
329
+ popupDataLabel="Habitantes"
330
+ popupDataField="poblacion"
328
331
  />
329
332
  ```
330
333
 
334
+ **Comportamiento del popup con CSV dual:**
335
+ - **Vista de entidades**: Solo muestra el nombre (ej: "Ciudad de México") sin datos adicionales
336
+ - **Vista de municipios** (después del click): Muestra nombre del municipio + valor del CSV municipal (ej: "Azcapotzalco - Habitantes: 385,000")
337
+
331
338
  ## Props
332
339
 
333
340
  ### Props Obligatorias
@@ -362,6 +369,7 @@ Puedes usar **fuentes de datos separadas** para entidades y municipios. Cuando e
362
369
  | `csvFileMunicipios` | `File` | `undefined` | Archivo File local para municipios (usado cuando hay drill-down interactivo) |
363
370
  | `joinCsvKeyMunicipios` | `string` | `"cvegeo"` | Campo del CSV municipal para hacer el join (por defecto usa cvegeo de 5 dígitos) |
364
371
  | `fieldMunicipios` | `string` | `field` | Campo del CSV municipal con los valores a visualizar (por defecto usa el mismo `field` de entidades) |
372
+ | `modeMunicipios` | `"boolean" \| "jenks"` | `mode` | Modo de estilo para municipios (permite usar diferente clasificación que entidades) |
365
373
 
366
374
  ## Modos de Estilo
367
375
 
@@ -25,6 +25,7 @@ export interface MapaPMTilesProps {
25
25
  csvFileMunicipios?: File;
26
26
  joinCsvKeyMunicipios?: string;
27
27
  fieldMunicipios?: string;
28
+ modeMunicipios?: 'boolean' | 'jenks';
28
29
  }
29
30
  export declare const MapaPMTiles: React.FC<MapaPMTilesProps>;
30
31
  //# sourceMappingURL=MapaPMTiles.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MapaPMTiles.d.ts","sourceRoot":"","sources":["../../src/components/MapaPMTiles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,OAAO,mBAAmB,CAAC;AAE3B,MAAM,WAAW,gBAAgB;IAC/B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,IAAI,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,SAAS,GAAG,OAAO,CAAC;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,WAAW,CAAC,EAAE;QACZ,MAAM,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAC1B,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IACF,QAAQ,CAAC,EAAE,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