Class OverpassRoadNetworkService
Downloads map data suitable to create a road network.
Inherited Members
Namespace: Holoride.ElasticSDK.Overpass
Assembly: Holoride.ElasticSDK.Library.Runtime.dll
Syntax
public class OverpassRoadNetworkService : TileDataService<RoadNetwork>, ITileDataService<RoadNetwork>, ITileDataProvider<RoadNetwork>
Remarks
The loaded object should be returned to its object pool when it is no longer used.
Constructors
OverpassRoadNetworkService(TileDataServiceConfiguration)
Declaration
public OverpassRoadNetworkService(TileDataServiceConfiguration configuration)
Parameters
| Type | Name | Description |
|---|---|---|
| TileDataServiceConfiguration | configuration |
Remarks
The loaded object should be returned to its object pool when it is no longer used.
Methods
DeserializeAsync(Stream, out RoadNetwork)
Defines how the downloaded json is deserialized.
Declaration
protected override bool DeserializeAsync(Stream data, out RoadNetwork result)
Parameters
| Type | Name | Description |
|---|---|---|
| Stream | data | The downloaded data. |
| RoadNetwork | result | The deserialized object. |
Returns
| Type | Description |
|---|---|
| bool | Whether the object was deserialized successfully. |
Overrides
Remarks
The loaded object should be returned to its object pool when it is no longer used.
GetFileName(int, Vector2Int)
Gets the dedicated download fileName for the specific map service.
Declaration
protected override string GetFileName(int zoomLevel, Vector2Int tilePos)
Parameters
| Type | Name | Description |
|---|---|---|
| int | zoomLevel | The zoom level the tile position refers to. |
| Vector2Int | tilePos | The global position index with respect to the chosen zoom level. |
Returns
| Type | Description |
|---|---|
| string | The file name. |
Overrides
Remarks
The loaded object should be returned to its object pool when it is no longer used.
GetWebRequest(int, Vector2Int, CancellationToken)
Gets the dedicated download URL for the specific map service.
Declaration
protected override UniTask<Func<UnityWebRequest>> GetWebRequest(int zoomLevel, Vector2Int tilePos, CancellationToken cancellationToken = null)
Parameters
| Type | Name | Description |
|---|---|---|
| int | zoomLevel | The zoom level the tile position refers to. |
| Vector2Int | tilePos | The global position index with respect to the chosen zoom level. |
| CancellationToken | cancellationToken | The token to monitor for cancellation requests. |
Returns
| Type | Description |
|---|---|
| UniTask<><Func<><UnityWebRequest>> | The request string to download the map tile. |
Overrides
Remarks
The loaded object should be returned to its object pool when it is no longer used.