DriveWorks SDK Reference
3.0.4260 Release
For Test and Development only

maps/docs/usecase2.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page maps_usecase2 Map Request
4 
5 @note SW Release Applicability: This tutorial is applicable to modules in **NVIDIA DRIVE Software** releases.
6 
7 Map data is accessed by making requests to the map Provider including desired bounds or route
8 coverage for the Map and all desired Content Layers e.g. localization images, point clouds.
9 
10 All Map requests include the Core Layer contained directly by the returned Map object which
11 includes Road Segments, Lane Groups, Lanes, Lane Divider Groups, Lane Dividers and Features.
12 
13 Available Content Layers are obtained from the Map Provider.
14 
15 ```{.cpp}
16  dwStatus dwMapProvider_getContentLayers(dwMapsContentLayerBuffer* layers,
17  dwConstMapsProviderHandle_t providerHandle);
18 ```
19 
20 The two supported APIs for launching a map request are shown below.
21 
22 ```{.cpp}
23  dwStatus dwMapProvider_requestMapForBounds(
24  dwMapsRequestToken* requestToken,
25  const dwMapsBounds* bounds,
26  const dwMapsContentLayerBuffer* layers,
27  dwMapProviderHandle_t providerHandle);
28 
29  dwStatus dwMapProvider_requestMapForRoute(
30  dwMapsRequestToken* requestToken,
31  const dwMapsRoute* route,
32  const dwMapsContentLayerBuffer* layers,
33  dwMapProviderHandle_t providerHandle);
34 ```
35 
36 The system returns a request token that can be used later to try and retrieve the requested Map.
37 
38 ```{.cpp}
39  dwStatus dwMapProvider_tryGetRequestedMap(
40  dwConstMapHandle_t* mapHandle,
41  dwMapsRequestToken requestToken,
42  dwMapProviderHandle_t providerHandle);
43 ```
44 
45 This is an asynchronous polling API, since it may take significant time to complete a Map request.
46 While the requested Map is still being prepared for the client, this method returns DW_NOT_READY.
47 Once the requested Map is available, the above method returns DW_SUCCESS along with the Map handle.
48 
49 It is important to understand that the Map memory is "owned" by the Map Provider.
50 Applications should not directly destroy a Map handle, but release it directly to the Map Provider.
51 This enables the Map Provider to reuse the allocated memory for the Map to service future requests.
52 
53 ```{.cpp}
54  dwStatus dwMapProvider_releaseMap(
55  dwConstMapHandle_t mapHandle,
56  dwMapProviderHandle_t providerHandle);
57 ```
58 
59 For more information see @ref dwx_hd_map_access_sample .