@tracktor/map 1.2.7 → 1.3.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
@@ -101,3 +101,14 @@ Contributions are welcome! Please follow the coding conventions and include test
101
101
  ## 📄 License
102
102
 
103
103
  MIT © [Kevin Graff / Tracktor]
104
+
105
+
106
+ ## GH-Pages
107
+ This project uses GitHub Pages for documentation hosting. To deploy the documentation, run:
108
+
109
+ ```
110
+ bun run deploy:example
111
+ ```
112
+ This will build the documentation and push it to the `gh-pages` branch.
113
+
114
+ GH-Pages URL: https://tracktor.github.io/map/
@@ -0,0 +1,10 @@
1
+ import { ItineraryLineStyle } from '../../types/MarkerMapProps.ts';
2
+ type ItineraryProps = {
3
+ from?: [number, number];
4
+ to?: [number, number];
5
+ profile?: "driving" | "walking" | "cycling";
6
+ routeService?: "OSRM" | "Mapbox";
7
+ itineraryLineStyle?: Partial<ItineraryLineStyle>;
8
+ };
9
+ declare const Itinerary: ({ profile, routeService, to, from, itineraryLineStyle }: ItineraryProps) => import("react/jsx-runtime").JSX.Element | null;
10
+ export default Itinerary;
@@ -1,4 +1,4 @@
1
1
  import { ReactElement } from 'react';
2
2
  import { MarkerMapProps } from '../../types/MarkerMapProps';
3
- declare const _default: import('react').MemoExoticComponent<({ containerStyle, square, loading, height, width, center, zoom, popupMaxWidth, openPopup, openPopupOnHover, markers, fitBounds, fitBoundsPadding, fitBoundDuration, fitBoundsAnimationKey, disableAnimation, mapStyle, onMapClick, baseMapView, cooperativeGestures, doubleClickZoom, projection, theme, features, from, to, profile, itineraryLineStyle, }: MarkerMapProps) => ReactElement>;
3
+ declare const _default: import('react').MemoExoticComponent<({ containerStyle, square, loading, height, width, center, zoom, popupMaxWidth, openPopup, openPopupOnHover, markers, fitBounds, fitBoundsPadding, fitBoundDuration, fitBoundsAnimationKey, disableAnimation, mapStyle, onMapClick, baseMapView, cooperativeGestures, doubleClickZoom, projection, theme, features, from, to, profile, itineraryLineStyle, routeService, findNearestMarker, onNearestFound, }: MarkerMapProps) => ReactElement>;
4
4
  export default _default;
@@ -1,7 +1,6 @@
1
- import { Feature, GeoJsonProperties, LineString } from 'geojson';
2
1
  import { MapRef } from 'react-map-gl';
3
2
  import { MarkerMapProps } from '../../types/MarkerMapProps';
4
- declare const useMarkerMap: ({ center, zoom, openPopup, openPopupOnHover, markers, baseMapView, mapStyle: baseMapStyle, projection, cooperativeGestures, doubleClickZoom, theme: themeOverride, from, to, profile, }: MarkerMapProps) => {
3
+ declare const useMarkerMap: ({ center, zoom, openPopup, openPopupOnHover, markers, baseMapView, mapStyle: baseMapStyle, projection, cooperativeGestures, doubleClickZoom, theme: themeOverride, }: MarkerMapProps) => {
5
4
  coopGestures: boolean | undefined;
6
5
  coreStyle: string | (import('mapbox-gl').StyleSpecification & string);
7
6
  dblZoom: boolean | undefined;
@@ -15,7 +14,6 @@ declare const useMarkerMap: ({ center, zoom, openPopup, openPopupOnHover, marker
15
14
  } | undefined;
16
15
  isMapReady: boolean;
17
16
  mapRef: import('react').RefObject<MapRef | null>;
18
- route: Feature<LineString, GeoJsonProperties> | null;
19
17
  selected: string | number | null;
20
18
  selectedMarker: import('../../main').MarkerProps<Record<string, unknown>> | null;
21
19
  setSelected: import('react').Dispatch<import('react').SetStateAction<string | number | null>>;
@@ -0,0 +1,8 @@
1
+ import { FindNearestMarkerParams } from '../../types/MarkerMapProps';
2
+ export interface NearestResult {
3
+ id: number | string;
4
+ point: [number, number];
5
+ distance: number;
6
+ }
7
+ declare const _default: import('react').MemoExoticComponent<({ origin, maxDistanceMeters, destinations, onNearestFound }: FindNearestMarkerParams) => import("react/jsx-runtime").JSX.Element | null>;
8
+ export default _default;