Table of Contents

Class SunamoMapyCzService

Namespace
SunamoGpx
Assembly
SunamoGpx.dll

Service for geocoding addresses using the Mapy.cz API.

public class SunamoMapyCzService
Inheritance
SunamoMapyCzService
Inherited Members
Extension Methods

Constructors

SunamoMapyCzService(ILogger)

Service for geocoding addresses using the Mapy.cz API.

public SunamoMapyCzService(ILogger logger)

Parameters

logger ILogger

Logger instance for logging warnings and errors.

Methods

AddressToCoords(string, List<string>, bool)

Converts multiple addresses to geographical coordinates using Mapy.cz API.

public Task<List<Item?>> AddressToCoords(string apiKey, List<string> addressesToGeocode, bool shouldThrowOnGeocodingFailure)

Parameters

apiKey string

The API key for authenticating with Mapy.cz API.

addressesToGeocode List<string>

The list of addresses to geocode.

shouldThrowOnGeocodingFailure bool

If true, throws an exception when geocoding fails; otherwise, logs a warning and returns null.

Returns

Task<List<Item>>

A list of geocoded items, with null entries for addresses that could not be geocoded.

AddressToCoordsSingle(HttpClient, string, string, bool)

Converts a single address to geographical coordinates using Mapy.cz API.

public Task<Item?> AddressToCoordsSingle(HttpClient httpClient, string address, string apiKey, bool shouldThrowOnGeocodingFailure)

Parameters

httpClient HttpClient

The HTTP client to use for making API requests.

address string

The address to geocode.

apiKey string

The API key for authenticating with Mapy.cz API.

shouldThrowOnGeocodingFailure bool

If true, throws an exception when geocoding fails; otherwise, logs a warning and returns null.

Returns

Task<Item>

The geocoded item if successful; otherwise, null.