@tracktor/map 0.1.4 → 0.2.1
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 +11 -9
- package/dist/components/MarkerMap/MarkerMap.d.ts +1 -1
- package/dist/components/MarkerMap/useMarkerMap.d.ts +2 -2
- package/dist/constants/coordinates.d.ts +2 -0
- package/dist/main.d.ts +10 -4
- package/dist/main.js +228 -223
- package/dist/main.umd.cjs +10 -10
- package/dist/types/{MarkerMap.d.ts → MarkerMapProps.d.ts} +1 -1
- package/dist/types/typeguard.d.ts +0 -2
- package/dist/utils/addPopup.d.ts +2 -2
- package/dist/utils/handleMapClick.d.ts +3 -3
- package/dist/utils/isValidLatLng.d.ts +2 -0
- package/dist/utils/isWebGLSupported.d.ts +2 -0
- package/dist/utils/loadMarkers.d.ts +3 -3
- package/dist/utils/mapOptions.d.ts +1 -1
- package/package.json +3 -3
- /package/dist/components/{MapBox/MapBox.d.ts → MapContainer/MapContainer.d.ts} +0 -0
- /package/dist/types/{Markers.d.ts → MarkerProps.d.ts} +0 -0
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ This library depends on:
|
|
|
25
25
|
## 🔧 Usage
|
|
26
26
|
|
|
27
27
|
```tsx
|
|
28
|
-
import MarkerMap from "@tracktor/map";
|
|
28
|
+
import { MapProvider, MarkerMap } from "@tracktor/map";
|
|
29
29
|
|
|
30
30
|
const markers = [
|
|
31
31
|
{
|
|
@@ -39,14 +39,16 @@ const markers = [
|
|
|
39
39
|
},
|
|
40
40
|
];
|
|
41
41
|
|
|
42
|
-
<
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
42
|
+
<MapProvider licenseMuiX="your-muix-licence" licenceMapbox="your-mapbox-licence">
|
|
43
|
+
<MarkerMap
|
|
44
|
+
markers={markers}
|
|
45
|
+
center={[2.3522, 48.8566]}
|
|
46
|
+
zoom={10}
|
|
47
|
+
fitBounds
|
|
48
|
+
height={400}
|
|
49
|
+
width="100%"
|
|
50
|
+
/>
|
|
51
|
+
</MapProvider>
|
|
50
52
|
```
|
|
51
53
|
|
|
52
54
|
## 🧩 Props
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Map } from 'mapbox-gl';
|
|
2
|
-
import { MarkerMapProps } from '../../types/
|
|
2
|
+
import { MarkerMapProps } from '../../types/MarkerMapProps.ts';
|
|
3
3
|
export declare const DEFAULT_CENTER_LNG = 2.333;
|
|
4
4
|
export declare const DEFAULT_CENTER_LAT = 46.8677;
|
|
5
5
|
/**
|
|
@@ -18,6 +18,6 @@ declare const useMarkerMap: ({ markers, loading, center, flyToDuration, fitBound
|
|
|
18
18
|
loading: boolean | undefined;
|
|
19
19
|
map: import('react').RefObject<Map | null>;
|
|
20
20
|
mapContainer: import('react').RefObject<HTMLDivElement | null>;
|
|
21
|
-
markers: import('../../main').MarkerProps[] | undefined;
|
|
21
|
+
markers: import('../../main.ts').MarkerProps[] | undefined;
|
|
22
22
|
};
|
|
23
23
|
export default useMarkerMap;
|
package/dist/main.d.ts
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export
|
|
1
|
+
export { DEFAULT_CENTER_LNG } from './constants/coordinates.ts';
|
|
2
|
+
export { DEFAULT_CENTER_LAT } from './constants/coordinates.ts';
|
|
3
3
|
export { default as MapProvider } from './context/MapProvider';
|
|
4
4
|
export * from './context/MapProvider';
|
|
5
|
-
export
|
|
6
|
-
export * from './
|
|
5
|
+
export { default as MarkerMap } from './components/MarkerMap/MarkerMap';
|
|
6
|
+
export * from './components/MarkerMap/MarkerMap';
|
|
7
|
+
export { default as isValidLatLng } from './utils/isValidLatLng';
|
|
8
|
+
export * from './utils/isValidLatLng';
|
|
9
|
+
export { default as isWebGLSupported } from './utils/isWebGLSupported';
|
|
10
|
+
export * from './utils/isWebGLSupported';
|
|
11
|
+
export * from './types/MarkerProps';
|
|
12
|
+
export * from './types/MarkerMapProps';
|