Mapbox powers navigation for people, packages, and vehicles everywhere.
Mapbox is a powerful mapping platform that enables developers to create
interactive maps for a variety of purposes. Here are some examples of what you
can build with the Mapbox API:
import { axios } from "@pipedream/platform"
export default defineComponent({
props: {
mapbox: {
type: "app",
app: "mapbox",
}
},
async run({steps, $}) {
return await axios($, {
url: `https://api.mapbox.com/directions/v5/mapbox/driving/41.41338%2C2.27403%3B41.40338%2C2.17403`,
params: {
access_token: `${this.mapbox.$auth.access_token}`,
alternatives: `true`,
geometries: `geojson`,
language: `en`,
overview: `simplified`,
steps: `true`,
},
})
},
})
export default defineComponent({
async run({ steps, $ }) {
const text = ' Hello world! ';
return text.trim()
},
})