MVT
The MVT (Mapbox Vector Tile) service provides access to geographic data related to stations, organized in a tile-based format. For each requested tile, the API returns a station layer, which contains a collection of features. Each feature in this layer represents either an individual station or a cluster of stations, depending on the zoom level and the density of stations in the area.
Base URL
To access the station data in MVT format, send a request to the following endpoint:
Mapbox Vector Tile / Base URL
- 01
https://api.chargetrip.io/station/tile.mvt/{z}/{x}/{y}
URL Parameters
{z}
: Zoom level (integer) – Determines the scale of the map and the detail of the data returned.{x}
: Tile column (integer) – Identifies the X coordinate of the tile in the grid.{y}
: Tile row (integer) – Identifies the Y coordinate of the tile in the grid.
Most map providers have built-in methods to convert latitude and longitude to pixel coordinates. To manually convert latitude and longitude coordinates to x
and y
use the Web Mercator Projection.
Response
All features returned by the MVT API have the following properties:
Key | Type | Description |
---|---|---|
id | string | The identifier of the station. For clusters, this property represents the first station within the cluster. |
lat | number | The latitude of the station or cluster. For clusters, this property represents the first station within the cluster. |
lng | number | The longitude of the station or cluster. For clusters, this property represents the first station within the cluster. |
count | number | The count of stations within a cluster. This property can also be used to distinguish between individual stations and clusters. If the count is 1 it indicates a station. |
speed | enum | The power of a station: slow , fast or turbo . Slow stations are below 43 kWh, fast are between 43 kWh (inclusive) and 150 kWh and turbo are equal or above 150 kWh. For clusters, this property represents the first station within the cluster. |
status | enum | The availability status of a station or cluster: free, busy, unknown, or error. For clusters, this property represents the first station within the cluster. |
expansion_zoom | number | The zoom level at which a cluster splits into multiple smaller clusters or stations. |
operator_id | string (optional) | The operator identifier of the operator of the station. The property will not be returned if the operator's data is not available for the station. For clusters, this property represents the first station within the cluster. |
preferred_operator | boolean | This flag indicates if the operator of a station is marked as a preferred operator. Preferred operators can be managed on project level in the Dashboard. For clusters, this property represents the first station within the cluster. |
expansionZoom | number | Deprecated in favor of expansion_zoom . |
preferredOperator | boolean | Deprecated in favor of preferred_operator . |