@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 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
- <MarkerMap
43
- markers={markers}
44
- center={[2.3522, 48.8566]}
45
- zoom={10}
46
- fitBounds
47
- height={400}
48
- width="100%"
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,4 +1,4 @@
1
- import { MarkerMapProps } from '../../types/MarkerMap.tsx';
1
+ import { MarkerMapProps } from '../../types/MarkerMapProps.ts';
2
2
  /**
3
3
  * MarkerMap is a reusable React component that displays an interactive Mapbox map
4
4
  * with customizable markers and behavior.
@@ -1,5 +1,5 @@
1
1
  import { Map } from 'mapbox-gl';
2
- import { MarkerMapProps } from '../../types/MarkerMap.tsx';
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;
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_CENTER_LNG = 2.333;
2
+ export declare const DEFAULT_CENTER_LAT = 46.8677;
package/dist/main.d.ts CHANGED
@@ -1,6 +1,12 @@
1
- export { default as MarkerMap } from './components/MarkerMap/MarkerMap';
2
- export * from './components/MarkerMap/MarkerMap';
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 * from './types/Markers';
6
- export * from './types/MarkerMap';
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';