Maps SDK for Web
tt.services.evChargingStationsAvailability
Get the charging connector data consisting of type and numbers of the existing charging stations, based on EV station ID retrieved from a FuzzySearch request called with connectorSet parameter.
Parameters need to be passed to the constructor.
Response
The response is extended with getTrackingId()
method, which returns the Tracking-ID
associated with the request.
Please refer to Difference between API responses and this library's responses section.
In order to make a batch call, pass an object containing the following properties:
- 'key' - valid API Key for the used service
- 'batchMode' - valid options: sync, async, or redirect
- 'waitTimeSeconds' - maximum waiting time for batch download response. This option only works with 'async' and 'redirect' batch modes. Accepts 120 or an integer between 5 and 60.
- 'batchItems' - array of objects with options for each call.
For more information, please refer to the batch documentation: Routing, Search.
tt.services.<service name>({
batchMode: 'sync'
key: <Your API key>,
batchItems: [{
...
}, {
...
} //... more objects
]
}).then(callback);
Constructor
tt.services.evChargingStationsAvailability([options], [additionalOptions])
Example
function callbackFn(results) {
console.log(results);
}
tt.services.fuzzySearch({
key: <Your API key>,
query: 'station',
connectorSet: 'Tesla'
}).then(function(response) {
var chargingStationID = response.results[0].dataSources.chargingAvailability.id;
tt.services.evChargingStationsAvailability({
key: <Your API key>,
chargingAvailability: chargingStationID
}).then(callbackFn)
});
Parameters
Name | Description |
---|---|
options
Object default:None |
|
additionalOptions
Object default:None |
Additional options to be passed to the service. |
additionalOptions.abortSignal
Object default:None |
Signal created with abortController. Use AbortController to cancel requests in progress. Example
|
options.chargingAvailability
String default:None |
A valid ID of EV charging station. |
options.connectorSet
String default:None |
A list of Electrical Vehicle connector types divided by commas. This option specifies connector types, which could be used to restrict the result to Points Of Interest of type Electric Vehicle Station supporting specific connector types. For more info about EV connector names, please refer to Supported Connector Types documentation page. Example
|
options.key
String default:None |
A valid API Key for the requested service. Key is required to make use of the given service. It can be issued in the Developer Portal. |
options.maxPowerKW
Number default:None |
A number representing a maximum power rate in kilowatts. An optional parameter which can be used to restrict the result to the availability for connectors with a specific maximum value of power in kilowatts. |
options.minPowerKW
Number default:None |
A number representing a minimum power rate in kilowatts. An optional parameter which can be used to restrict the result to the availability for connectors with a specific minimum value of power in kilowatts. |
options.trackingId
String default:uuid |
Sets value of "Tracking-ID" header. Specifies an identifier for the request. If not set by the user, UUID is generated for each call.
|