diff --git a/dist/index.html b/dist/index.html index f5b0414f..32a03d1d 100644 --- a/dist/index.html +++ b/dist/index.html @@ -63,6 +63,7 @@

Maps JSAPI Samples

  • react-ui-kit-place-details-latlng-compact
  • react-ui-kit-search-nearby
  • react-ui-kit-search-text
  • +
  • routes-get-alternatives
  • routes-get-directions
  • routes-get-directions-panel
  • routes-route-matrix
  • diff --git a/dist/samples/routes-get-alternatives/app/.eslintsrc.json b/dist/samples/routes-get-alternatives/app/.eslintsrc.json new file mode 100644 index 00000000..4c44dab0 --- /dev/null +++ b/dist/samples/routes-get-alternatives/app/.eslintsrc.json @@ -0,0 +1,13 @@ +{ + "extends": [ + "plugin:@typescript-eslint/recommended" + ], + "parser": "@typescript-eslint/parser", + "rules": { + "@typescript-eslint/ban-ts-comment": 0, + "@typescript-eslint/no-this-alias": 1, + "@typescript-eslint/no-empty-function": 1, + "@typescript-eslint/explicit-module-boundary-types": 1, + "@typescript-eslint/no-unused-vars": 1 + } +} diff --git a/dist/samples/routes-get-alternatives/app/README.md b/dist/samples/routes-get-alternatives/app/README.md new file mode 100644 index 00000000..62904810 --- /dev/null +++ b/dist/samples/routes-get-alternatives/app/README.md @@ -0,0 +1,33 @@ +# Google Maps JavaScript Sample + +This sample is generated from @googlemaps/js-samples located at +https://github.com/googlemaps-samples/js-api-samples. + +## Setup + +### Before starting run: + +`$npm i` + +### Run an example on a local web server + +First `cd` to the folder for the sample to run, then: + +`$npm start` + +### Build an individual example + +From `samples/`: + +`$npm run build --workspace=sample-name/` + +### Build all of the examples. + +From `samples/`: +`$npm run build-all` + +## Feedback + +For feedback related to this sample, please open a new issue on +[GitHub](https://github.com/googlemaps-samples/js-api-samples/issues). + diff --git a/dist/samples/routes-get-alternatives/app/index.html b/dist/samples/routes-get-alternatives/app/index.html new file mode 100644 index 00000000..bda26d92 --- /dev/null +++ b/dist/samples/routes-get-alternatives/app/index.html @@ -0,0 +1,22 @@ + + + + + + Get directions + + + + + + + + + + + \ No newline at end of file diff --git a/dist/samples/routes-get-alternatives/app/index.ts b/dist/samples/routes-get-alternatives/app/index.ts new file mode 100644 index 00000000..03822fa2 --- /dev/null +++ b/dist/samples/routes-get-alternatives/app/index.ts @@ -0,0 +1,99 @@ +/* + * @license + * Copyright 2025 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +// [START maps_routes_get_alternatives] +// Initialize and add the map. +let mapPolylines: google.maps.Polyline[] = []; +const mapElement = document.querySelector('gmp-map') as google.maps.MapElement; +let innerMap; + +// Initialize and add the map. +async function initMap() { + // Request the needed libraries. + await google.maps.importLibrary('maps') as google.maps.MapsLibrary; + + innerMap = mapElement.innerMap; + innerMap.setOptions({ + mapTypeControl: false, + mapId: 'DEMO_MAP_ID', + }); + + // Call the function after the map is loaded. + google.maps.event.addListenerOnce(innerMap, 'idle', () => { + getDirections(); + }); + +} + +async function getDirections() { + //@ts-ignore + // Request the needed libraries. + const [{ Route, RouteLabel }] = await Promise.all([ + google.maps.importLibrary('routes') + ]); + // [START maps_routes_get_alternatives_request_full] + // [START maps_routes_get_alternatives_request] + // Build a request. + const request = { + origin: 'San Francisco, CA', + destination: 'Sunset Dr Pacific Grove, CA 93950', + travelMode: 'DRIVING', + computeAlternativeRoutes: true, + fields: ['path', 'routeLabels', 'viewport'], // Request the routeLabels field. + }; + // [END maps_routes_get_alternatives_request] + + // [START maps_routes_get_alternatives_compute] + // Call computeRoutes to get the directions. + const result = await Route.computeRoutes(request); + if (!result.routes || result.routes.length === 0) { + console.warn("No routes found"); + return; + } + + let primaryRoute; + + for (const route of result.routes) { + // Save the primary route for last so it's drawn on top. + if ( + // Check for the default route. + route.routeLabels?.includes(RouteLabel.DEFAULT_ROUTE) + ) { + primaryRoute = route; + } else { + drawRoute(route, false); + } + } + + if (primaryRoute) { + drawRoute(primaryRoute, true); + await primaryRoute.createWaypointAdvancedMarkers({ map: innerMap }); + innerMap.fitBounds(primaryRoute.viewport, 100); + } + // [END maps_routes_get_alternatives_compute] + // [END maps_routes_get_alternatives_request_full] + + // Display the raw JSON for the result in the console. + console.log(`Response:\n ${JSON.stringify(result, null, 2)}`); +} + +function drawRoute(route, isPrimaryRoute) { + mapPolylines = mapPolylines.concat( + route.createPolylines({ + polylineOptions: isPrimaryRoute + ? { map: innerMap } + : { + map: innerMap, + strokeColor: "#669DF6", + strokeOpacity: 0.5, + strokeWidth: 8, + }, + colorScheme: innerMap.get("colorScheme"), + }), + ); +} + +initMap(); +// [END maps_routes_get_alternatives] diff --git a/dist/samples/routes-get-alternatives/app/package.json b/dist/samples/routes-get-alternatives/app/package.json new file mode 100644 index 00000000..390186e9 --- /dev/null +++ b/dist/samples/routes-get-alternatives/app/package.json @@ -0,0 +1,14 @@ +{ + "name": "@js-api-samples/routes-get-alternatives", + "version": "1.0.0", + "scripts": { + "build": "tsc && bash ../jsfiddle.sh routes-get-alternatives && bash ../app.sh routes-get-alternatives && bash ../docs.sh routes-get-alternatives && npm run build:vite --workspace=. && bash ../dist.sh routes-get-alternatives", + "test": "tsc && npm run build:vite --workspace=.", + "start": "tsc && vite build --base './' && vite", + "build:vite": "vite build --base './'", + "preview": "vite preview" + }, + "dependencies": { + + } +} diff --git a/dist/samples/routes-get-alternatives/app/style.css b/dist/samples/routes-get-alternatives/app/style.css new file mode 100644 index 00000000..409bbbf6 --- /dev/null +++ b/dist/samples/routes-get-alternatives/app/style.css @@ -0,0 +1,24 @@ +/* + * @license + * Copyright 2025 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +/* [START maps_routes_get_alternatives] */ +/* + * Always set the map height explicitly to define the size of the div element + * that contains the map. + */ +#map { + height: 100%; +} + +/* + * Optional: Makes the sample page fill the window. + */ +html, +body { + height: 100%; + margin: 0; + padding: 0; +} +/* [END maps_routes_get_alternatives] */ diff --git a/dist/samples/routes-get-alternatives/app/tsconfig.json b/dist/samples/routes-get-alternatives/app/tsconfig.json new file mode 100644 index 00000000..09179087 --- /dev/null +++ b/dist/samples/routes-get-alternatives/app/tsconfig.json @@ -0,0 +1,17 @@ +{ + "compilerOptions": { + "module": "esnext", + "target": "esnext", + "strict": true, + "noImplicitAny": false, + "lib": [ + "es2015", + "esnext", + "es6", + "dom", + "dom.iterable" + ], + "moduleResolution": "Node", + "jsx": "preserve" + } + } \ No newline at end of file diff --git a/dist/samples/routes-get-alternatives/dist/assets/index-Bau6tfzo.js b/dist/samples/routes-get-alternatives/dist/assets/index-Bau6tfzo.js new file mode 100644 index 00000000..2715be9f --- /dev/null +++ b/dist/samples/routes-get-alternatives/dist/assets/index-Bau6tfzo.js @@ -0,0 +1,6 @@ +(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))n(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0});function s(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function n(e){if(e.ep)return;e.ep=!0;const t=s(e);fetch(e.href,t)}})();/* + * @license + * Copyright 2025 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */let c=[];const u=document.querySelector("gmp-map");let o;async function p(){await google.maps.importLibrary("maps"),o=u.innerMap,o.setOptions({mapTypeControl:!1,mapId:"DEMO_MAP_ID"}),google.maps.event.addListenerOnce(o,"idle",()=>{f()})}async function f(){const[{Route:i,RouteLabel:r}]=await Promise.all([google.maps.importLibrary("routes")]),s={origin:"San Francisco, CA",destination:"Sunset Dr Pacific Grove, CA 93950",travelMode:"DRIVING",computeAlternativeRoutes:!0,fields:["path","routeLabels","viewport"]},n=await i.computeRoutes(s);if(!n.routes||n.routes.length===0){console.warn("No routes found");return}let e;for(const t of n.routes)t.routeLabels?.includes(r.DEFAULT_ROUTE)?e=t:l(t,!1);e&&(l(e,!0),await e.createWaypointAdvancedMarkers({map:o}),o.fitBounds(e.viewport,100)),console.log(`Response: + ${JSON.stringify(n,null,2)}`)}function l(i,r){c=c.concat(i.createPolylines({polylineOptions:r?{map:o}:{map:o,strokeColor:"#669DF6",strokeOpacity:.5,strokeWidth:8},colorScheme:o.get("colorScheme")}))}p(); diff --git a/dist/samples/routes-get-alternatives/dist/assets/index-kz-ac4rW.css b/dist/samples/routes-get-alternatives/dist/assets/index-kz-ac4rW.css new file mode 100644 index 00000000..c4e6ccdb --- /dev/null +++ b/dist/samples/routes-get-alternatives/dist/assets/index-kz-ac4rW.css @@ -0,0 +1,5 @@ +/* + * @license + * Copyright 2025 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */#map{height:100%}html,body{height:100%;margin:0;padding:0} diff --git a/dist/samples/routes-get-alternatives/dist/index.html b/dist/samples/routes-get-alternatives/dist/index.html new file mode 100644 index 00000000..fdbcfa64 --- /dev/null +++ b/dist/samples/routes-get-alternatives/dist/index.html @@ -0,0 +1,22 @@ + + + + + + Get directions + + + + + + + + + + + \ No newline at end of file diff --git a/dist/samples/routes-get-alternatives/docs/index.html b/dist/samples/routes-get-alternatives/docs/index.html new file mode 100644 index 00000000..bda26d92 --- /dev/null +++ b/dist/samples/routes-get-alternatives/docs/index.html @@ -0,0 +1,22 @@ + + + + + + Get directions + + + + + + + + + + + \ No newline at end of file diff --git a/dist/samples/routes-get-alternatives/docs/index.js b/dist/samples/routes-get-alternatives/docs/index.js new file mode 100644 index 00000000..8cdf5635 --- /dev/null +++ b/dist/samples/routes-get-alternatives/docs/index.js @@ -0,0 +1,86 @@ +"use strict"; +/* + * @license + * Copyright 2025 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +// [START maps_routes_get_alternatives] +// Initialize and add the map. +let mapPolylines = []; +const mapElement = document.querySelector('gmp-map'); +let innerMap; +// Initialize and add the map. +async function initMap() { + // Request the needed libraries. + await google.maps.importLibrary('maps'); + innerMap = mapElement.innerMap; + innerMap.setOptions({ + mapTypeControl: false, + mapId: 'DEMO_MAP_ID', + }); + // Call the function after the map is loaded. + google.maps.event.addListenerOnce(innerMap, 'idle', () => { + getDirections(); + }); +} +async function getDirections() { + //@ts-ignore + // Request the needed libraries. + const [{ Route, RouteLabel }] = await Promise.all([ + google.maps.importLibrary('routes') + ]); + // [START maps_routes_get_alternatives_request_full] + // [START maps_routes_get_alternatives_request] + // Build a request. + const request = { + origin: 'San Francisco, CA', + destination: 'Sunset Dr Pacific Grove, CA 93950', + travelMode: 'DRIVING', + computeAlternativeRoutes: true, + fields: ['path', 'routeLabels', 'viewport'], // Request the routeLabels field. + }; + // [END maps_routes_get_alternatives_request] + // [START maps_routes_get_alternatives_compute] + // Call computeRoutes to get the directions. + const result = await Route.computeRoutes(request); + if (!result.routes || result.routes.length === 0) { + console.warn("No routes found"); + return; + } + let primaryRoute; + for (const route of result.routes) { + // Save the primary route for last so it's drawn on top. + if ( + // Check for the default route. + route.routeLabels?.includes(RouteLabel.DEFAULT_ROUTE)) { + primaryRoute = route; + } + else { + drawRoute(route, false); + } + } + if (primaryRoute) { + drawRoute(primaryRoute, true); + await primaryRoute.createWaypointAdvancedMarkers({ map: innerMap }); + innerMap.fitBounds(primaryRoute.viewport, 100); + } + // [END maps_routes_get_alternatives_compute] + // [END maps_routes_get_alternatives_request_full] + // Display the raw JSON for the result in the console. + console.log(`Response:\n ${JSON.stringify(result, null, 2)}`); +} +function drawRoute(route, isPrimaryRoute) { + mapPolylines = mapPolylines.concat(route.createPolylines({ + polylineOptions: isPrimaryRoute + ? { map: innerMap } + : { + map: innerMap, + strokeColor: "#669DF6", + strokeOpacity: 0.5, + strokeWidth: 8, + }, + colorScheme: innerMap.get("colorScheme"), + })); +} +initMap(); +// [END maps_routes_get_alternatives] diff --git a/dist/samples/routes-get-alternatives/docs/index.ts b/dist/samples/routes-get-alternatives/docs/index.ts new file mode 100644 index 00000000..03822fa2 --- /dev/null +++ b/dist/samples/routes-get-alternatives/docs/index.ts @@ -0,0 +1,99 @@ +/* + * @license + * Copyright 2025 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +// [START maps_routes_get_alternatives] +// Initialize and add the map. +let mapPolylines: google.maps.Polyline[] = []; +const mapElement = document.querySelector('gmp-map') as google.maps.MapElement; +let innerMap; + +// Initialize and add the map. +async function initMap() { + // Request the needed libraries. + await google.maps.importLibrary('maps') as google.maps.MapsLibrary; + + innerMap = mapElement.innerMap; + innerMap.setOptions({ + mapTypeControl: false, + mapId: 'DEMO_MAP_ID', + }); + + // Call the function after the map is loaded. + google.maps.event.addListenerOnce(innerMap, 'idle', () => { + getDirections(); + }); + +} + +async function getDirections() { + //@ts-ignore + // Request the needed libraries. + const [{ Route, RouteLabel }] = await Promise.all([ + google.maps.importLibrary('routes') + ]); + // [START maps_routes_get_alternatives_request_full] + // [START maps_routes_get_alternatives_request] + // Build a request. + const request = { + origin: 'San Francisco, CA', + destination: 'Sunset Dr Pacific Grove, CA 93950', + travelMode: 'DRIVING', + computeAlternativeRoutes: true, + fields: ['path', 'routeLabels', 'viewport'], // Request the routeLabels field. + }; + // [END maps_routes_get_alternatives_request] + + // [START maps_routes_get_alternatives_compute] + // Call computeRoutes to get the directions. + const result = await Route.computeRoutes(request); + if (!result.routes || result.routes.length === 0) { + console.warn("No routes found"); + return; + } + + let primaryRoute; + + for (const route of result.routes) { + // Save the primary route for last so it's drawn on top. + if ( + // Check for the default route. + route.routeLabels?.includes(RouteLabel.DEFAULT_ROUTE) + ) { + primaryRoute = route; + } else { + drawRoute(route, false); + } + } + + if (primaryRoute) { + drawRoute(primaryRoute, true); + await primaryRoute.createWaypointAdvancedMarkers({ map: innerMap }); + innerMap.fitBounds(primaryRoute.viewport, 100); + } + // [END maps_routes_get_alternatives_compute] + // [END maps_routes_get_alternatives_request_full] + + // Display the raw JSON for the result in the console. + console.log(`Response:\n ${JSON.stringify(result, null, 2)}`); +} + +function drawRoute(route, isPrimaryRoute) { + mapPolylines = mapPolylines.concat( + route.createPolylines({ + polylineOptions: isPrimaryRoute + ? { map: innerMap } + : { + map: innerMap, + strokeColor: "#669DF6", + strokeOpacity: 0.5, + strokeWidth: 8, + }, + colorScheme: innerMap.get("colorScheme"), + }), + ); +} + +initMap(); +// [END maps_routes_get_alternatives] diff --git a/dist/samples/routes-get-alternatives/docs/style.css b/dist/samples/routes-get-alternatives/docs/style.css new file mode 100644 index 00000000..409bbbf6 --- /dev/null +++ b/dist/samples/routes-get-alternatives/docs/style.css @@ -0,0 +1,24 @@ +/* + * @license + * Copyright 2025 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ +/* [START maps_routes_get_alternatives] */ +/* + * Always set the map height explicitly to define the size of the div element + * that contains the map. + */ +#map { + height: 100%; +} + +/* + * Optional: Makes the sample page fill the window. + */ +html, +body { + height: 100%; + margin: 0; + padding: 0; +} +/* [END maps_routes_get_alternatives] */ diff --git a/dist/samples/routes-get-alternatives/jsfiddle/demo.css b/dist/samples/routes-get-alternatives/jsfiddle/demo.css new file mode 100644 index 00000000..88fcce2a --- /dev/null +++ b/dist/samples/routes-get-alternatives/jsfiddle/demo.css @@ -0,0 +1,24 @@ +/* + * @license + * Copyright 2025 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +/* + * Always set the map height explicitly to define the size of the div element + * that contains the map. + */ +#map { + height: 100%; +} + +/* + * Optional: Makes the sample page fill the window. + */ +html, +body { + height: 100%; + margin: 0; + padding: 0; +} + diff --git a/dist/samples/routes-get-alternatives/jsfiddle/demo.details b/dist/samples/routes-get-alternatives/jsfiddle/demo.details new file mode 100644 index 00000000..6d7f5601 --- /dev/null +++ b/dist/samples/routes-get-alternatives/jsfiddle/demo.details @@ -0,0 +1,7 @@ +name: routes-get-alternatives +authors: + - Geo Developer IX Documentation Team +tags: + - google maps +load_type: h +description: Sample code supporting Google Maps Platform JavaScript API documentation. diff --git a/dist/samples/routes-get-alternatives/jsfiddle/demo.html b/dist/samples/routes-get-alternatives/jsfiddle/demo.html new file mode 100644 index 00000000..c2b60bf8 --- /dev/null +++ b/dist/samples/routes-get-alternatives/jsfiddle/demo.html @@ -0,0 +1,21 @@ + + + + + + Get directions + + + + + + + + + + diff --git a/dist/samples/routes-get-alternatives/jsfiddle/demo.js b/dist/samples/routes-get-alternatives/jsfiddle/demo.js new file mode 100644 index 00000000..2c9698c0 --- /dev/null +++ b/dist/samples/routes-get-alternatives/jsfiddle/demo.js @@ -0,0 +1,86 @@ +"use strict"; +/* + * @license + * Copyright 2025 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */ + +// Initialize and add the map. +let mapPolylines = []; +const mapElement = document.querySelector('gmp-map'); +let innerMap; +// Initialize and add the map. +async function initMap() { + // Request the needed libraries. + await google.maps.importLibrary('maps'); + innerMap = mapElement.innerMap; + innerMap.setOptions({ + mapTypeControl: false, + mapId: 'DEMO_MAP_ID', + }); + // Call the function after the map is loaded. + google.maps.event.addListenerOnce(innerMap, 'idle', () => { + getDirections(); + }); +} +async function getDirections() { + //@ts-ignore + // Request the needed libraries. + const [{ Route, RouteLabel }] = await Promise.all([ + google.maps.importLibrary('routes') + ]); + + + // Build a request. + const request = { + origin: 'San Francisco, CA', + destination: 'Sunset Dr Pacific Grove, CA 93950', + travelMode: 'DRIVING', + computeAlternativeRoutes: true, + fields: ['path', 'routeLabels', 'viewport'], // Request the routeLabels field. + }; + + + // Call computeRoutes to get the directions. + const result = await Route.computeRoutes(request); + if (!result.routes || result.routes.length === 0) { + console.warn("No routes found"); + return; + } + let primaryRoute; + for (const route of result.routes) { + // Save the primary route for last so it's drawn on top. + if ( + // Check for the default route. + route.routeLabels?.includes(RouteLabel.DEFAULT_ROUTE)) { + primaryRoute = route; + } + else { + drawRoute(route, false); + } + } + if (primaryRoute) { + drawRoute(primaryRoute, true); + await primaryRoute.createWaypointAdvancedMarkers({ map: innerMap }); + innerMap.fitBounds(primaryRoute.viewport, 100); + } + + + // Display the raw JSON for the result in the console. + console.log(`Response:\n ${JSON.stringify(result, null, 2)}`); +} +function drawRoute(route, isPrimaryRoute) { + mapPolylines = mapPolylines.concat(route.createPolylines({ + polylineOptions: isPrimaryRoute + ? { map: innerMap } + : { + map: innerMap, + strokeColor: "#669DF6", + strokeOpacity: 0.5, + strokeWidth: 8, + }, + colorScheme: innerMap.get("colorScheme"), + })); +} +initMap(); + diff --git a/index.html b/index.html index f5b0414f..32a03d1d 100644 --- a/index.html +++ b/index.html @@ -63,6 +63,7 @@

    Maps JSAPI Samples

  • react-ui-kit-place-details-latlng-compact
  • react-ui-kit-search-nearby
  • react-ui-kit-search-text
  • +
  • routes-get-alternatives
  • routes-get-directions
  • routes-get-directions-panel
  • routes-route-matrix
  • diff --git a/package-lock.json b/package-lock.json index 938d540c..575abe84 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1404,6 +1404,10 @@ "resolved": "samples/react-ui-kit-place-details-compact", "link": true }, + "node_modules/@js-api-samples/routes-get-alternatives": { + "resolved": "samples/routes-get-alternatives", + "link": true + }, "node_modules/@js-api-samples/routes-get-directions": { "resolved": "samples/routes-get-directions", "link": true @@ -5882,11 +5886,11 @@ "version": "1.0.0", "dependencies": { "@googlemaps/js-api-loader": "^1.16.8", - "terra-draw": "*", - "terra-draw-google-maps-adapter": "*" + "terra-draw": "latest", + "terra-draw-google-maps-adapter": "latest" }, "devDependencies": { - "@types/google.maps": "*", + "@types/google.maps": "latest", "typescript": "^5.9.2", "vite": "^7.1.5" } @@ -6538,7 +6542,7 @@ "name": "@js-api-samples/react-ui-kit-place-details-by-latlng-compact", "version": "1.0.0", "dependencies": { - "@vis.gl/react-google-maps": "*", + "@vis.gl/react-google-maps": "latest", "react": "^19.0.0", "react-dom": "^19.0.0" }, @@ -9161,6 +9165,10 @@ } } }, + "samples/routes-get-alternatives": { + "name": "@js-api-samples/routes-get-alternatives", + "version": "1.0.0" + }, "samples/routes-get-directions": { "name": "@js-api-samples/routes-get-directions", "version": "1.0.0"