Copyright | License : GPL-3 |
---|---|
Maintainer | hahn@geoinfo.tuwien.ac.at |
Stability | experimental |
Safe Haskell | None |
Language | Haskell98 |
Requests the http://geocoder.opencagedata.com reverse geocoding service to transfer latitude and longitude values into an address.
- data QueryParameters = QueryParameters {}
- defaultParams :: QueryParameters
- type GeoCageDeveloperKey = Text
- type GeoCageLatitude = Double
- type GeoCageLongitude = Double
- reverseGeocode :: GeoCageLatitude -> GeoCageLongitude -> GeoCageDeveloperKey -> IO [Result]
- reverseGeocodeWith :: QueryParameters -> IO [Result]
- getReverseAPIResponse :: GeoCageLatitude -> GeoCageLongitude -> GeoCageDeveloperKey -> IO (Maybe ResponseBody)
- getReverseAPIResponseWith :: QueryParameters -> IO (Maybe ResponseBody)
- data ResponseBody = ResponseBody {}
- data Result = Result {
- bounds :: Bounds
- components :: Components
- confidence :: Integer
- formatted :: Text
- geometry :: Location
- data License = License {}
- data Rate = Rate {}
- data Status = Status {}
- data Timestamp = Timestamp {}
- data Components = Components {}
- data Location = Location {}
- data Bounds = Bounds {}
Documentation
data QueryParameters Source
data type including all possible parameters OpenCage API offers
QueryParameters | |
|
defaultParams :: QueryParameters Source
minimal example of QueryParameters can be used to create your own parameters
type GeoCageDeveloperKey = Text Source
type GeoCageLatitude = Double Source
type GeoCageLongitude = Double Source
:: GeoCageLatitude | latitude value to reverse geocode |
-> GeoCageLongitude | longitude value to reverse geocode |
-> GeoCageDeveloperKey | OpenCage key |
-> IO [Result] | list of results, empty if an error occured |
reverse geocode latitude and longitude, returns a list of Result values
:: QueryParameters | parameters for the request |
-> IO [Result] | list of results, empty if an error occured |
reverse geocode passing all parameters via the QueryParameters type
:: GeoCageLatitude | latitude value to reverse geocode |
-> GeoCageLongitude | longitude value to reverse geocode |
-> GeoCageDeveloperKey | OpenCage key |
-> IO (Maybe ResponseBody) | if successful Just a ResponseBody, otherwise Nothing |
reverse geocode latitude and longitude, returns the whole Response
getReverseAPIResponseWith Source
:: QueryParameters | parameters for the request |
-> IO (Maybe ResponseBody) | if successful Just a ResponseBody, otherwise Nothing |
reverse geocode passing all parameters via the QueryParameters type
Result | |
|
data Components Source
Show Components | |
Generic Components | |
FromJSON Components | not all components are included into the response, if so there is an empty string as default value. |
type Rep Components |