Functions to initialize, load and release map data.
|
DW_API_PUBLIC dwStatus | dwMaps_initialize (dwMapHandle_t *mapHandle, const char *filename, dwContextHandle_t contextHandle) |
| Creates a map handle and initializes the map data by deserializing a driveworks maps file. More...
|
|
DW_API_PUBLIC dwStatus | dwMaps_initializeHERE (dwMapHandle_t *mapHandle, const dwMapsHEREConnectionParameters *params, const char *HEREMapCacheFile, float32_t splinePointSpacing, uint32_t maxRoadSegmentCount, dwContextHandle_t contextHandle) |
| Creates a map handle for HERE maps data. More...
|
|
DW_API_PUBLIC dwStatus | dwMaps_initializeTomTom (dwMapHandle_t *mapHandle, const char *file, uint32_t maxRoadSegmentCount, dwContextHandle_t contextHandle) |
| Creates a map handle for TomTom maps data. More...
|
|
DW_API_PUBLIC dwStatus | dwMaps_release (dwMapHandle_t *mapHandle) |
| Release map handle. More...
|
|
DW_API_PUBLIC dwStatus | dwMaps_update (dwBool *updated, const dwMapsBounds *bounds, dwBool download, dwMapHandle_t mapHandle) |
| Updates map cache with map data within given bounds. More...
|
|
◆ dwMaps_initialize()
Creates a map handle and initializes the map data by deserializing a driveworks maps file.
Buffer sizes are allocated to fit the file content.
- Note
- : allocates memory.
- Parameters
-
[out] | mapHandle | mapHandle to be initialized |
[in] | filename | path to driveworks maps file |
[in] | contextHandle | driveworks context |
- Returns
- DW_SUCCESS Map handle is successfully initialized.
DW_INVALID_ARGUMENT mapHandle, mapCacheFile is nullptr.
DW_FAILURE Error during maps backend access, or invalid enum encountered.
DW_FILE_INVALID Error loading file: not a valid driveworks maps file.
◆ dwMaps_initializeHERE()
Creates a map handle for HERE maps data.
- Note
- : allocates memory.
- Parameters
-
[out] | mapHandle | mapHandle to be initialized |
[in] | params | connection parameter struct. optional, but necessary when updating HEREMapCacheFile. |
[in] | HEREMapCacheFile | file location for HERE map cache database |
[in] | splinePointSpacing | Spacing of evaluated spline points |
[in] | maxRoadSegmentCount | Defines the buffer sizes for map data storage. |
[in] | contextHandle | driveworks context |
- Returns
- DW_SUCCESS Map handle is successfully initialized.
DW_INVALID_ARGUMENT mapHandle, mapCacheFile is nullptr.
DW_FAILURE Error during maps backend access, or invalid enum encountered.
◆ dwMaps_initializeTomTom()
Creates a map handle for TomTom maps data.
- Note
- : allocates memory.
- Parameters
-
[out] | mapHandle | mapHandle to be initialized |
[in] | file | path to a file containing the map data. xml and shp files are supported. |
[in] | maxRoadSegmentCount | Defines the buffer sizes for map data storage. |
[in] | contextHandle | driveworks context |
- Returns
- DW_SUCCESS Map handle is successfully initialized.
DW_FILE_NOT_FOUND XML file not found.
DW_FILE_INVALID XML file does not have expected format.
DW_FAILURE Invalid enum encountered.
DW_INTERNAL_ERROR Unexpected internal sanity check failure.
◆ dwMaps_release()
Release map handle.
- Note
- : Releases memory.
- Parameters
-
[in,out] | mapHandle | map handle to be released. |
- Returns
- DW_SUCCESS Successfully released map object and handle.
DW_BAD_CAST Could not successfully cast handle to map object.
◆ dwMaps_update()
Updates map cache with map data within given bounds.
- Note
- Allocates memory. Only implemented for HERE maps backend.
- Parameters
-
[out] | updated | Optional. DW_TRUE if some data has been updated, DW_FALSE otherwise. |
[in] | bounds | Bounds to specify which part of the map to update. |
[in] | download | Specify whether the local cache should be updated with remote data. |
[in,out] | mapHandle | Map to get updated. |
- Returns
- DW_SUCCESS Successfully updated map object with map data.
DW_FAILURE Error during maps backend access.
DW_BAD_CAST Could not successfully cast handle to map object.
DW_INVALID_ARGUMENT If 'bounds' parameter is a nullptr.