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
loggerILoggerLogger 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
apiKeystringThe API key for authenticating with Mapy.cz API.
addressesToGeocodeList<string>The list of addresses to geocode.
shouldThrowOnGeocodingFailureboolIf 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
httpClientHttpClientThe HTTP client to use for making API requests.
addressstringThe address to geocode.
apiKeystringThe API key for authenticating with Mapy.cz API.
shouldThrowOnGeocodingFailureboolIf true, throws an exception when geocoding fails; otherwise, logs a warning and returns null.