mapbox-assistant-example icon indicating copy to clipboard operation
mapbox-assistant-example copied to clipboard

Examples of Amazon Echo, Google Home, and other bots interacting with Mapbox services.

Mapbox Alexa skill

A skill for Amazon Echo to interact with Mapbox services.

image

Examples

Set your home address:

  • You: Alexa, tell Mapbox that my address is <address>.
  • Alexa: Thank you, home address set.

Set your office address:

  • You: Alexa, tell Mapbox that my office address is <address>.
  • Alexa: Thank you, office address set.

Get traffic information:

  • You: Alexa, ask Mapbox how long is my commute.
  • Alexa: Your commute is 3 kilometers long, a 9 minutes drive with current traffic.

Use the Directions API:

  • You: Alexa, ask Mapbox how far is <address>.
  • Alexa: That address is a 4 kilometers drive, 10 minutes with current traffic.

Use the Geocoding API:

  • You: Alexa, ask Mapbox what's popular nearby.
  • Alexa: Have you tried Dupont Circle Fountain, Washington, District of Columbia 20036, United States?

Read the latest post on the blog:

  • You: Alexa, ask Mapbox what's new.
  • Alexa: Over the last week we've published 9 stories, our latest is that David Rhodes published today Bringing real-world places into your game.

Dependencies

  • Mapbox Android Services.
  • The skill runs on AWS Lambda, session state (user home/work addresses) is stored on AWS S3.

Deploy to AWS Lambda

  • Build the .zip deployment package: make build.
  • Output is in skill/build/distributions/alexa-skill-0.1.zip.
  • Upload to AWS Lambda.

Mapbox Conversation Action for the Google Assistant

A Conversation Action for Google Assistant users using API.AI to interact with Mapbox services.

Google Home

Examples

Get a route:

  • You: Hey Google! Mapbox.
  • Google Home: Hi! I'm your Mapbox assistant. What can I do for you today?
  • You: I'd like to go from Valencia to Barcelona.
  • Google Home: The route from Valencia to Barcelona is 350756.4 meters long and it will take you around 197.88 minutes.

Dependencies

Build your own Conversation Action

  • API.AI
  1. Create Your Conversational AI Assistant

  2. Create A User Intent

  • Amazon AWS
  1. Create an Amazon IAM User

  2. Create A Lambda Function

  3. Code Your Lambda Function (e.g. mapboxAssistant.js)

  4. Create an Endpoint in API Gateway

  • API.AI
  1. Use Your New API for Intent Fulfillment

  2. Test On The Google Home