@json_1013/core-geografico-isa-mapa 0.1.0-poc
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 +90 -0
- package/dist-lib/estilos.css +3 -0
- package/dist-lib/index.js +7722 -0
- package/dist-lib/index.js.map +1 -0
- package/dist-lib/standalone.js +16810 -0
- package/dist-lib/standalone.js.map +1 -0
- package/dist-lib/tipos/features/maps/components/ArbolCapas.d.ts +20 -0
- package/dist-lib/tipos/features/maps/components/BarraHerramientas.d.ts +17 -0
- package/dist-lib/tipos/features/maps/components/BotonTridimensional.d.ts +10 -0
- package/dist-lib/tipos/features/maps/components/ComboBuscable.d.ts +23 -0
- package/dist-lib/tipos/features/maps/components/ControlesEscritorio.d.ts +80 -0
- package/dist-lib/tipos/features/maps/components/ControlesResponsive.d.ts +37 -0
- package/dist-lib/tipos/features/maps/components/LecturaCoordenadas.d.ts +9 -0
- package/dist-lib/tipos/features/maps/components/LeyendaCapa.d.ts +5 -0
- package/dist-lib/tipos/features/maps/components/ListaMapasBase.d.ts +11 -0
- package/dist-lib/tipos/features/maps/components/ListadoOpciones.d.ts +25 -0
- package/dist-lib/tipos/features/maps/components/MapaView.d.ts +19 -0
- package/dist-lib/tipos/features/maps/components/MenuOpcionesServicio.d.ts +13 -0
- package/dist-lib/tipos/features/maps/components/MiniaturaBasemap.d.ts +9 -0
- package/dist-lib/tipos/features/maps/components/ModalAlerta.d.ts +22 -0
- package/dist-lib/tipos/features/maps/components/ModalConsulta.d.ts +34 -0
- package/dist-lib/tipos/features/maps/components/ModalCoordenadas.d.ts +10 -0
- package/dist-lib/tipos/features/maps/components/ModalMedicion.d.ts +25 -0
- package/dist-lib/tipos/features/maps/components/ModalProyeccion.d.ts +16 -0
- package/dist-lib/tipos/features/maps/components/PanelCapas.d.ts +18 -0
- package/dist-lib/tipos/features/maps/components/PanelInferior.d.ts +12 -0
- package/dist-lib/tipos/features/maps/components/PanelMetadata.d.ts +10 -0
- package/dist-lib/tipos/features/maps/components/SelectorBasemap.d.ts +17 -0
- package/dist-lib/tipos/features/maps/components/SelectorDesplegable.d.ts +33 -0
- package/dist-lib/tipos/features/maps/components/TablaResultadosConsulta.d.ts +29 -0
- package/dist-lib/tipos/features/maps/components/Tooltip.d.ts +32 -0
- package/dist-lib/tipos/features/maps/components/VisorMapa.d.ts +18 -0
- package/dist-lib/tipos/features/maps/components/VisorMapaSkeleton.d.ts +4 -0
- package/dist-lib/tipos/features/maps/components/iconos.d.ts +51 -0
- package/dist-lib/tipos/features/maps/context/alertas.context.d.ts +32 -0
- package/dist-lib/tipos/features/maps/context/configuracion.context.d.ts +6 -0
- package/dist-lib/tipos/features/maps/hooks/useCoordenadasPuntero.d.ts +11 -0
- package/dist-lib/tipos/features/maps/hooks/useCoordenadasSeleccion.d.ts +4 -0
- package/dist-lib/tipos/features/maps/hooks/useElevarSuperficies.d.ts +10 -0
- package/dist-lib/tipos/features/maps/hooks/useEstadosCapas.d.ts +16 -0
- package/dist-lib/tipos/features/maps/hooks/useGestorCapas.d.ts +16 -0
- package/dist-lib/tipos/features/maps/hooks/useHerramientaActiva.d.ts +14 -0
- package/dist-lib/tipos/features/maps/hooks/useListbox.d.ts +53 -0
- package/dist-lib/tipos/features/maps/hooks/useMarcadorPunto.d.ts +15 -0
- package/dist-lib/tipos/features/maps/hooks/useModalArrastrable.d.ts +33 -0
- package/dist-lib/tipos/features/maps/hooks/useModoResponsive.d.ts +14 -0
- package/dist-lib/tipos/features/maps/hooks/usePanelesInferiores.d.ts +10 -0
- package/dist-lib/tipos/features/maps/hooks/useRenovacionToken.d.ts +3 -0
- package/dist-lib/tipos/features/maps/hooks/useResaltadoConsulta.d.ts +19 -0
- package/dist-lib/tipos/features/maps/hooks/useResultadosConsulta.d.ts +31 -0
- package/dist-lib/tipos/features/maps/hooks/useVistaArcgis.d.ts +17 -0
- package/dist-lib/tipos/features/maps/providers/ProveedorAlertas.d.ts +3 -0
- package/dist-lib/tipos/features/maps/providers/ProveedorConfiguracion.d.ts +14 -0
- package/dist-lib/tipos/features/maps/services/configuracion-aplicacion.d.ts +10 -0
- package/dist-lib/tipos/features/maps/services/entorno.d.ts +8 -0
- package/dist-lib/tipos/features/maps/services/formato-coordenadas.d.ts +4 -0
- package/dist-lib/tipos/features/maps/services/layers/arcgis.factory.d.ts +8 -0
- package/dist-lib/tipos/features/maps/services/layers/consulta-arcgis.d.ts +20 -0
- package/dist-lib/tipos/features/maps/services/layers/consulta-capa-activa.d.ts +56 -0
- package/dist-lib/tipos/features/maps/services/layers/consulta-wfs.d.ts +20 -0
- package/dist-lib/tipos/features/maps/services/layers/consulta.constantes.d.ts +5 -0
- package/dist-lib/tipos/features/maps/services/layers/descarga-capa.d.ts +46 -0
- package/dist-lib/tipos/features/maps/services/layers/error-servicio.d.ts +2 -0
- package/dist-lib/tipos/features/maps/services/layers/geoserver.d.ts +5 -0
- package/dist-lib/tipos/features/maps/services/layers/gestor-capas.d.ts +62 -0
- package/dist-lib/tipos/features/maps/services/layers/identity-manager.d.ts +5 -0
- package/dist-lib/tipos/features/maps/services/layers/leyenda.d.ts +25 -0
- package/dist-lib/tipos/features/maps/services/layers/simbolos-consulta.d.ts +19 -0
- package/dist-lib/tipos/features/maps/services/layers/types.d.ts +19 -0
- package/dist-lib/tipos/features/maps/services/layers/url-sin-query.d.ts +2 -0
- package/dist-lib/tipos/features/maps/services/layers/wms.factory.d.ts +4 -0
- package/dist-lib/tipos/features/maps/services/layers/xml-utils.d.ts +4 -0
- package/dist-lib/tipos/features/maps/services/parametros-generales.d.ts +12 -0
- package/dist-lib/tipos/features/maps/services/proveedor-token.d.ts +20 -0
- package/dist-lib/tipos/features/maps/services/proyeccion.d.ts +37 -0
- package/dist-lib/tipos/features/maps/services/tools/acciones.registry.d.ts +25 -0
- package/dist-lib/tipos/features/maps/services/tools/agrupar-herramientas.d.ts +3 -0
- package/dist-lib/tipos/features/maps/services/tools/grupos-barra.d.ts +13 -0
- package/dist-lib/tipos/features/maps/services/tools/herramientas.registry.d.ts +8 -0
- package/dist-lib/tipos/features/maps/services/tools/identify.tool.d.ts +27 -0
- package/dist-lib/tipos/features/maps/services/tools/medicion.tool.d.ts +69 -0
- package/dist-lib/tipos/features/maps/services/tools/types.d.ts +24 -0
- package/dist-lib/tipos/features/maps/styles/alertas.estilos.d.ts +15 -0
- package/dist-lib/tipos/features/maps/styles/controles.estilos.d.ts +20 -0
- package/dist-lib/tipos/features/maps/styles/modales.estilos.d.ts +11 -0
- package/dist-lib/tipos/features/maps/styles/raiz.estilos.d.ts +6 -0
- package/dist-lib/tipos/features/maps/types/aplicacion.types.d.ts +7 -0
- package/dist-lib/tipos/features/maps/types/capas.types.d.ts +14 -0
- package/dist-lib/tipos/features/maps/types/configuracion-aplicacion.types.d.ts +14 -0
- package/dist-lib/tipos/features/maps/types/consulta.types.d.ts +57 -0
- package/dist-lib/tipos/features/maps/types/galeria.types.d.ts +7 -0
- package/dist-lib/tipos/features/maps/types/herramienta.types.d.ts +20 -0
- package/dist-lib/tipos/features/maps/types/index.d.ts +11 -0
- package/dist-lib/tipos/features/maps/types/leyenda.types.d.ts +10 -0
- package/dist-lib/tipos/features/maps/types/mapa.types.d.ts +33 -0
- package/dist-lib/tipos/features/maps/types/parametros-generales.types.d.ts +51 -0
- package/dist-lib/tipos/features/maps/types/responsive.types.d.ts +6 -0
- package/dist-lib/tipos/features/maps/types/servicio.types.d.ts +63 -0
- package/dist-lib/tipos/features/maps/utils/basemap-imagenes.d.ts +2 -0
- package/dist-lib/tipos/features/maps/utils/capas-activas.d.ts +6 -0
- package/dist-lib/tipos/features/maps/utils/filtrar-barra.d.ts +6 -0
- package/dist-lib/tipos/features/maps/utils/mapa-helpers.d.ts +5 -0
- package/dist-lib/tipos/features/maps/utils/resolver-servicios.d.ts +5 -0
- package/dist-lib/tipos/lib/MapaCoreIsa.d.ts +31 -0
- package/dist-lib/tipos/lib/index.d.ts +15 -0
- package/dist-lib/tipos/lib/standalone.d.ts +20 -0
- package/dist-lib/tipos/shared/components/MensajeError.d.ts +8 -0
- package/dist-lib/tipos/shared/components/Skeleton.d.ts +4 -0
- package/dist-lib/tipos/shared/entorno.d.ts +19 -0
- package/dist-lib/tipos/shared/helpers/descargar-archivo.d.ts +2 -0
- package/dist-lib/tipos/shared/helpers/formato-duracion.d.ts +2 -0
- package/dist-lib/tipos/shared/helpers/http.d.ts +7 -0
- package/dist-lib/tipos/shared/hooks/useCerrarAlClicFuera.d.ts +3 -0
- package/dist-lib/tipos/shared/hooks/useDesbordado.d.ts +2 -0
- package/dist-lib/tipos/shared/hooks/useHojaInferiorArrastrable.d.ts +21 -0
- package/dist-lib/tipos/shared/hooks/useObservadorTamano.d.ts +11 -0
- package/dist-lib/tipos/shared/hooks/useRecursoAsync.d.ts +12 -0
- package/dist-lib/tipos/shared/hooks/useTamanoContenedor.d.ts +2 -0
- package/dist-lib/tipos/shared/lib/cn.d.ts +2 -0
- package/dist-lib/tipos/shared/types.d.ts +5 -0
- package/package.json +89 -0
package/README.md
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# @json_1013/core-geografico-isa-mapa
|
|
2
|
+
|
|
3
|
+
Mapa de Core ISA (ArcGIS) listo para embeber: el backend de Core ISA describe
|
|
4
|
+
la aplicación (mapas, capas, herramientas) y la librería la muestra igual que
|
|
5
|
+
en Core ISA. Funciona en proyectos React (JS o TS) y sin React (Angular, Vue,
|
|
6
|
+
JS).
|
|
7
|
+
|
|
8
|
+
## Instalación
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
npm install @json_1013/core-geografico-isa-mapa @arcgis/core
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Mientras la librería esté en prueba, sus versiones se publican con el tag `poc`:
|
|
15
|
+
`npm install @json_1013/core-geografico-isa-mapa@poc @arcgis/core`.
|
|
16
|
+
|
|
17
|
+
En la entrada del proyecto:
|
|
18
|
+
|
|
19
|
+
```js
|
|
20
|
+
import "@arcgis/core/assets/esri/themes/light/main.css";
|
|
21
|
+
import "@json_1013/core-geografico-isa-mapa/estilos.css";
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
No hace falta Tailwind ni TypeScript.
|
|
25
|
+
|
|
26
|
+
## React
|
|
27
|
+
|
|
28
|
+
```jsx
|
|
29
|
+
import { MapaCoreIsa } from "@json_1013/core-geografico-isa-mapa";
|
|
30
|
+
|
|
31
|
+
<div style={{ height: 600 }}>
|
|
32
|
+
<MapaCoreIsa
|
|
33
|
+
apiBaseUrl="https://back.isa.co"
|
|
34
|
+
clientId="<id de la aplicación>"
|
|
35
|
+
urlToken="/api/token-mapa"
|
|
36
|
+
modo="EMBEDDED"
|
|
37
|
+
herramientasDeshabilitadas={["three-dimensional"]}
|
|
38
|
+
onError={(error) => console.error(error)}
|
|
39
|
+
/>
|
|
40
|
+
</div>;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
Requiere React 18.3+ o 19.
|
|
44
|
+
|
|
45
|
+
## Sin React
|
|
46
|
+
|
|
47
|
+
```js
|
|
48
|
+
import { montarMapa } from "@json_1013/core-geografico-isa-mapa/standalone";
|
|
49
|
+
|
|
50
|
+
const mapa = montarMapa("#mapa", {
|
|
51
|
+
apiBaseUrl: "https://back.isa.co",
|
|
52
|
+
clientId: "<id de la aplicación>",
|
|
53
|
+
urlToken: "/api/token-mapa",
|
|
54
|
+
});
|
|
55
|
+
// mapa.actualizar({ ... }) · mapa.desmontar()
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
## Token
|
|
59
|
+
|
|
60
|
+
El JWT lo emite un controlador del proyecto consumidor:
|
|
61
|
+
|
|
62
|
+
- La librería llama `POST urlToken` con `{ clientId }` y espera `{ token }`.
|
|
63
|
+
- Alternativa: `getAccessToken(clientId) => Promise<string>`.
|
|
64
|
+
|
|
65
|
+
**Sin token válido el mapa no carga**: muestra "Sin acceso al mapa" y llama
|
|
66
|
+
`onError` con un `ErrorToken`. Su `motivo` es uno de `sin-configurar`,
|
|
67
|
+
`controlador`, `vacio` o `rechazado`.
|
|
68
|
+
|
|
69
|
+
## Más
|
|
70
|
+
|
|
71
|
+
- **Proyección en el navegador:** `proyectarCoordenadas`, `SRIDS_COLOMBIA`, `ejeFueraDeRango`.
|
|
72
|
+
- **Visor con datos propios:** `MapaView`.
|
|
73
|
+
- **Tipos del contrato:** `CodigoHerramienta`, `ConfiguracionAplicacion`, …
|
|
74
|
+
|
|
75
|
+
Guía completa (contrato del token, CORS, aislamiento de estilos, publicación):
|
|
76
|
+
`docs/libreria-mapa.md` en el repositorio de Core ISA.
|
|
77
|
+
|
|
78
|
+
## Desarrollo de este paquete
|
|
79
|
+
|
|
80
|
+
En el monorepo, el paquete también es la app demo del visor:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
npm run dev:mapa # demo en http://localhost:5174
|
|
84
|
+
npm run test:mapa # pruebas
|
|
85
|
+
npm run build:lib:mapa # build de la librería (dist-lib/)
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
El demo lee `VITE_API_BASE_URL` (obligatoria) y `VITE_ARCGIS_API_KEY`
|
|
89
|
+
(opcional) de `packages/mapa/.env`. Arquitectura y herramientas:
|
|
90
|
+
`docs/mapas.md`.
|