@tracktor/map 1.0.3 → 1.0.5
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 +21 -24
- package/dist/components/MarkerMap/useMarkerMap.d.ts +1 -0
- package/dist/main.js +3694 -3697
- package/dist/main.umd.cjs +76 -76
- package/dist/utils/getFeature.d.ts +1 -1
- package/dist/utils/loadMarkers.d.ts +2 -4
- package/dist/{types → utils}/typeguard.d.ts +8 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -55,27 +55,27 @@ const markers = [
|
|
|
55
55
|
|
|
56
56
|
### MarkerMap Props
|
|
57
57
|
|
|
58
|
-
| Prop | Type
|
|
59
|
-
|
|
60
|
-
| `markers` | `MarkerProps[]`
|
|
61
|
-
| `center` | `LngLatLike` or `[number, number]`
|
|
62
|
-
| `zoom` | `number`
|
|
63
|
-
| `fitBounds` | `boolean`
|
|
64
|
-
| `fitBoundsPadding` | `number`
|
|
65
|
-
| `zoomFlyFrom` | `number`
|
|
66
|
-
| `popupMaxWidth` | `string`
|
|
67
|
-
| `width` | `number` or `string`
|
|
68
|
-
| `height` | `number` or `string`
|
|
69
|
-
| `loading` | `boolean`
|
|
70
|
-
| `markerImageURL` | `string`
|
|
71
|
-
| `containerStyle` | `SxProps`
|
|
72
|
-
| `disableFlyTo` | `boolean`
|
|
73
|
-
| `flyToDuration` | `number`
|
|
74
|
-
| `fitBoundDuration` | `number`
|
|
75
|
-
| `square` | `boolean`
|
|
76
|
-
| `openPopup` | `number` or `string`
|
|
77
|
-
| `openPopupOnHover` | `boolean`
|
|
78
|
-
| `onMapClick` | `(lng: number, lat: number) => void` | Callback triggered when clicking on the map
|
|
58
|
+
| Prop | Type | Description |
|
|
59
|
+
|--------------------|--------------------------------------|--------------------------------------------------------|
|
|
60
|
+
| `markers` | `MarkerProps[]` | List of markers to display |
|
|
61
|
+
| `center` | `LngLatLike` or `[number, number]` | Initial map center coordinates |
|
|
62
|
+
| `zoom` | `number` | Initial zoom level |
|
|
63
|
+
| `fitBounds` | `boolean` | Automatically fit the map to the bounds of all markers |
|
|
64
|
+
| `fitBoundsPadding` | `number` | Padding around markers when fitting bounds |
|
|
65
|
+
| `zoomFlyFrom` | `number` | Zoom level to fly in from |
|
|
66
|
+
| `popupMaxWidth` | `string` | Max width for popups |
|
|
67
|
+
| `width` | `number` or `string` | Map width |
|
|
68
|
+
| `height` | `number` or `string` | Map height |
|
|
69
|
+
| `loading` | `boolean` | Whether to show a loading state |
|
|
70
|
+
| `markerImageURL` | `string` | Default marker image URL |
|
|
71
|
+
| `containerStyle` | `SxProps` | Custom styles for the map container |
|
|
72
|
+
| `disableFlyTo` | `boolean` | Disable flyTo animation on marker click |
|
|
73
|
+
| `flyToDuration` | `number` | Duration of the flyTo animation |
|
|
74
|
+
| `fitBoundDuration` | `number` | Duration of the fitBounds animation |
|
|
75
|
+
| `square` | `boolean` | Forces the map to be square-shaped |
|
|
76
|
+
| `openPopup` | `number` or `string` | ID of the marker with an open popup |
|
|
77
|
+
| `openPopupOnHover` | `boolean` | Automatically open popups on marker hover |
|
|
78
|
+
| `onMapClick` | `(lng: number, lat: number) => void` | Callback triggered when clicking on the map |
|
|
79
79
|
|
|
80
80
|
### MarkerProps
|
|
81
81
|
|
|
@@ -93,9 +93,6 @@ const markers = [
|
|
|
93
93
|
| `name` | `string` | Name of the marker |
|
|
94
94
|
| `Icon` | `ReactNode` | Custom React component to render instead of default image |
|
|
95
95
|
|
|
96
|
-
## 🖼 Visual Example
|
|
97
|
-
|
|
98
|
-
<img src="./src/assets/example.png" alt="MarkerMap Example" width="400" />
|
|
99
96
|
|
|
100
97
|
## 🧑💻 Contributing
|
|
101
98
|
|
|
@@ -15,6 +15,7 @@ export declare const DEFAULT_CENTER_LAT = 46.8677;
|
|
|
15
15
|
*/
|
|
16
16
|
declare const useMarkerMap: ({ markers, center, disableAnimation, openPopup, onMapClick, projection, theme, mapStyle, fitBoundsAnimationKey, baseMapView, zoom, fitBoundsPadding, fitBoundDuration, fitBounds, cooperativeGestures, doubleClickZoom, }: MarkerMapProps) => {
|
|
17
17
|
containerRef: import('react').RefObject<string | HTMLDivElement>;
|
|
18
|
+
currentTheme: import('@tracktor/design-system').PaletteMode;
|
|
18
19
|
isMapInitialized: boolean;
|
|
19
20
|
map: import('react').RefObject<Map | null>;
|
|
20
21
|
markers: import('../../main').MarkerProps[];
|