Selectors
To optimize response time and size, by default, the MVT and JSON API return a minimized response. This approach ensures peak performance and reduces tile payload sizes, which is critical for smooth map interactions. By using selectors, you can include the additional data points your application specifically requires.
Available selectors
Any field listed in the station properties for MVT and JSON tiles can be used as a selector in its respective service, with the exception of the mandatory GeoJSON fields returned in JSON endpoint.
count·integer· default- The count of stations within a cluster count of 1 means a Station feature, where count greater than 1 means a Cluster feature
expansion_zoom·integer· default- The zoom level at which a cluster splits into multiple smaller clusters or stations.
id·string- The identifier of the station.
lng·float- The longitude of the station.
lat·float- The latitude of the station.
station_maximum_power·integer- The station’s maximum charging power (in kW) available at the station. This value is static and always reflects the station’s highest capability, regardless of connector filters.
connector_maximum_power·integer- The maximum charging power (in kW) available from the connectors matching the
connectors[]filter. If no filter is provided, all connectors are considered and it matchesstation_maximum_power. preferred_operator·boolean- Indicates if the operator of a station is as a preferred operator. Preferred operators can be managed on project level in the Dashboard.
evse_status_blocked·integer- The number of EVSEs in blocked status. If a
connectors[]filter is provided, it only counts blocked EVSEs that match the selected connector types. evse_status_planned·integer- Number of EVSEs in planned status. If a
connectors[]filter is provided, it only counts planned EVSEs that have at least one of selected connector types. evse_status_available·integer- Number of EVSEs in status available. If a
connectors[]filter is provided, it only counts planned EVSEs that have at least one of selected connector types. evse_status_charging·integer- Number of EVSEs in status charging. If a
connectors[]filter is provided, it only counts planned EVSEs that have at least one of selected connector types. evse_status_unknown·integer- Number of EVSEs in status unknown. If a
connectors[]filter is provided, it only counts planned EVSEs that have at least one of selected connector types. evse_status_reserved·integer- Number of EVSEs in status reserved. If a
connectors[]filter is provided, it only counts reserved EVSEs that have at least one of selected connector types. evse_status_out_of_order·integer- Number of EVSEs in status out_of_order. If a
connectors[]filter is provided, it only counts out of order EVSEs that have at least one of selected connector types. evse_status_inoperative·integer- Number of EVSEs in status inoperative. If a
connectors[]filter is provided, it only counts inoperative EVSEs that have at least one of selected connector types.
Implementation
To request specific properties, append station_properties[] query parameter to the tile request URL.
https://api.chargetrip.io/v2/station/.../?station_properties[]={selector1}&station_properties[]={selector2}&station_properties[]={selector3}
Behaviour examples
When selectors are provided, the request returns only the specified fields.
GeoJSON
In the GeoJSON endpoint, the mandatory GeoJSON fields (type and geometry and id) are always returned regardless of the selectors chosen.
{
"type": "FeatureCollection",
"features": [
// Station feature
{
"id": "132313",
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [6.789, 52.234]
},
// 'count' is missing because it wasn't provided as selector
"properties": {
"station_maximum_power": 350,
"preferred_operator": true
}
},
// Cluster feature
// Cluster feature is not modified, as it's not affected by the selectors.
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [6.723, 50.0]
},
"properties": {
"count": 3,
"expansion_zoom": 18
}
}
]
}
MVT
In MVT endpoint, only the parameters explicitly selected are returned as there are no mandatory fields.
// Station feature
// 'count' is missing because it wasn't provided as a selector.
{
"id": "132313",
"preferred_operator": false,
"station_maximum_power": 350
}
// Cluster feature
// Cluster feature is not modified, as it's not affected by the selectors.
{
"count": 3,
"expansion_zoom":32
}