External APIs

Mapbox: Static Maps

Create a custom, embeddable static map with zoom, bearing, and pitch
Back to BLOCKS

About Mapbox: Static Maps

Mapbox's Static Maps API creates an embedded, customizable map for web and mobile apps, without the interactivity.

The Static Maps block allows you to create these maps based on your data streams, and publish that map in realtime. This works great for apps that don't require realtime geolocation tracking, but still want to display an updated location to a user at a custom time, or based on a custom action.

Try it Now
Categories:
External APIs External APIs
Charting & Graphing
Charting & Graphing
Geolocation
Geolocation
Last Updated:
20160929 at 14:01:12
Author:
PubNub
staticmaps

Walkthrough

This block uses the Mapbox Static Map API to generate a visual static map using the provided latitude, longitude, and zoom values.

For more information, please review the Mapbox Static documentation on the API page.

Input

Input Channel: mapbox-static-channel (configurable)lat latitude of the center point of the maplng longitude of the center point of the mapzoom zoom value
{
    "lat": 70,
    "lng": 30,
    "zoom": 4
}

Output

The block appends the picture of the map returned by the Mapbox Static Map API into the message payload. Please refer to the Mapbox documentation for config information
{
    "lat": 70,
    "lng": 30,
    "zoom": 4,
    "map": "<map url>"
}