Filters
To render stations on a map, you need to add a set of filters to the tile request. These filters are sent as query parameters and must be appended after ?.
Query parameters
Below you can find an overview of possible query parameters you can apply.
powers
Configures the charging speed powers that will be included in the tiles.
Accepts all
or an array of kWh values.
powerGroups
Configures the charging speed group powers that will be included in the tiles. There are three StationSpeedType groups available: slow
, fast
and turbo
. You can mix powerGroups with individual powers.
connectors
Configures the connector standards that will be included in the tiles. You can send an array with OCPIConnectorTypes
.
amenities
Configures the amenities that should be present near or at charging stations. Accepts an array of strings with any of the following values:
- hotel
- shopping
- bathroom
- supermarket
- playground
- pharmacy
- museum
- coffee
- park
- restaurant
availableOnly
Configures if only available stations should be included in the tiles. Accepts a boolean value.
preferredOperator
Only allow pre-defined preferred operators to be included in the tile service. Preferred operators can be set in advanced project settings within the dashboard.
excludedOperator
Prevent excluded operators to be shown in the tile service. Excluded operators can be set in advanced project settings within the dashboard.
Count
You can request the number of displayed stations on the map by using the following API endpoint. If you applied any filters you will need to apply them to the count endpoint as well to make sure you receive the correct count.
Tile Service / Count Request
- 01
- 02
https://api.chargetrip.io/station/count.json
https://api.chargetrip.io/station/count.json?powers[]=22&powers[]=43&connectors[]=CHADEMO&connectors[]=IEC_62196_T2_COMBO&amenities[]=restaurant&availableOnly=true
It will return a response that looks like this:
Tile Service / Count Response
- 01
- 02
- 03
{
"count": 158
}