Home > @magiclane/maps-sdk > RouteBookmarks > addTrips

RouteBookmarks.addTrips() method

Import routes from a file and add them to this bookmarks collection.

The method attempts to parse and import trips from the given filename. On success it returns the number of imported routes. If the import fails the method returns an error code.

Signature:

addTrips(filename: string): number;

Parameters

Parameter

Type

Description

filename

string

Path to the file containing exported bookmarks/trips.

Returns:

number

Number of imported routes on success, or an error code on failure.