Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@types/leaflet-routing-machine

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/leaflet-routing-machine - npm Package Compare versions

Comparing version 3.2.4 to 3.2.5

154

leaflet-routing-machine/index.d.ts

@@ -7,5 +7,5 @@ // Type definitions for leaflet-routing-machine 3.2

import * as L from 'leaflet';
import * as L from "leaflet";
declare module 'leaflet' {
declare module "leaflet" {
namespace Routing {

@@ -29,3 +29,3 @@ class Control extends Itinerary {

geocoder?: any; // IGeocorder is from other library;
fitSelectedRoutes?: 'smart' | boolean | undefined;
fitSelectedRoutes?: "smart" | boolean | undefined;
lineOptions?: LineOptions | undefined;

@@ -36,3 +36,3 @@ routeLine?: ((route: IRoute, options: LineOptions) => Line) | undefined;

routeDragInterval?: number | undefined;
waypointMode?: 'connect' | 'snap' | undefined;
waypointMode?: "connect" | "snap" | undefined;
useZoomParameter?: boolean | undefined;

@@ -95,7 +95,16 @@ showAlternatives?: boolean | undefined;

addButtonClassName?: string | undefined;
createMarker?: ((waypointIndex: number, waypoint: Waypoint, numberOfWaypoints: number) => Marker | boolean) | undefined;
createMarker?:
| ((waypointIndex: number, waypoint: Waypoint, numberOfWaypoints: number) => Marker | boolean)
| undefined;
routeWhileDragging?: boolean | undefined;
reverseWaypoints?: boolean | undefined;
language?: string | undefined;
createGeocoderElement?: ((waypoint: Waypoint, waypointIndex: number, numberOfWaypoints: number, options: PlanOptions) => GeocoderElement) | undefined;
createGeocoderElement?:
| ((
waypoint: Waypoint,
waypointIndex: number,
numberOfWaypoints: number,
options: PlanOptions,
) => GeocoderElement)
| undefined;
}

@@ -120,5 +129,9 @@

route(waypoints: Waypoint[], callback: (args?: any) => void, context?: {}, options?: RoutingOptions): void ;
route(waypoints: Waypoint[], callback: (args?: any) => void, context?: {}, options?: RoutingOptions): void;
buildRouteUrl(waypoints: Waypoint[], options: RoutingOptions): string;
requiresMoreDetail(route: { inputWaypoints: Waypoint, waypoints: Waypoint, properties?: any }, zoom: any, bounds: LatLng[]): boolean;
requiresMoreDetail(
route: { inputWaypoints: Waypoint; waypoints: Waypoint; properties?: any },
zoom: any,
bounds: LatLng[],
): boolean;
}

@@ -136,3 +149,3 @@

requestParameters?: { [key: string]: any } | undefined;
stepToText?: ((step: any, leg: { legCount: number, legIndex: number }) => any) | undefined;
stepToText?: ((step: any, leg: { legCount: number; legIndex: number }) => any) | undefined;
}

@@ -146,5 +159,18 @@

formatInstruction(instruction: IInstruction): string;
getIconName(instruction: IInstruction, index: number):
'depart' | 'via' | 'enter-roundabout' | 'arrive' | 'continue' | 'bear-right' | 'turn-right'
| 'sharp-right' | 'u-turn' | 'sharp-left' | 'turn-left' | 'bear-left';
getIconName(
instruction: IInstruction,
index: number,
):
| "depart"
| "via"
| "enter-roundabout"
| "arrive"
| "continue"
| "bear-right"
| "turn-right"
| "sharp-right"
| "u-turn"
| "sharp-left"
| "turn-left"
| "bear-left";
capitalize(s: string): string;

@@ -155,3 +181,3 @@ }

language?: string | undefined;
units?: 'metric' | 'imperial' | undefined;
units?: "metric" | "imperial" | undefined;
roundingSensitivity?: number | undefined;

@@ -181,9 +207,31 @@ unitNames?: {} | undefined;

interface LocalizationOptions {
directions: { N: string, NE: string, E: string, SE: string, S: string, SW: string, W: string, NW: string,
SlightRight: string, Right: string, SharpRight: string, SlightLeft: string, Left: string,
SharpLeft: string, Uturn: string };
directions: {
N: string;
NE: string;
E: string;
SE: string;
S: string;
SW: string;
W: string;
NW: string;
SlightRight: string;
Right: string;
SharpRight: string;
SlightLeft: string;
Left: string;
SharpLeft: string;
Uturn: string;
};
instructions: { [key: string]: string[] | string };
formatOrder: (n: number | string) => string;
ui: { startPlaceholder: string, viaPlaceholder: string, endPlaceholder: string };
units: { meters: string, kilometers: string, yards: string, miles: string, hours: string, minutes: string, seconds: string };
ui: { startPlaceholder: string; viaPlaceholder: string; endPlaceholder: string };
units: {
meters: string;
kilometers: string;
yards: string;
miles: string;
hours: string;
minutes: string;
seconds: string;
};
}

@@ -214,3 +262,5 @@

createGeocoder?: ((i: number, nWps: number, options: GeocoderElementOptions) => any) | undefined;
geocoderPlaceholder?: ((i: number, numberOfWaypoints: number, geocoderElement: GeocoderElement) => string) | undefined;
geocoderPlaceholder?:
| ((i: number, numberOfWaypoints: number, geocoderElement: GeocoderElement) => string)
| undefined;
geocoderClass?: (() => string) | undefined;

@@ -224,3 +274,3 @@ waypointNameFallback?: ((latLng: LatLng) => string) | undefined;

class ErrorControl extends L.Control {
constructor(routingControl: Control, options: ErrorControlOptions) ;
constructor(routingControl: Control, options: ErrorControlOptions);
}

@@ -234,3 +284,3 @@

class AutoComplete {
constructor(element: HTMLElement, callback: any, context: any, options: AutoCompleteOptions) ;
constructor(element: HTMLElement, callback: any, context: any, options: AutoCompleteOptions);

@@ -247,3 +297,3 @@ close(): void;

class MapBox extends OSRMv1 {
constructor(accessToken: string, options: OSRMOptions) ;
constructor(accessToken: string, options: OSRMOptions);
}

@@ -297,3 +347,8 @@

interface IRouter {
route(waypoints: Waypoint[], callback: (error?: IError, routes?: IRoute[]) => any, context?: {}, options?: RoutingOptions): void;
route(
waypoints: Waypoint[],
callback: (error?: IError, routes?: IRoute[]) => any,
context?: {},
options?: RoutingOptions,
): void;
}

@@ -321,4 +376,18 @@

text?: string | undefined;
type?: 'Straight' | 'SlightRight' | 'Right' | 'SharpRight' | 'TurnAround' | 'SharpLeft' | 'Left' | 'SlightLeft' | 'WaypointReached' |
'Roundabout' | 'StartAt' | 'DestinationReached' | 'EnterAgainstAllowedDirection' | 'LeaveAgainstAllowedDirection' | undefined;
type?:
| "Straight"
| "SlightRight"
| "Right"
| "SharpRight"
| "TurnAround"
| "SharpLeft"
| "Left"
| "SlightLeft"
| "WaypointReached"
| "Roundabout"
| "StartAt"
| "DestinationReached"
| "EnterAgainstAllowedDirection"
| "LeaveAgainstAllowedDirection"
| undefined;
road?: string | undefined;

@@ -358,3 +427,8 @@ direction?: string | undefined;

function geocoderElement(waypoint: Waypoint, i: number, numberOfWaypoints: number, options: GeocoderElementOptions): GeocoderElement;
function geocoderElement(
waypoint: Waypoint,
i: number,
numberOfWaypoints: number,
options: GeocoderElementOptions,
): GeocoderElement;

@@ -365,5 +439,10 @@ function itineraryBuilder(options?: ItineraryBuilderOptions): ItineraryBuilder;

function errorControl(routingControl: Control, options: ErrorControlOptions): ErrorControl ;
function errorControl(routingControl: Control, options: ErrorControlOptions): ErrorControl;
function autocomplete(element: HTMLElement, callback: any, context: any, options: AutoCompleteOptions): AutoComplete;
function autocomplete(
element: HTMLElement,
callback: any,
context: any,
options: AutoCompleteOptions,
): AutoComplete;
}

@@ -388,3 +467,8 @@

function geocoderElement(waypoint: Routing.Waypoint, i: number, numberOfWaypoints: number, options: Routing.GeocoderElementOptions): Routing.GeocoderElement;
function geocoderElement(
waypoint: Routing.Waypoint,
i: number,
numberOfWaypoints: number,
options: Routing.GeocoderElementOptions,
): Routing.GeocoderElement;

@@ -395,6 +479,14 @@ function itineraryBuilder(options?: Routing.ItineraryBuilderOptions): Routing.ItineraryBuilder;

function errorControl(routingControl: Routing.Control, options: Routing.ErrorControlOptions): Routing.ErrorControl;
function errorControl(
routingControl: Routing.Control,
options: Routing.ErrorControlOptions,
): Routing.ErrorControl;
function autocomplete(element: HTMLElement, callback: any, context: any, options: Routing.AutoCompleteOptions): Routing.AutoComplete;
function autocomplete(
element: HTMLElement,
callback: any,
context: any,
options: Routing.AutoCompleteOptions,
): Routing.AutoComplete;
}
}
{
"name": "@types/leaflet-routing-machine",
"version": "3.2.4",
"version": "3.2.5",
"description": "TypeScript definitions for leaflet-routing-machine",

@@ -25,4 +25,4 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/leaflet-routing-machine",

},
"typesPublisherContentHash": "2e2a5ce22059551b81a1663e780051a7aa79d2f7d03058b11845fcc5b0c2b16a",
"typeScriptVersion": "4.0"
"typesPublisherContentHash": "fd27dc6eb00c8e5b97140ff4522208e665ec16bb9897f324a206cdf6491f2d90",
"typeScriptVersion": "4.3"
}

@@ -11,3 +11,3 @@ # Installation

### Additional Details
* Last updated: Tue, 28 Jun 2022 19:40:24 GMT
* Last updated: Wed, 30 Aug 2023 19:34:56 GMT
* Dependencies: [@types/leaflet](https://npmjs.com/package/@types/leaflet)

@@ -14,0 +14,0 @@ * Global values: none

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc