@datosgeo-atdt/geo-ui 0.3.1 → 0.4.0
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 +35 -0
- package/dist/components/MapaPMTiles.d.ts +4 -0
- package/dist/components/MapaPMTiles.d.ts.map +1 -1
- package/dist/geo-ui.js +3350 -3264
- package/dist/geo-ui.js.map +1 -1
- package/dist/geo-ui.umd.cjs +43 -43
- package/dist/geo-ui.umd.cjs.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,6 +132,37 @@ Muestra **solo** las entidades seleccionadas y ajusta el mapa automáticamente a
|
|
|
132
132
|
- ✅ Calcula y ajusta el bbox combinado sin animación de zoom
|
|
133
133
|
- ✅ Carga directo en la vista correcta
|
|
134
134
|
|
|
135
|
+
### Ejemplo con municipios
|
|
136
|
+
|
|
137
|
+
Cuando usas `fitToIds`, puedes habilitar la visualización de municipios con `showMunicipios`:
|
|
138
|
+
|
|
139
|
+
```tsx
|
|
140
|
+
// Mostrar municipios con datos (aplica el mismo modo que entidades)
|
|
141
|
+
<MapaPMTiles
|
|
142
|
+
csvUrl="https://example.com/datos-entidades.csv"
|
|
143
|
+
fitToIds="01"
|
|
144
|
+
showMunicipios={true}
|
|
145
|
+
municipiosCsvUrl="https://example.com/datos-municipios.csv"
|
|
146
|
+
municipiosField="poblacion"
|
|
147
|
+
mode="jenks"
|
|
148
|
+
/>
|
|
149
|
+
|
|
150
|
+
// Mostrar solo contornos de municipios (sin datos)
|
|
151
|
+
<MapaPMTiles
|
|
152
|
+
csvUrl="https://example.com/datos-entidades.csv"
|
|
153
|
+
fitToIds={["09", "15"]}
|
|
154
|
+
showMunicipios={true}
|
|
155
|
+
/>
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
**Características de la capa de municipios:**
|
|
159
|
+
- ✅ URL del PMTiles de municipios integrada
|
|
160
|
+
- ✅ Filtrado automático por CVE_ENT de las entidades seleccionadas
|
|
161
|
+
- ✅ Join con CVEGEO en mayúsculas
|
|
162
|
+
- ✅ Aplica el mismo modo (boolean/jenks) que las entidades si proporcionas CSV
|
|
163
|
+
- ✅ Si no proporcionas CSV, solo muestra contornos (outline)
|
|
164
|
+
- ✅ El contorno de entidades se hace más grueso cuando se muestran municipios
|
|
165
|
+
|
|
135
166
|
## Props
|
|
136
167
|
|
|
137
168
|
### Props Obligatorias
|
|
@@ -158,6 +189,10 @@ Muestra **solo** las entidades seleccionadas y ajusta el mapa automáticamente a
|
|
|
158
189
|
| `fitToIds` | `string \| string[]` | `undefined` | ID o array de IDs de features para filtrar y hacer zoom automático (sin animación) |
|
|
159
190
|
| `bboxField` | `string` | `"bbox"` | Campo con bbox precalculado en PMTiles |
|
|
160
191
|
| `jenksK` | `number` | `5` | Número de clases para clasificación Jenks |
|
|
192
|
+
| `showMunicipios` | `boolean` | `false` | Habilita la visualización de municipios (requiere `fitToIds`) |
|
|
193
|
+
| `municipiosCsvUrl` | `string` | `undefined` | URL del CSV para unir con municipios (opcional) |
|
|
194
|
+
| `municipiosCsvFile` | `File` | `undefined` | Archivo CSV para unir con municipios (opcional) |
|
|
195
|
+
| `municipiosField` | `string` | `"valor"` | Campo del CSV de municipios con los valores a visualizar |
|
|
161
196
|
|
|
162
197
|
## Modos de Estilo
|
|
163
198
|
|
|
@@ -17,6 +17,10 @@ export interface MapaPMTilesProps {
|
|
|
17
17
|
fitToIds?: string | string[];
|
|
18
18
|
bboxField?: string;
|
|
19
19
|
jenksK?: number;
|
|
20
|
+
showMunicipios?: boolean;
|
|
21
|
+
municipiosCsvUrl?: string;
|
|
22
|
+
municipiosCsvFile?: File;
|
|
23
|
+
municipiosField?: string;
|
|
20
24
|
}
|
|
21
25
|
export declare const MapaPMTiles: React.FC<MapaPMTilesProps>;
|
|
22
26
|
//# 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;AAO3D,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,MAAM,GAAG,MAAM,EAAE,CAAC;IAC7B,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"MapaPMTiles.d.ts","sourceRoot":"","sources":["../../src/components/MapaPMTiles.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAO3D,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,CA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