PubNub Integration

Mapbox: Geocoding

Data Streaming & Dashboards

Data Streaming & Dashboards

Geolocation

Geolocation

Last Updated:

2016/09/19

Author:

PubNub

Mapbox Signup

Turn-by-turn traffic-aware directions and ETAs, including driving, walking, and cycling

Mapbox's Geocoding API converts coordinates into addresses and addresses into coordinates for street addresses, cities, neighborhoods, and zip codes. The Mapbox Geocoding block allows you to execute the geocoding function while your data is in-motion, especially useful for delivery, ridesharing/taxi, and navigation applications, where geolocation data can be streamed, and addresses can be updated in realtime.

Walkthrough

The block requires one input: the query to send to Mapbox for geocoding. From within the block, the Geocoding API is called and the resposne from Mapbox is appended to the payload.

Input

Input Channel: mapbox-geocode-channel (configurable)query is the search query that will be sent to mapbox. The Query can be an address or a latitude,longitude pair

{
    "query": "725 folsom street, san francisco"
}

Output

The block appends the directions returned by the Mapbox Geocode API into the message payload. Please refer to the Mapbox documentation for field information

{
    "query": "725 folsom street, san francisco",
    "geocode": "geocoding information"
}

Feedback & Support

Need help? Contact PubNub Support.


Talk to an expert

Contact Sales