DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

maps/docs/usecase1.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page maps_usecase1 Map Provider Initialization
4 
5 @note SW Release Applicability: This tutorial is applicable to modules in **NVIDIA DRIVE Software** releases.
6 
7 The initialization functions of the map provider are:
8 
9 ```{.cpp}
10  typedef struct dwMapProviderParameters {
11  size_t numAllocatedMaps; //!< Number of maps to allocate for requests
12  size_t totalMapAllocationBytes; //!< Total memory available for map requests
13  } dwMapProviderParameters;
14 
15  dwStatus dwMapProvider_initializeWithCacheFile(
16  dwMapProviderHandle_t* providerHandle,
17  const char* mapCacheFile,
18  dwMapProviderParameters* params,
19  dwContextHandle_t contextHandle);
20 
21  dwStatus dwMapProvider_initializeWithDirectory(
22  dwMapProviderHandle_t* providerHandle,
23  const char* mapDirectory,
24  dwMapProviderParameters* params,
25  dwContextHandle_t contextHandle);
26 ```
27 
28 Note the map provider parameters are significant as they determine per-map and total memory allocations.
29 
30 The initializer examines the provided map cache file (XML) or map directory and prepares to serve map requests.
31 It returns a handle to a map provider that should be used to request Map data as needed. Initially the Map Provider
32 is backed by content in the local filesystem, including map cache files (XML).
33 
34 Map cache files can be created with a conversion tool (see @ref dwx_maptool_here_to_dw_maps).
35 
36 For more information see @ref dwx_hd_map_access_sample .