E-Mobility SDK

Completely offline C++ based solution kit to extend existing product with E-Mobility features. We are providing mapping, routing and navigation solutions with more than 15 years of E-Bike navigation software experience. Detailed customizable maps, including large list of POIs, optimal route detection, precise turn-by-turn navigation, and much more.

SDK Functions

bool GTSDKInitEngine (const wchar_t* uniqueID, const wchar_t* sdkKey, const wchar_t* dataPath)
 Inits the map engine. This function has to be called first.
 
int GTSDKUpdateMap (const unsigned char *buffer, int bufferSize, int pixelFormat, int width, int height)
 Draws the map to the buffer. It runs only max 50 millisecond at a time. If the draw is not finished it continues next time. Using this behavior it can run in onDraw function, and if returns true you can call postInvalidate() function to continue drawing next time.
 
int GTSDKZoomMap (double factor)
 Zooms the map with a factor.
 
int GTSDKZoomMapToScreenPosition (double factor, double x, double y)
 Zooms the map with a factor, taking zooming focus the x,y screen coordinates.
 
void GTSDKMoveMap (double xOffset, double yOffset)
 Pans the map.
 
bool GTSDKStartRoutePlan (double latStart, double lonStart, double latEnd, double lonEnd, int vehicleType, int routeplanMode, int majorRoadWeight, int unpavedRoadWeight, int cycleRoadWeight, int ferriesWeight, bool useOnewayStreetsBothDirections, int bearing)
 Sets up route planner with given parameters.
 
void GTSDKScreenToMap (double x, double y, double &lat, double &lon)
 Converts screen coordinate to geo position.
 
void GTSDKMapToScreen (double lat, double lon, double &x, double &y)
 Converts geo position to screen coordinate.
 
bool GTSDKUpdateRoutePlan (int timeOut, double &progress, int &routeId)
 Runs route planning for a given milliseconds.
 
int GTSDKAddressSearchGetCountryCount ()
 Returns the number of countries for address search.
 
wchar_t* GTSDKAddressSearchGetCountryName (int idx)
 Returns the name of the country.
 
void GTSDKAddressSearchSelectCountry (const wchar_t* name)
 Selects a country for further searching.
 
wchar_t* GTSDKAddressSearchFilterCity (const wchar_t* filter, int &count)
 Filters the results of cities.
 
int GTSDKAddressSearchGetCityCount (const wchar_t* filter)
 Prepares a result list of cities matching the filter.
 
wchar_t* GTSDKAddressSearchGetCityName (int idx)
 Returns a city name in the result list.
 
void GTSDKAddressSearchSelectCity (const wchar_t* name)
 Selects a city for further searching.
 
wchar_t* GTSDKAddressSearchFilterStreet (const wchar_t* filter, int &count)
 Filters the results of streets.
 
int GTSDKAddressSearchGetStreetCount (const wchar_t* filter)
 Prepares a result list of streets matching the filter.
 
wchar_t* GTSDKAddressSearchGetStreetName (int idx)
 Returns a city name in the result list.
 
void GTSDKAddressSearchSelectStreet (const wchar_t* name)
 Selects a street for further searching.
 
int GTSDKAddressSearchGetHouseNumberCount ()
 Returns the housenumber count of selected street.
 
wchar_t* GTSDKAddressSearchGetHouseNumber (int houseNumberIdx)
 Returns a house number.
 
bool GTSDKAddressSearchGetLatLonForHouseNumberIdx (int houseNumberIdx, double &lat, double &lon)
 Returns the coordinate of selected house number.
 
wchar_t* GTSDKPOISearch (double lat, double lon, const wchar_t* filter, int typeFilter, int &poiCount)
 Search POIs near to given coordinate.
 
wchar_t* GTSDKGetPOINameByIdx (int idx)
 Returns a POI name in the result list.
 
wchar_t* GTSDKGetPOIDetailsByIdx (int idx, int &type, double &lat, double &lon)
 Returns details of a POI.
 
bool GTSDKHasEngineNotification ()
 Query the engine if there is a notification.
 
void GTSDKGetEngineNotification (int &notificationType, int &notificationInfo)
 Gets the top engine notification.
 
double GTSDKStartNavigation (int routeId, int red, int green, int blue, int redOutline, int greenOutline, int blueOutline, int redOutlineBorder, int greenOutlineBorder, int blueOutlineBorder)
 Starts the navigation.
 
void GTSDKStopNavigation ()
 Stops the navigation.
 
wchar_t* GTSDKGetTurnInfo ()
 Returns the info of the next turn in XML format.
 
void GTSDKUpdateGPSData (float direction, double lat, double lon, float alt, float speed, int year, int month, int day, int hour, int minute, int second)
 updates engine with a new gps position and data
 
void GTSDKSetFollowMode (bool followMode)
 Sets the follow mode to track the gps cursor.
 
void GTSDKAddRouteToMap (int routeId, int red, int green, int blue, int redOutline, int greenOutline, int blueOutline, int redOutlineBorder, int greenOutlineBorder, int blueOutlineBorder)
 Adds a route to the map to display.
 
void GTSDKRemoveRouteFromMap (int routeId)
 Removes a route from the map.
 
void GTSDKDeleteRoute (int routeId)
 Deletes a route.
 
void GTSDKSetMapColor (int type, int red, int green, int blue, int redOutline, int greenOutline, int blueOutline)
 Sets the color of a map feature.
 
void GTSDKInitEBike (int vendorId, int bikeId, double batteryCapacity, double batteryVoltage, double bikeWeight, int minAssistLevel, int maxAssistLevel, int currentAssistLevel, double currentBatteryLevel)
 Inits E-Bike data.
 
void GTSDKUpdateEBikeData (int type, double value)
 Update E-Bike actual data.
 
void GTSDKDisplayRangeOnMap (bool display, int red1, int green1, int blue1, int red2, int green2, int blue2, int red3, int green3, int blue3, int redOutline, int greenOutline, int blueOutline)
 Display range patch on map range stripes ( 50-75%, 75-90%, 90-100% )
 
void GTSDKSetRangeCenter (double lat, double lon)
 Sets the range dislpay center to a map position, and recalculates it.
 
void GTSDKSetMapCenter (double lat, double lon)
 Sets the map center to a position.
 
void GTSDKSetZoomLevel (double zoomLevel)
 Sets the actual zoom level ( levels are from 1 to 15 )
 
double GTSDKGetZoomLevel ()
 Gets the actual zoom level ( levels are from 1 to 15 )
 

Member Typedef Documentation

wchar_t* GTSDKAddressSearchFilterCity (const wchar_t* filter, int &count)

Filters the results of cities.

Parameters
filterSets the filter of the cities
countOut parameter count of the results.
Returns
String of the next characters you can enter.
wchar_t* GTSDKAddressSearchFilterStreet (const wchar_t* filter, int &count)

Filters the results of streets.

Parameters
filterSets the filter of the streets
countOut parameter count of the results.
Returns
wchar_t* List of the next characters you can enter.
int GTSDKAddressSearchGetCityCount (const wchar_t* filter)

Prepares a result list of cities matching the filter.

Parameters
filterSets the filter of the cities
Returns
Size of the city result list
wchar_t* GTSDKAddressSearchGetCityName (int idx)

Returns a city name in the result list.

Parameters
idxIndex of the city name
Returns
Name of the city
int GTSDKAddressSearchGetCountryCount ()

Returns the number of countries for address search.

Returns
Number of countries for address search.
wchar_t* GTSDKAddressSearchGetCountryName (int idx)

Returns the name of the country.

Parameters
idxIndex of the country
Returns
Name of the country
wchar_t* GTSDKAddressSearchGetHouseNumber (int houseNumberIdx)

Returns a house number.

Parameters
houseNumberIdxIndex of the housenumber in the list. This list contains a Street Center too.
Returns
House number as a wchar_t*.
int GTSDKAddressSearchGetHouseNumberCount ()

Returns the housenumber count of selected street.

Returns
The count of housenumbers.
bool GTSDKAddressSearchGetLatLonForHouseNumberIdx (int houseNumberIdx, double &lat, double &lon)

Returns the coordinate of selected house number.

Parameters
houseNumberIdxIndex of the housenumber in the list
latout parameter latitude of the geo position of house number of the street.
lonout parameter longitude of the geo position of house number of the street.
Returns
House number as a wchar_t*.
int GTSDKAddressSearchGetStreetCount (const wchar_t* filter)

Prepares a result list of streets matching the filter.

Parameters
filterSets the filter of the streets
Returns
Size of the street result list
wchar_t* GTSDKAddressSearchGetStreetName (int idx)

Returns a city name in the result list.

Parameters
idxIndex of the city name
Returns
Name of the city
void GTSDKAddressSearchSelectCity (const wchar_t* name)

Selects a city for further searching.

Parameters
nameName of the city
Returns
Void.
void GTSDKAddressSearchSelectCountry (const wchar_t* name)

Selects a country for further searching.

Parameters
nameName of the country
Returns
Void.
void GTSDKAddressSearchSelectStreet (const wchar_t* name)

Selects a street for further searching.

Parameters
nameName of the street
Returns
Void.
void GTSDKAddRouteToMap (int routeId, int red, int green, int blue, int redOutline, int greenOutline, int blueOutline, int redOutlineBorder, int greenOutlineBorder, int blueOutlineBorder)

Adds a route to the map to display.

Parameters
routeIdid of the route
redred channel of the inner color of the route
greengreen channel of the inner color of the route
blueblue channel of the inner color of the route
redOutlinered channel of the outline color of the route
greenOutlinegreen channel of the outline color of the route
blueOutlineblue channel of the outline color of the route
redOutlineBorderred channel of the outlineborder color of the route
greenOutlineBordergreen channel of the outlineborder color of the route
blueOutlineBorderblue channel of the outlineborder color of the route
Returns
void
void GTSDKDeleteRoute (int routeId)

Deletes a route.

Parameters
routeIdid of the route to delete
Returns
void
void GTSDKDisplayRangeOnMap (bool display, int red1, int green1, int blue1, int red2, int green2, int blue2, int red3, int green3, int blue3, int redOutline, int greenOutline, int blueOutline)

Display range patch on map range stripes ( 50-75%, 75-90%, 90-100% )

Parameters
displayto display or not the range on map
red1red channel of the inner color of the range stripe 1
green1green channel of the inner color of the range stripe 1
blue1blue channel of the inner color of the the range stripe 1
red2red channel of the inner color of the range stripe 2
green2green channel of the inner color of the range stripe 2
blue2blue channel of the inner color of the the range stripe 2
red3red channel of the inner color of the range stripe 3
green3green channel of the inner color of the range stripe 3
blue3blue channel of the inner color of the the range stripe 3
redOutlinered channel of the inner color of the range outline
greenOutlinegreen channel of the inner color of the range outline
blueOutlineblue channel of the inner color of the the range outline
Returns
void
void GTSDKGetEngineNotification (int &notificationType, int &notificationInfo)

Gets the top engine notification.

Parameters
notificationTypeout parameter type of the notification. See EngineNotificationType.
notificationInfoout parameter longitude of the geo position of house number of the street.
Returns
void
wchar_t* GTSDKGetPOIDetailsByIdx (int idx, int &type, double &lat, double &lon)

Returns details of a POI.

Parameters
idxIndex of the POI
typeout parameter type of POI.
latout parameter latitude of the geo position of house number of the street.
lonout parameter longitude of the geo position of house number of the street.
Returns
Description XML of the POI
wchar_t* GTSDKGetPOINameByIdx (int idx)

Returns a POI name in the result list.

Parameters
idxIndex of the POI
Returns
Name of the POI
wchar_t* GTSDKGetTurnInfo ()

Returns the info of the next turn in XML format.

Returns
wchar_t* info of the next turn in XML format
double GTSDKGetZoomLevel ()

Gets the actual zoom level ( levels are from 1 to 15 )

Returns
actual zoom level
bool GTSDKHasEngineNotification ()

Query the engine if there is a notification.

Returns
bool true if there is a notification.
void GTSDKInitEBike (int vendorId, int bikeId, double batteryCapacity, double batteryVoltage, double bikeWeight, int minAssistLevel, int maxAssistLevel, int currentAssistLevel, double currentBatteryLevel)

Inits E-Bike data.

Parameters
vendorIdid of the manufacturer
bikeIdid if the E-Bike
batteryCapacityin Ah
batteryVoltagein V
bikeWeightin kg
minAssistLevelminimum assist level
maxAssistLevelmaximum assist level
currentAssistLevelcurrent Assist Level
currentBatteryLevelcurrent SOC
Returns
void
bool GTSDKInitEngine (const wchar_t* uniqueID, const wchar_t* sdkKey, const wchar_t* dataPath)

Inits the map engine. This function has to be called first.

Parameters
uniqueIDDevice unique ID.
sdkKeyThe license key you can use the SDK with.
dataPathPath of the mapengine resource and map files.
Returns
true if engine init was successful, false if something went wrong
void GTSDKMapToScreen (double lat, double lon, double &x, double &y)

Converts geo position to screen coordinate.

Parameters
latLatitude of the geo position
lonLongitude of the geo position
xOut parameter X pixel coordinate of point.
yOut parameter Y pixel coordinate of point.
Returns
void.
void GTSDKMoveMap (double xOffset, double yOffset)

Pans the map.

Parameters
xOffsetPixel x offset of panning.
yOffsetPixel y offset of panning.
Returns
void.
wchar_t* GTSDKPOISearch (double lat, double lon, const wchar_t* filter, int typeFilter, int &poiCount)

Search POIs near to given coordinate.

Parameters
latLatitude of the geo position
lonLongitude of the geo position
filterFilter for results.
typeFilterType filter of results. Set -1 to search for all. To filter to specific types set this to a POICategory.
poiCountOut parameter count of the results.
Returns
House number as a wchar_t*.
void GTSDKRemoveRouteFromMap (int routeId)

Removes a route from the map.

Parameters
routeIdid of the route
Returns
void
void GTSDKScreenToMap (double x, double y, double &lat, double &lon)

Converts screen coordinate to geo position.

Parameters
xX pixel coordinate of point
yY pixel coordinate of point
latout parameter latitude of the geo position.
lonout parameter longitude of the geo position.
Returns
void.
void GTSDKSetFollowMode (bool followMode)

Sets the follow mode to track the gps cursor.

Parameters
directioncurrent direction of vehicle ( north 0 degrees, west 90 degrees etc. )
latof gps coordinate
lonof gps coordinate
altgps altitude
speedgps speed
yearof gps timestamp
monthof gps timestamp
dayof gps timestamp
hourof gps timestamp
minuteof gps timestamp
secondof gps timestamp
Returns
void
void GTSDKSetMapCenter (double lat, double lon)

Sets the map center to a position.

Parameters
displayto display or not the range on map
latLatitude of the geo position
lonLongitude of the geo position
Returns
void
void GTSDKSetMapColor (int type, int red, int green, int blue, int redOutline, int greenOutline, int blueOutline)

Sets the color of a map feature.

Parameters
typeof the map feature. See MapColorType.
redred channel of the inner color of the map feature
greengreen channel of the inner color of the map feature
blueblue channel of the inner color of the map feature
redOutlinered channel of the outline color of the map feature
greenOutlinegreen channel of the outline color of the map feature
blueOutlineblue channel of the outline color of the map feature
Returns
void
void GTSDKSetRangeCenter (double lat, double lon)

Sets the range dislpay center to a map position, and recalculates it.

Parameters
displayto display or not the range on map
latLatitude of the geo position
lonLongitude of the geo position
Returns
void
void GTSDKSetZoomLevel (double zoomLevel)

Sets the actual zoom level ( levels are from 1 to 15 )

Parameters
zoomLevel
Returns
void
double* GTSDKStartNavigation (int routeId, int red, int green, int blue, int redOutline, int greenOutline, int blueOutline, int redOutlineBorder, int greenOutlineBorder, int blueOutlineBorder)

Starts the navigation.

Parameters
routeIdid of the route the navigation will start on
redred channel of the inner color of the navigation route
greengreen channel of the inner color of the navigation route
blueblue channel of the inner color of the navigation route
redOutlinered channel of the outline color of the navigation route
greenOutlinegreen channel of the outline color of the navigation route
blueOutlineblue channel of the outline color of the navigation route
redOutlineBorderred channel of the outlineborder color of the navigation route
greenOutlineBordergreen channel of the outlineborder color of the navigation route
blueOutlineBorderblue channel of the outlineborder color of the navigation route
Returns
void
bool GTSDKStartRoutePlan (double latStart, double lonStart, double latEnd, double lonEnd, int vehicleType, int routeplanMode, int majorRoadWeight, int unpavedRoadWeight, int cycleRoadWeight, int ferriesWeight, bool useOnewayStreetsBothDirections, int bearing)

Sets up route planner with given parameters.

Parameters
bufferByte buffer where the map will be copied to
latStartlatitude of start point
lonStartlongitude of start point
latEndlatitude of end point
lonEndlongitude of end point
vehicleTypeVehicle type like VEHICLETYPE_BICYCLE, VEHICLETYPE_MTB, VEHICLETYPE_SPEED, VEHICLETYPE_PEDESTRIAN
routeplanModeRoute plan mode like ROUTEPLANMODE_SUGGESTED, ROUTEPLANMODE_EASIEST, ROUTEPLANMODE_SHORTEST
majorRoadWeightMajor road weight like ROADTYPEWEIGHT_TRYTOAVOID, ROADTYPEWEIGHT_ALLOW, ROADTYPEWEIGHT_PREFER
unpavedRoadWeightUnpaved road weight like ROADTYPEWEIGHT_TRYTOAVOID, ROADTYPEWEIGHT_ALLOW, ROADTYPEWEIGHT_PREFER
cycleRoadWeightCycle road weight like ROADTYPEWEIGHT_TRYTOAVOID, ROADTYPEWEIGHT_ALLOW, ROADTYPEWEIGHT_PREFER
ferriesWeightFerries weight like ROADTYPEWEIGHT_TRYTOAVOID, ROADTYPEWEIGHT_ALLOW, ROADTYPEWEIGHT_PREFER
useOnewayStreetsBothDirectionsIf true route planner will ignore one way restriction in low level road classes
bearingThe angle of the user from north. If this is not zero route planner will plan a route using your direction and tries to plan route straight.
Returns
true if parameters are ok false if there was an error
void GTSDKStopNavigation ()

Stops the navigation.

Returns
void
void GTSDKUpdateEBikeData (int type, double value)

Update E-Bike actual data.

Parameters
typeof the map feature. See EBikeDataType.
valueof the given data.
Returns
void
void GTSDKUpdateGPSData (float direction, double lat, double lon, float alt, float speed, int year, int month, int day, int hour, int minute, int second)

updates engine with a new gps position and data

Parameters
directioncurrent direction of vehicle ( north 0 degrees, west 90 degrees etc. )
latof gps coordinate
lonof gps coordinate
altgps altitude
speedgps speed
yearof gps timestamp
monthof gps timestamp
dayof gps timestamp
hourof gps timestamp
minuteof gps timestamp
secondof gps timestamp
Returns
void
int GTSDKUpdateMap (const unsigned char *buffer, int bufferSize, int pixelFormat, int width, int height)

Draws the map to the buffer. It runs only max 50 millisecond at a time. If the draw is not finished it continues next time. Using this behavior it can run in onDraw function, and if returns true you can call postInvalidate() function to continue drawing next time.

Parameters
bufferbyte buffer wher the map will be copied to
bufferSizesize of the buffer
pixelFormatPIXELFORMAT_RGB565 = 0, PIXELFORMAT_RGB888 = 1
widthPixel width of the map
heightPixel height of the map
Returns
true if more draw time needed.
bool GTSDKUpdateRoutePlan (int timeOut, double &progress, int &routeId)

Runs route planning for a given milliseconds.

Parameters
timeOutRunning time in milliseconds. If timeout occurs it pauses route planning and continues next updateRoutePlan call.
progressOut parameter percent of route planning progress.
routeIdId of the planned route. If planning is not finished or failed, result is -1
Returns
true if route planning still has to run.
int GTSDKZoomMap (double factor)

Zooms the map with a factor.

Parameters
factorThe factor of zooming, e.g. 2 is zoom out one level and 0.5 is zoom in one level.
Returns
true if zoom limit is reached.
int GTSDKZoomMapToScreenPosition (double factor, double x, double y)

Zooms the map with a factor, taking zooming focus the x,y screen coordinates.

Parameters
factorThe factor of zooming, e.g. 2 is zoom out one level and 0.5 is zoom in one level.
xX screen position of zooming focus point.
yY screen position of zooming focus point.
Returns
true if zoom limit is reached.