@tracktor/map 1.2.6 → 1.3.0

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.
@@ -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;
@@ -13,8 +12,8 @@ declare const useMarkerMap: ({ center, zoom, openPopup, openPopupOnHover, marker
13
12
  longitude: number;
14
13
  zoom: number | undefined;
15
14
  } | undefined;
15
+ isMapReady: boolean;
16
16
  mapRef: import('react').RefObject<MapRef | null>;
17
- route: Feature<LineString, GeoJsonProperties> | null;
18
17
  selected: string | number | null;
19
18
  selectedMarker: import('../../main').MarkerProps<Record<string, unknown>> | null;
20
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;