This library is an interface to Google's geocoding service
https://developers.google.com/maps/documentation/geocoding/intro
It provides a pipline friendly, builder-like API, and ADTs that map as closely as possible to the Google API
You can start building a request one of two ways:
Geocoding.requestForAddress "77 Battery St." apiKey
Geocoding.requestForComponents [("Spain", G.CountryComponent)] apiKeyOnce you've built your request, calling send will return a Task, which you Perform to generate your own msg types
mapping of Google API response statuses https://developers.google.com/maps/documentation/geocoding/intro#StatusCodes
a bounding box https://developers.google.com/maps/documentation/geocoding/intro#Viewports
alias for a Google API key
components for request filtering https://developers.google.com/maps/documentation/geocoding/intro#ComponentFiltering
additional data about a location https://developers.google.com/maps/documentation/geocoding/intro#Result
address component types https://developers.google.com/maps/documentation/geocoding/intro#Types
response status and a list of results (list will be empty if status is other than OK) https://developers.google.com/maps/documentation/geocoding/intro#GeocodingResponses
Build a request for an address
Geocoding.requestForAddress "77 Battery St" apiKeyBuild a request for a list of component filters
Geocoding.requestForComponents [("Spain", Geocoding.CountryComponent), ("Toledo", Geocoding.AdministrativeAreaComponent)] apiKeyset the address to a request. If called more than once, the later call overwrites the earlier
Geocoding.requestForComponents [("Spain", Geocoding.CountryComponent), ("Toledo", Geocoding.AdministrativeAreaComponent)] apiKey
|> Geocoding.withAddress "Toledo"add a component filter to a request (can be called more than once for a request)
Geocoding.requestForAddress "Toledo" apiKey
|> Geocoding.withComponent ("Spain", Geocoding.CountryComponent)Specify the language for the request
Geocoding.requestForAddress "77 Battery St" apiKey
|> Geocoding.withLanguage("FR")specify region biasing for request
Geocoding.requestForAddress "Toledo" apiKey
|> Geocoding.withRegion "ES"Specify a viewport bias for the request
Geocoding.requestForAddress "Belmont" apiKey
|> Geocoding.withBounds (41, -74) (42, -70)transform a request into a Task
Geocoding.requestForAddress "77 Battery St" apiKey
|> Geocoding.send
|> Task.perform MyFailureMsg MySuccessMsgfor inspecting the request URL for testing purposes
an individual result https://developers.google.com/maps/documentation/geocoding/intro#Results