@dacostafilipe/react-geoportail 0.1.4 → 0.1.6
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 +6 -2
- package/dist/components/GeoportailMap.d.ts +2 -2
- package/dist/hooks/useGeocode.d.ts +1 -1
- package/dist/hooks/useLuxApi.d.ts +3 -3
- package/dist/hooks/useReverseGeocode.d.ts +1 -1
- package/dist/index.d.ts +11 -11
- package/dist/react-geoportail.js +253 -208
- package/dist/react-geoportail.js.map +1 -1
- package/dist/react-geoportail.umd.cjs +2 -2
- package/dist/react-geoportail.umd.cjs.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/lux.d.ts +89 -0
- package/dist/utils/loader.d.ts +2 -2
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ An unofficial React SDK for the [Geoportail Luxembourg v3 API](https://apiv3.geo
|
|
|
10
10
|
- **`useReverseGeocode`** — look up a Luxembourg address from lat/lon coordinates
|
|
11
11
|
- **`useGeocode`** — search for coordinates from an address string
|
|
12
12
|
- Coordinate conversion utilities (EPSG:2169 ↔ WGS84) included
|
|
13
|
-
- Zero runtime npm dependencies —
|
|
13
|
+
- Zero runtime npm dependencies — loads the required hosted Geoportail assets directly
|
|
14
14
|
|
|
15
15
|
## Requirements
|
|
16
16
|
|
|
@@ -24,7 +24,11 @@ An unofficial React SDK for the [Geoportail Luxembourg v3 API](https://apiv3.geo
|
|
|
24
24
|
npm install @dacostafilipe/react-geoportail
|
|
25
25
|
```
|
|
26
26
|
|
|
27
|
-
|
|
27
|
+
No manual `<script>` or `<link>` tags are needed. The package loads the required Geoportail assets directly at runtime:
|
|
28
|
+
|
|
29
|
+
- `https://apiv3.geoportail.lu/static-ngeo/build/apiv3.css`
|
|
30
|
+
- `https://apiv3.geoportail.lu/static-ngeo/build/vendor.js`
|
|
31
|
+
- `https://apiv3.geoportail.lu/static-ngeo/build/apiv3.js`
|
|
28
32
|
|
|
29
33
|
## Quick start
|
|
30
34
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { default as React } from 'react';
|
|
2
|
-
import { LatLon, MapClickHandler, MarkerMode } from '../types
|
|
3
|
-
import { LuxMapInstance } from '../types/lux
|
|
2
|
+
import { LatLon, MapClickHandler, MarkerMode } from '../types';
|
|
3
|
+
import { LuxMapInstance } from '../types/lux';
|
|
4
4
|
|
|
5
5
|
export interface GeoportailMapProps {
|
|
6
6
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { LuxNamespace } from '../types/lux
|
|
1
|
+
import { LuxNamespace } from '../types/lux';
|
|
2
2
|
|
|
3
3
|
export type LuxApiState = {
|
|
4
4
|
status: 'loading';
|
|
@@ -14,7 +14,7 @@ export type LuxApiState = {
|
|
|
14
14
|
error: Error;
|
|
15
15
|
};
|
|
16
16
|
/**
|
|
17
|
-
* Loads the Geoportail
|
|
18
|
-
* Deduplicates the
|
|
17
|
+
* Loads the Geoportail runtime assets and returns the `lux` namespace once ready.
|
|
18
|
+
* Deduplicates the asset load — safe to call from multiple components.
|
|
19
19
|
*/
|
|
20
20
|
export declare function useLuxApi(): LuxApiState;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
export { GeoportailMap } from './components/GeoportailMap
|
|
2
|
-
export type { GeoportailMapProps, GeoportailMapHandle } from './components/GeoportailMap
|
|
3
|
-
export { useLuxApi } from './hooks/useLuxApi
|
|
4
|
-
export type { LuxApiState } from './hooks/useLuxApi
|
|
5
|
-
export { useReverseGeocode } from './hooks/useReverseGeocode
|
|
6
|
-
export type { ReverseGeocodeState } from './hooks/useReverseGeocode
|
|
7
|
-
export { useGeocode } from './hooks/useGeocode
|
|
8
|
-
export type { GeocodeState, GeocodeResultItem } from './hooks/useGeocode
|
|
9
|
-
export { latLonToLuref, lurefToLatLon } from './utils/coordinates
|
|
10
|
-
export { loadLuxApi } from './utils/loader
|
|
11
|
-
export type { LatLon, Address, GeocodeQuery, MapClickHandler, MarkerMode, } from './types
|
|
1
|
+
export { GeoportailMap } from './components/GeoportailMap';
|
|
2
|
+
export type { GeoportailMapProps, GeoportailMapHandle } from './components/GeoportailMap';
|
|
3
|
+
export { useLuxApi } from './hooks/useLuxApi';
|
|
4
|
+
export type { LuxApiState } from './hooks/useLuxApi';
|
|
5
|
+
export { useReverseGeocode } from './hooks/useReverseGeocode';
|
|
6
|
+
export type { ReverseGeocodeState } from './hooks/useReverseGeocode';
|
|
7
|
+
export { useGeocode } from './hooks/useGeocode';
|
|
8
|
+
export type { GeocodeState, GeocodeResultItem } from './hooks/useGeocode';
|
|
9
|
+
export { latLonToLuref, lurefToLatLon } from './utils/coordinates';
|
|
10
|
+
export { loadLuxApi } from './utils/loader';
|
|
11
|
+
export type { LatLon, Address, GeocodeQuery, MapClickHandler, MarkerMode, } from './types';
|