react-native-map-link
Version:
Open the map app of the user's choice with a specific location.
50 lines (49 loc) • 2.93 kB
TypeScript
import type { MapId } from './type';
export declare const getAvailableApps: (prefixes: Record<string, string>) => Promise<MapId[]>;
export declare const isAppInstalled: (app: string, prefixes: Record<string, string>) => Promise<boolean>;
export declare const isSupportedApp: (app: string) => boolean;
export declare const getNotSupportedApps: (apps: string[]) => string[];
export declare const checkNotSupportedApps: (apps: string[]) => void;
export declare const askAppChoice: ({ dialogTitle, dialogMessage, cancelText, appsWhiteList, appsBlackList, prefixes, appTitles, }: {
dialogTitle: string | null | undefined;
dialogMessage: string | null | undefined;
cancelText: string | null | undefined;
appsWhiteList: string[] | null | undefined;
appsBlackList: string[] | null | undefined;
prefixes: Record<string, string>;
appTitles: Record<string, string> | null | undefined;
}) => Promise<MapId | null>;
export declare const getDirectionsModeAppleMaps: (directionsMode: 'car' | 'walk' | 'public-transport' | 'bike' | undefined) => string | undefined;
export declare const getDirectionsModeGoogleMaps: (directionsMode: 'car' | 'walk' | 'public-transport' | 'bike' | undefined) => string | undefined;
export declare const getDirectionsModeSygic: (directionsMode: 'car' | 'walk' | 'public-transport' | 'bike' | undefined) => string | undefined;
export declare const checkOptions: ({ latitude, longitude, address, googleForceLatLon, googlePlaceId, title, app, prefixes, appTitles, appsWhiteList, }: {
latitude?: string | number | undefined;
longitude?: string | number | undefined;
address?: string | null | undefined;
googleForceLatLon?: boolean | null | undefined;
googlePlaceId?: number | string | null | undefined;
title?: string | null | undefined;
app?: string | null | undefined;
appTitles: Record<string, string> | null | undefined;
prefixes: Record<string, string>;
appsWhiteList: string[] | null | undefined;
}) => void;
export declare const generateMapUrl: ({ app, directionsMode, appleIgnoreLatLon, googleForceLatLon, googlePlaceId, naverCallerName, lat, lng, latlng, sourceLat, sourceLng, sourceLatLng, address, title, encodedTitle, prefixes, useSourceDestiny, }: {
app: string | null;
directionsMode: 'car' | 'walk' | 'public-transport' | 'bike' | undefined;
appleIgnoreLatLon?: boolean | undefined;
googleForceLatLon?: boolean | undefined;
googlePlaceId: string | number | null | undefined;
naverCallerName: string | null | undefined;
lat?: number | undefined;
lng?: number | undefined;
latlng: string;
sourceLat?: number | undefined;
sourceLng?: number | undefined;
sourceLatLng?: string | undefined;
address?: string | null | undefined;
title?: string | null | undefined;
encodedTitle?: string | undefined;
prefixes: Record<string, string>;
useSourceDestiny: boolean;
}) => string;