Compiled and developed by Umar Ali Khan in cooperation with Mapbox
This collection was produced in collaboration with Mapbox on 07-Aug-2018.
This repository holds a series of postman collections demonstrating a variety of use cases for all of the Mapbox Maps APIs.
These examples have been created for use with the Postman utility. Postman is a testing framework for REST APIs. The tool can be downloaded from www.getpostman.com.
To import the collection, first clone this repository, then open the Postman utility and select the Import option. Select the Folder tab from the dialog and drag and drop the cloned repository folder into the target.
The collections contained in this repository are organized under this scheme:
The Mapbox web services APIs allow for programmatic access to Mapbox tools and services. Use these APIs to retrieve information about your account, upload and change resources, and use core Mapbox tools, like geocoding and directions.
The Mapbox Maps API supports reading raster tilesets, vector tilesets, and Mapbox Editor project features. Tilesets can be retrieved as images, TileJSON, or HTML slippy maps for embedding. Mapbox Editor project features can be retrieved as GeoJSON or KML.
The Mapbox Styles API lets you read and change map styles, fonts, and images. This API is the basis for Mapbox Studio, our cartography software.
The Mapbox Static API returns static maps and raster tiles from styles in the Mapbox Style Specification. See the Static (Classic) API documentation.
Static maps are standalone images that can be displayed on web and mobile devices without the aid of a mapping library or API. They look like an embedded map without interactivity or controls.
The Mapbox Uploads API transforms geographic data into tilesets that can be used with maps and geographic applications. Given a wide variety of geospatial formats, it normalizes projections and generates tiles at multiple zoom levels to make data viewable on the web.
The upload workflow begins with a file and ends with a tileset?, or if you have invalid data, an error.
-
Retrieve upload status - Upload processing is fast but not immediate. Once an upload is created, you can track its status. Uploads have a progress property that will start at 0 and end at 1 when an upload is complete. If there's an error processing an upload, the error property will include an error message.
A dataset is an editable collection of GeoJSON features. The Datasets API offers persistent storage for custom geographic data and supports reading, creating, updating, and removing features. The goal of this API is to let you manage your geodata using Mapbox. To serve this data at scale, convert your dataset? into a tileset? using the Uploads API.
The Mapbox Tilequery API allows you to retrieve data about specific features from a vector tileset?, based on a given latitude and longitude?. With the Tilequery API, you can:
. Query for features within a given radius . Do point in polygon queries . Query multiple composited layers
The Mapbox Tilesets API supports reading metadata for raster and vector tilesets. To request tiles, consult the Maps API.
The Mapbox Geocoding? API does two things: forward geocoding and reverse geocoding.
Forward geocoding lets you convert location text into geographic coordinates, turning 2 Lincoln Memorial Circle NW into -77.050,38.889.
Batch requests have the same parameters as normal requests, but can include more than one query by separating queries with the ; character. Each query should be URL encoded, but the ; character should not be encoded and should be included verbatim. 4. ### POI categories - POI category search supports forward geocoding? requests of poi feature types in a queried category. Using the proximity query parameter with POI category search returns points of interest local to a provided location; for example, restaurants near a user. Any category that is returned in the properties.category property of the response object is supported.
The Mapbox Directions API will show you how to get where you're going. With the Directions API, you can:
. calculate optimal driving, walking, and cycling routes . produce turn-by-turn instructions . produce routes with up to 25 coordinates anywhere on earth
The Mapbox Map Matching API snaps fuzzy, inaccurate traces from a GPS unit or a phone to the OpenStreetMap? road and path network using the Directions API. This produces clean paths that can be displayed on a map or used for other analysis.
The Matrix API returns travel times between many points.
The Optimization API returns a duration-optimized route between the input coordinates. This is also known as solving the Traveling Salesperson Problem. A typical use case for this API is planning the route for deliveries in a city. A route can be retrieved for car driving, bicycling and walking or hiking.
. Mapbox/driving for car trips . Mapbox/walking for pedestrian and hiking trips . Mapbox/cycling for bicycle trips
An access token, referred to hereafter as 'token', grants access to Mapbox resources on behalf of a user. All accounts have a public token by default. Additional tokens can be created to grant additional, or more limited, privileges.
The Mapbox Analytics API returns API usage for services by resource. For example, it can calculate the number of geocoding requests made in a week with a specific access token.