Skip to content

EV Charge Station

EV Charging On Route

The charging on route feature provides drivers the ability to plan locations where vehicle recharge will be required on the route. The following parameters are used:

  1. Route: list of geo-points of the current route
  2. State of Charge: percentage of charge remaining on vehicle battery
  3. Remaining range: current estimated range of vehicle in Km
  4. Low energy threshold: the lowest percentage of remaining battery charge acceptable before next recharge. This parameter accepts a value of between 5 and 50.

With the above parameters this feature will recommend locations indicating where re-charge is required adjacent to driver’s route. Consider the following cases:

  • Route requires a single stop to charge: Feature will return several EV charge stations in vicinity of the required charging location adjacent to the route.
  • Route requires multiple charging stops: Features returns 2 or more ‘clusters’ of EV charge station locations with each cluster representing a recommend charge location.
  • Route requires no charging stops: If no charging is required then feature will return EV charge stations around the destination. Status code will indicate no charge is required (NO_CHARGING_REQUIRED see status codes table).
  • EV charge stations are not found to support the route: in cases where EV charge stations cannot be found to support any given leg of the route then this feature will not return any charge stations and status code will indicate failure to plan route (FAILED_TO_PLAN_ROUTE see status codes table). Changing filters or low energy threshold parameter may enable more charge stations to be found.

Filtering is supported based on below listed charging station attributes:

Filter by Charge Network

This feature enables drivers to find EV charge stations for a specific charging network such as Chargepoint or EVgo. To filter charge station search by network use the .evFilterChargerBrands() method within TNEntityEvChargingOnRouteParamsBuilder. The following table shows some common charge networks and their respective ids:

ID Charge Network
99100001 ChargePoint
99100002 Blink
99100003 eVgo
99100010 ElectrifyAmerica

Filter by Connector Type

This feature enables drivers to find EV charge stations by specific connector type such as J1772, CCS, etc. To filter charge stations by connector type use the .evFilterConnectorTypes() method within TNEntityEvChargingOnRouteParamsBuilder. The below table contains examples of commonly used connector types:

ID Connector Type
30001 J1772
30002 SAE Combo
30003 CHAdeMO

Filter by Charge Level

This feature enables drivers to find EV charge stations by specific power (charge) level such as Level 2 or DC Fast. To filter stations by charge level use the .evFilterPowerFeedLevels method within TNEntityEvChargingOnRouteParamsBuilder. Currently supported power levels are:

ID Power Level
1 Level 1
2 Level 2
5 DC Fast

Filter for free chargers

This feature allows users to find EV charge stations that are free to use. When this filter is set to true only free connectors are returned, when set to false only paid connectors are returned, and when set to null all connectors are returned.

Please see the API reference for the main classes related to Charging On Route.

Key methods

Method Details
location(_ lat: Double, _ lon: Double) The current location of the vehicle where the user would like to search for EV charging stations near. For example, location=37.1245,-122.45678.
route(_ route: [TNEntityGeoPoint]) Route points of the corridor
evContext(stateOfCharge: Double, lowEnergyThreshold: Double, remainingRangeInKm: Double) Vehicle current energy info, including current energy, current range, low energy threshold


Sample code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
let route = [
    TNEntityGeoPoint(lat: 37.785090, lon: -122.419880),
    TNEntityGeoPoint(lat: 37.785182, lon: -122.417924),
    TNEntityGeoPoint(lat: 37.785808, lon: -122.412992),
    TNEntityGeoPoint(lat: 37.786318, lon: -122.408954),
    TNEntityGeoPoint(lat: 37.785774, lon: -122.406246),
    TNEntityGeoPoint(lat: 37.783251, lon: -122.402708),
    TNEntityGeoPoint(lat: 37.781211, lon: -122.400159),
    TNEntityGeoPoint(lat: 37.779522, lon: -122.398145),
    TNEntityGeoPoint(lat: 37.774814, lon: -122.400996),
    TNEntityGeoPoint(lat: 37.760635, lon: -122.392570),
    TNEntityGeoPoint(lat: 37.749102, lon: -122.392758),
    TNEntityGeoPoint(lat: 37.726603, lon: -122.402483),
    TNEntityGeoPoint(lat: 37.714805, lon: -122.397974),
    TNEntityGeoPoint(lat: 37.704301, lon: -122.394287),
    TNEntityGeoPoint(lat: 37.669787, lon: -122.392891),
    TNEntityGeoPoint(lat: 37.660623, lon: -122.403926),
    TNEntityGeoPoint(lat: 37.644247, lon: -122.406364),
    TNEntityGeoPoint(lat: 37.630890, lon: -122.402811),
    TNEntityGeoPoint(lat: 37.611007, lon: -122.393655),
    TNEntityGeoPoint(lat: 37.601292, lon: -122.378646),
    TNEntityGeoPoint(lat: 37.587965, lon: -122.357438),
    TNEntityGeoPoint(lat: 37.573261, lon: -122.316743),
    TNEntityGeoPoint(lat: 37.550567, lon: -122.293655),
    TNEntityGeoPoint(lat: 37.548743, lon: -122.291949),
    TNEntityGeoPoint(lat: 37.529546, lon: -122.273979),
    TNEntityGeoPoint(lat: 37.506343, lon: -122.247718),
    TNEntityGeoPoint(lat: 37.495907, lon: -122.231907),
    TNEntityGeoPoint(lat: 37.487457, lon: -122.205884),
    TNEntityGeoPoint(lat: 37.481693, lon: -122.177417),
    TNEntityGeoPoint(lat: 37.466211, lon: -122.150899),
    TNEntityGeoPoint(lat: 37.452112, lon: -122.126930),
    TNEntityGeoPoint(lat: 37.428088, lon: -122.101374),
    TNEntityGeoPoint(lat: 37.418478, lon: -122.089184),
    TNEntityGeoPoint(lat: 37.411892, lon: -122.078361),
    TNEntityGeoPoint(lat: 37.407713, lon: -122.067189),
    TNEntityGeoPoint(lat: 37.403049, lon: -122.047017),
    TNEntityGeoPoint(lat: 37.399611, lon: -122.031169),
    TNEntityGeoPoint(lat: 37.396422, lon: -122.016668),
    TNEntityGeoPoint(lat: 37.394702, lon: -122.008838),
    TNEntityGeoPoint(lat: 37.389654, lon: -121.991164),
    TNEntityGeoPoint(lat: 37.384341, lon: -121.972437),
    TNEntityGeoPoint(lat: 37.377288, lon: -121.945145),
    TNEntityGeoPoint(lat: 37.376128, lon: -121.939052),
    TNEntityGeoPoint(lat: 37.368647, lon: -121.908964),
    TNEntityGeoPoint(lat: 37.360758, lon: -121.904873),
    TNEntityGeoPoint(lat: 37.351621, lon: -121.914449),
    TNEntityGeoPoint(lat: 37.347299, lon: -121.916365),
    TNEntityGeoPoint(lat: 37.346281, lon: -121.915170),
    TNEntityGeoPoint(lat: 37.348591, lon: -121.913474),
]

let params = TNEntityEvChargingOnRouteParamsBuilder()
    .route(route)
    .location(37.78509,-122.41988)
    .evContext(stateOfCharge: 75, lowEnergyThreshold: 30, remainingRangeInKm: 40)
    .build()

TNEntityClient.evChargingOnRoute(params: params) { (result, error) in
    if let evClusters = result?.results {
        for evCluster in evClusters {

        }
    }
}

Response example

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
{
  "status": {
    "status": 12200,
    "message": "SUCCESS"
  },
  "reference_id": "062446d7-ba1e-4fe6-a062-cf64028522b6",
  "results": [
    {
      "cluster_number": 1,
      "entities": [
        {
          "id": "P-1453820313",
          "type": "PLACE",
          "place": {
            "name": "LONE WOLF H-D DCFAST HOG",
            "phone_numbers": [
              "18887584389"
            ],
            "categories": [
              {
                "id": "771",
                "name": "Electric Charge"
              }
            ],
            "address": {
              "formatted_address": "19011 E Cataldo Ave, Spokane Valley WA 99016, USA",
              "house_number": "19011",
              "street": {
                "body": "E Cataldo Ave",
                "formatted_name": "E Cataldo Ave"
              },
              "city": "Spokane Valley",
              "state": "WA",
              "country": "USA",
              "postal_code": "99016",
              "geo_coordinates": {
                "latitude": 47.66747,
                "longitude": -117.1493
              },
              "nav_coordinates": {
                "latitude": 47.66747,
                "longitude": -117.1493
              },
              "address_lines": [
                "19011 E Cataldo Ave",
                "Spokane Valley WA 99016, USA"
              ]
            }
          },
          "facets": {
            "ev_connectors": {
              "total_number": 1,
              "connector_counts": [
                {
                  "level": 5,
                  "total": 1
                }
              ],
              "connectors": [
                {
                  "connector_type": {
                    "id": 30002,
                    "name": "SAE Combo"
                  },
                  "power_feed_level": {
                    "level": 5,
                    "name": "DC Fast"
                  },
                  "connector_number": 1,
                  "charger_brand": {
                    "brand_id": "99100001",
                    "brand_name": "ChargePoint"
                  },
                  "customer_charge_level": 3,
                  "last_update_timestamp": 1611422632,
                  "max_power": 24.0,
                  "pricing": {
                    "rate_card": {
                      "text": [
                        "Flat Fee   0 USD\n"
                      ]
                    }
                  },
                  "id": "USCPIP1865021*1*77",
                  "is_free": true,
                  "ocpi_attributes": {
                    "location_id": "USCPIL1865021",
                    "location_name": "LONE WOLF H-D DCFAST HOG",
                    "evse_uid": "2194701",
                    "evse_id": "USCPIE1865021*1",
                    "evse_status": "UNKNOWN",
                    "evse_coordinates": {
                      "latitude": 47.667469,
                      "longitude": -117.149304
                    },
                    "evse_capabilities": [
                      "UNLOCK_CAPABLE",
                      "REMOTE_START_CAPABLE",
                      "RFID_READER"
                    ]
                  }
                }
              ]
            },
            "nearby": {
              "nearby_categories": [
                {
                  "category": {
                    "id": "226",
                    "name": "Restaurants"
                  },
                  "count": 1,
                  "distance": 402.336
                },
                {
                  "category": {
                    "id": "248",
                    "name": "Fast Food"
                  },
                  "count": 1,
                  "distance": 402.336
                }
              ]
            },
            "drive_time": {
              "drive_distance": 22871.0,
              "drive_duration": 1230
            }
          }
        }
      ]
    }
  ],
  "response_time": 445
}

Search With Filters

Key methods

Method Details
evFilterChargerBrands(_ chargerBrands: [String]) Filter by Charge Network
evFilterConnectorTypes(_ connectorTypes: [String]) Filter by Connector Type
evFilterPowerFeedLevels(_ powerFeedLevels: [Int]) Filter by Charge Level
evFilterFreeCharge(_ freeCharge: Bool) Filter by Free Chargers


Sample code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
let route = [
    TNEntityGeoPoint(lat: 37.785090, lon: -122.419880),
    TNEntityGeoPoint(lat: 37.785182, lon: -122.417924),
    TNEntityGeoPoint(lat: 37.785808, lon: -122.412992),
    TNEntityGeoPoint(lat: 37.786318, lon: -122.408954),
    TNEntityGeoPoint(lat: 37.785774, lon: -122.406246),
    TNEntityGeoPoint(lat: 37.783251, lon: -122.402708),
    TNEntityGeoPoint(lat: 37.781211, lon: -122.400159),
    TNEntityGeoPoint(lat: 37.779522, lon: -122.398145),
    TNEntityGeoPoint(lat: 37.774814, lon: -122.400996),
    TNEntityGeoPoint(lat: 37.760635, lon: -122.392570),
    TNEntityGeoPoint(lat: 37.749102, lon: -122.392758),
    TNEntityGeoPoint(lat: 37.726603, lon: -122.402483),
    TNEntityGeoPoint(lat: 37.714805, lon: -122.397974),
    TNEntityGeoPoint(lat: 37.704301, lon: -122.394287),
    TNEntityGeoPoint(lat: 37.669787, lon: -122.392891),
    TNEntityGeoPoint(lat: 37.660623, lon: -122.403926),
    TNEntityGeoPoint(lat: 37.644247, lon: -122.406364),
    TNEntityGeoPoint(lat: 37.630890, lon: -122.402811),
    TNEntityGeoPoint(lat: 37.611007, lon: -122.393655),
    TNEntityGeoPoint(lat: 37.601292, lon: -122.378646),
    TNEntityGeoPoint(lat: 37.587965, lon: -122.357438),
    TNEntityGeoPoint(lat: 37.573261, lon: -122.316743),
    TNEntityGeoPoint(lat: 37.550567, lon: -122.293655),
    TNEntityGeoPoint(lat: 37.548743, lon: -122.291949),
    TNEntityGeoPoint(lat: 37.529546, lon: -122.273979),
    TNEntityGeoPoint(lat: 37.506343, lon: -122.247718),
    TNEntityGeoPoint(lat: 37.495907, lon: -122.231907),
    TNEntityGeoPoint(lat: 37.487457, lon: -122.205884),
    TNEntityGeoPoint(lat: 37.481693, lon: -122.177417),
    TNEntityGeoPoint(lat: 37.466211, lon: -122.150899),
    TNEntityGeoPoint(lat: 37.452112, lon: -122.126930),
    TNEntityGeoPoint(lat: 37.428088, lon: -122.101374),
    TNEntityGeoPoint(lat: 37.418478, lon: -122.089184),
    TNEntityGeoPoint(lat: 37.411892, lon: -122.078361),
    TNEntityGeoPoint(lat: 37.407713, lon: -122.067189),
    TNEntityGeoPoint(lat: 37.403049, lon: -122.047017),
    TNEntityGeoPoint(lat: 37.399611, lon: -122.031169),
    TNEntityGeoPoint(lat: 37.396422, lon: -122.016668),
    TNEntityGeoPoint(lat: 37.394702, lon: -122.008838),
    TNEntityGeoPoint(lat: 37.389654, lon: -121.991164),
    TNEntityGeoPoint(lat: 37.384341, lon: -121.972437),
    TNEntityGeoPoint(lat: 37.377288, lon: -121.945145),
    TNEntityGeoPoint(lat: 37.376128, lon: -121.939052),
    TNEntityGeoPoint(lat: 37.368647, lon: -121.908964),
    TNEntityGeoPoint(lat: 37.360758, lon: -121.904873),
    TNEntityGeoPoint(lat: 37.351621, lon: -121.914449),
    TNEntityGeoPoint(lat: 37.347299, lon: -121.916365),
    TNEntityGeoPoint(lat: 37.346281, lon: -121.915170),
    TNEntityGeoPoint(lat: 37.348591, lon: -121.913474),
]

let params = TNEntityEvChargingOnRouteParamsBuilder()
    .route(route)
    .location(37.78509,-122.41988)
    .evContext(stateOfCharge: 75, lowEnergyThreshold: 30, remainingRangeInKm: 40)
    .evFilterConnectorTypes(["30002"])
    .evFilterPowerFeedLevels([5])
    .build()

TNEntityClient.evChargingOnRoute(params: params) { (result, error) in
    if let evClusters = result?.results {
        for evCluster in evClusters {

        }
    }
}

Provides search for EV charging stations near the current location of the vehicle. Also supports filtering based on key attributes of charging stations. If no results are found, changing filters may enable more charge stations to be found.

Please see the API reference for the main classes related to Nearby Search.

Base Search

Key methods

Method Details
location(_ lat: Double, _ lon: Double) The current location of the vehicle where the user would like to search for EV charging stations near. For example, location=37.1245,-122.45678.


Sample code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
let params = TNEntityEvNearbySearchParamsBuilder()
    .location(37.78509, -122.41988)
    .limit(5)
    .build()

TNEntityClient.evNearbySearch(params: params) { (result, error) in
    if let entities = result?.results {
        for entity in entities {

        }
    }
}

Response example

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
{
  "status": {
    "status": 12200,
    "message": "SUCCESS"
  },
  "reference_id": "9399a160-4ae3-4596-be9a-d5ddf33c3d13",
  "results": [
    {
      "id": "P-1453813038",
      "type": "PLACE",
      "place": {
        "name": "CCSF SFMTA SFPUC HEADQTRS",
        "phone_numbers": [
          "18887584389"
        ],
        "categories": [
          {
            "id": "771"
          }
        ],
        "address": {
          "formatted_address": "525 Golden Gate Ave, San Francisco CA 94102, USA",
          "house_number": "525",
          "street": {
            "body": "Golden Gate Ave",
            "formatted_name": "Golden Gate Ave"
          },
          "city": "San Francisco",
          "state": "CA",
          "country": "USA",
          "postal_code": "94102",
          "geo_coordinates": {
            "latitude": 37.78094,
            "longitude": -122.41918
          },
          "nav_coordinates": {
            "latitude": 37.78094,
            "longitude": -122.41918
          },
          "address_lines": [
            "525 Golden Gate Ave",
            "San Francisco CA 94102"
          ]
        }
      },
      "distance": 465.0,
      "facets": {
        "ev_connectors": {
          "total_number": 6,
          "connector_counts": [
            {
              "level": 2,
              "total": 3
            },
            {
              "level": 1,
              "total": 3
            }
          ],
          "connectors": [
            {
              "connector_type": {
                "id": 30001,
                "name": "J1772"
              },
              "power_feed_level": {
                "level": 2,
                "name": "Nivel 2"
              },
              "connector_number": 1,
              "charger_brand": {
                "brand_id": "99100001",
                "brand_name": "ChargePoint"
              },
              "customer_charge_level": 2,
              "last_update_timestamp": 1588303427,
              "max_power": 6.6,
              "pricing": {
                "rate_card": {
                  "text": [
                    "Flat Fee   0 USD\n"
                  ]
                }
              },
              "id": "USCPIP4567*2*3",
              "is_free": true,
              "ocpi_attributes": {
                "location_id": "USCPIL4567",
                "location_name": "CCSF SFMTA SFPUC HEADQTRS2",
                "evse_uid": "33703",
                "evse_id": "USCPIE4567*2",
                "evse_status": "UNKNOWN",
                "evse_coordinates": {
                  "latitude": 37.780933,
                  "longitude": -122.41925
                },
                "evse_capabilities": [
                  "UNLOCK_CAPABLE",
                  "REMOTE_START_STOP_CAPABLE",
                  "CREDIT_CARD_PAYABLE",
                  "RFID_READER"
                ]
              }
            },
            {
              "connector_type": {
                "id": 30007,
                "name": "NEMA 515/520"
              },
              "power_feed_level": {
                "level": 1,
                "name": "Nivel 1"
              },
              "connector_number": 1,
              "charger_brand": {
                "brand_id": "99100001",
                "brand_name": "ChargePoint"
              },
              "customer_charge_level": 1,
              "last_update_timestamp": 1517551509,
              "max_power": 1.92,
              "pricing": {
                "rate_card": {
                  "text": [
                    "Flat Fee   0 USD\n"
                  ]
                }
              },
              "id": "USCPIP4567*1*1",
              "is_free": true,
              "ocpi_attributes": {
                "location_id": "USCPIL4567",
                "location_name": "CCSF SFMTA SFPUC HEADQTRS2",
                "evse_uid": "33713",
                "evse_id": "USCPIE4567*1",
                "evse_status": "UNKNOWN",
                "evse_coordinates": {
                  "latitude": 37.780933,
                  "longitude": -122.41925
                },
                "evse_capabilities": [
                  "UNLOCK_CAPABLE",
                  "REMOTE_START_STOP_CAPABLE",
                  "CREDIT_CARD_PAYABLE",
                  "RFID_READER"
                ]
              }
            }
          ]
        },
        "nearby": {
          "nearby_categories": [
            {
              "category": {
                "id": "771"
              },
              "count": 231,
              "distance": 3218.688
            }
          ]
        },
        "drive_time": {
          "drive_distance": 533.0,
          "drive_duration": 77
        }
      }
    }
  ],
  "response_time": 394
}

Search With Filters

Key methods

Method Details
evFilterChargerBrands(_ chargerBrands: [String]) Filter by Charge Network
evFilterConnectorTypes(_ connectorTypes: [String]) Filter by Connector Type
evFilterPowerFeedLevels(_ powerFeedLevels: [Int]) Filter by Charge Level
evFilterFreeCharge(_ freeCharge: Bool) Filter by Free Chargers


Sample code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
let params = TNEntityEvNearbySearchParamsBuilder()
    .location(37.78509, -122.41988)
    .limit(5)
    .evFilterConnectorTypes(["30001"])
    .evFilterPowerFeedLevels([2])
    .build()

TNEntityClient.evNearbySearch(params: params) { (result, error) in
    if let entities = result?.results {
        for entity in entities {

        }
    }
}