packages feed

google-maps-geocoding 0.4.0.2 → 0.5.0.0

raw patch · 5 files changed

+416/−389 lines, 5 filesdep ~google-static-mapsdep ~servantdep ~servant-clientPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: google-static-maps, servant, servant-client

API changes (from Hackage documentation)

- Web.Google.Maps.Geocoding: AC :: Region
- Web.Google.Maps.Geocoding: AD :: Region
- Web.Google.Maps.Geocoding: AE :: Region
- Web.Google.Maps.Geocoding: AF :: Region
- Web.Google.Maps.Geocoding: AG :: Region
- Web.Google.Maps.Geocoding: AI :: Region
- Web.Google.Maps.Geocoding: AL :: Region
- Web.Google.Maps.Geocoding: AM :: Region
- Web.Google.Maps.Geocoding: AO :: Region
- Web.Google.Maps.Geocoding: AQ :: Region
- Web.Google.Maps.Geocoding: AR :: Region
- Web.Google.Maps.Geocoding: AS :: Region
- Web.Google.Maps.Geocoding: AT :: Region
- Web.Google.Maps.Geocoding: AU :: Region
- Web.Google.Maps.Geocoding: AW :: Region
- Web.Google.Maps.Geocoding: AX :: Region
- Web.Google.Maps.Geocoding: AZ :: Region
- Web.Google.Maps.Geocoding: Address :: Text -> Address
- Web.Google.Maps.Geocoding: AddressComponent :: [AddressType] -> Text -> Text -> AddressComponent
- Web.Google.Maps.Geocoding: AddressType :: Text -> AddressType
- Web.Google.Maps.Geocoding: AdministrativeArea :: Text -> FilterComponent
- Web.Google.Maps.Geocoding: Approximate :: LocationType
- Web.Google.Maps.Geocoding: Arabic :: Language
- Web.Google.Maps.Geocoding: BA :: Region
- Web.Google.Maps.Geocoding: BB :: Region
- Web.Google.Maps.Geocoding: BD :: Region
- Web.Google.Maps.Geocoding: BE :: Region
- Web.Google.Maps.Geocoding: BF :: Region
- Web.Google.Maps.Geocoding: BG :: Region
- Web.Google.Maps.Geocoding: BH :: Region
- Web.Google.Maps.Geocoding: BI :: Region
- Web.Google.Maps.Geocoding: BJ :: Region
- Web.Google.Maps.Geocoding: BL :: Region
- Web.Google.Maps.Geocoding: BM :: Region
- Web.Google.Maps.Geocoding: BN :: Region
- Web.Google.Maps.Geocoding: BO :: Region
- Web.Google.Maps.Geocoding: BQ :: Region
- Web.Google.Maps.Geocoding: BR :: Region
- Web.Google.Maps.Geocoding: BS :: Region
- Web.Google.Maps.Geocoding: BT :: Region
- Web.Google.Maps.Geocoding: BV :: Region
- Web.Google.Maps.Geocoding: BW :: Region
- Web.Google.Maps.Geocoding: BY :: Region
- Web.Google.Maps.Geocoding: BZ :: Region
- Web.Google.Maps.Geocoding: Basque :: Language
- Web.Google.Maps.Geocoding: Bengali :: Language
- Web.Google.Maps.Geocoding: Bulgarian :: Language
- Web.Google.Maps.Geocoding: CA :: Region
- Web.Google.Maps.Geocoding: CC :: Region
- Web.Google.Maps.Geocoding: CD :: Region
- Web.Google.Maps.Geocoding: CF :: Region
- Web.Google.Maps.Geocoding: CG :: Region
- Web.Google.Maps.Geocoding: CH :: Region
- Web.Google.Maps.Geocoding: CI :: Region
- Web.Google.Maps.Geocoding: CK :: Region
- Web.Google.Maps.Geocoding: CL :: Region
- Web.Google.Maps.Geocoding: CM :: Region
- Web.Google.Maps.Geocoding: CN :: Region
- Web.Google.Maps.Geocoding: CO :: Region
- Web.Google.Maps.Geocoding: CR :: Region
- Web.Google.Maps.Geocoding: CU :: Region
- Web.Google.Maps.Geocoding: CV :: Region
- Web.Google.Maps.Geocoding: CW :: Region
- Web.Google.Maps.Geocoding: CX :: Region
- Web.Google.Maps.Geocoding: CY :: Region
- Web.Google.Maps.Geocoding: CZ :: Region
- Web.Google.Maps.Geocoding: Catalan :: Language
- Web.Google.Maps.Geocoding: ChineseSimplified :: Language
- Web.Google.Maps.Geocoding: ChineseTraditional :: Language
- Web.Google.Maps.Geocoding: Coords :: LatLng -> Location
- Web.Google.Maps.Geocoding: Country :: Region -> FilterComponent
- Web.Google.Maps.Geocoding: Croatian :: Language
- Web.Google.Maps.Geocoding: Czech :: Language
- Web.Google.Maps.Geocoding: DE :: Region
- Web.Google.Maps.Geocoding: DJ :: Region
- Web.Google.Maps.Geocoding: DK :: Region
- Web.Google.Maps.Geocoding: DM :: Region
- Web.Google.Maps.Geocoding: DO :: Region
- Web.Google.Maps.Geocoding: DZ :: Region
- Web.Google.Maps.Geocoding: Danish :: Language
- Web.Google.Maps.Geocoding: Dutch :: Language
- Web.Google.Maps.Geocoding: EC :: Region
- Web.Google.Maps.Geocoding: EE :: Region
- Web.Google.Maps.Geocoding: EG :: Region
- Web.Google.Maps.Geocoding: EH :: Region
- Web.Google.Maps.Geocoding: ER :: Region
- Web.Google.Maps.Geocoding: ES :: Region
- Web.Google.Maps.Geocoding: ET :: Region
- Web.Google.Maps.Geocoding: EU :: Region
- Web.Google.Maps.Geocoding: English :: Language
- Web.Google.Maps.Geocoding: EnglishAustralian :: Language
- Web.Google.Maps.Geocoding: EnglishBritish :: Language
- Web.Google.Maps.Geocoding: FI :: Region
- Web.Google.Maps.Geocoding: FJ :: Region
- Web.Google.Maps.Geocoding: FK :: Region
- Web.Google.Maps.Geocoding: FM :: Region
- Web.Google.Maps.Geocoding: FO :: Region
- Web.Google.Maps.Geocoding: FR :: Region
- Web.Google.Maps.Geocoding: Farsi :: Language
- Web.Google.Maps.Geocoding: Filipino :: Language
- Web.Google.Maps.Geocoding: Finnish :: Language
- Web.Google.Maps.Geocoding: French :: Language
- Web.Google.Maps.Geocoding: GA :: Region
- Web.Google.Maps.Geocoding: GB :: Region
- Web.Google.Maps.Geocoding: GD :: Region
- Web.Google.Maps.Geocoding: GE :: Region
- Web.Google.Maps.Geocoding: GF :: Region
- Web.Google.Maps.Geocoding: GG :: Region
- Web.Google.Maps.Geocoding: GH :: Region
- Web.Google.Maps.Geocoding: GI :: Region
- Web.Google.Maps.Geocoding: GL :: Region
- Web.Google.Maps.Geocoding: GM :: Region
- Web.Google.Maps.Geocoding: GN :: Region
- Web.Google.Maps.Geocoding: GP :: Region
- Web.Google.Maps.Geocoding: GQ :: Region
- Web.Google.Maps.Geocoding: GR :: Region
- Web.Google.Maps.Geocoding: GS :: Region
- Web.Google.Maps.Geocoding: GT :: Region
- Web.Google.Maps.Geocoding: GU :: Region
- Web.Google.Maps.Geocoding: GW :: Region
- Web.Google.Maps.Geocoding: GY :: Region
- Web.Google.Maps.Geocoding: Galician :: Language
- Web.Google.Maps.Geocoding: GeocodingResponse :: Status -> Maybe Text -> [Result] -> GeocodingResponse
- Web.Google.Maps.Geocoding: GeometricCenter :: LocationType
- Web.Google.Maps.Geocoding: Geometry :: LatLng -> LocationType -> Viewport -> Maybe Viewport -> Geometry
- Web.Google.Maps.Geocoding: German :: Language
- Web.Google.Maps.Geocoding: Greek :: Language
- Web.Google.Maps.Geocoding: Gujarati :: Language
- Web.Google.Maps.Geocoding: HK :: Region
- Web.Google.Maps.Geocoding: HM :: Region
- Web.Google.Maps.Geocoding: HN :: Region
- Web.Google.Maps.Geocoding: HR :: Region
- Web.Google.Maps.Geocoding: HT :: Region
- Web.Google.Maps.Geocoding: HU :: Region
- Web.Google.Maps.Geocoding: Hebrew :: Language
- Web.Google.Maps.Geocoding: Hindi :: Language
- Web.Google.Maps.Geocoding: Hungarian :: Language
- Web.Google.Maps.Geocoding: ID :: Region
- Web.Google.Maps.Geocoding: IE :: Region
- Web.Google.Maps.Geocoding: IL :: Region
- Web.Google.Maps.Geocoding: IM :: Region
- Web.Google.Maps.Geocoding: IN :: Region
- Web.Google.Maps.Geocoding: IO :: Region
- Web.Google.Maps.Geocoding: IQ :: Region
- Web.Google.Maps.Geocoding: IR :: Region
- Web.Google.Maps.Geocoding: IS :: Region
- Web.Google.Maps.Geocoding: IT :: Region
- Web.Google.Maps.Geocoding: Indonesian :: Language
- Web.Google.Maps.Geocoding: InvalidRequest :: Status
- Web.Google.Maps.Geocoding: Italian :: Language
- Web.Google.Maps.Geocoding: JE :: Region
- Web.Google.Maps.Geocoding: JM :: Region
- Web.Google.Maps.Geocoding: JO :: Region
- Web.Google.Maps.Geocoding: JP :: Region
- Web.Google.Maps.Geocoding: Japanese :: Language
- Web.Google.Maps.Geocoding: KE :: Region
- Web.Google.Maps.Geocoding: KG :: Region
- Web.Google.Maps.Geocoding: KH :: Region
- Web.Google.Maps.Geocoding: KI :: Region
- Web.Google.Maps.Geocoding: KM :: Region
- Web.Google.Maps.Geocoding: KN :: Region
- Web.Google.Maps.Geocoding: KP :: Region
- Web.Google.Maps.Geocoding: KR :: Region
- Web.Google.Maps.Geocoding: KW :: Region
- Web.Google.Maps.Geocoding: KY :: Region
- Web.Google.Maps.Geocoding: KZ :: Region
- Web.Google.Maps.Geocoding: Kannada :: Language
- Web.Google.Maps.Geocoding: Key :: Text -> Key
- Web.Google.Maps.Geocoding: Korean :: Language
- Web.Google.Maps.Geocoding: LA :: Region
- Web.Google.Maps.Geocoding: LB :: Region
- Web.Google.Maps.Geocoding: LC :: Region
- Web.Google.Maps.Geocoding: LI :: Region
- Web.Google.Maps.Geocoding: LK :: Region
- Web.Google.Maps.Geocoding: LR :: Region
- Web.Google.Maps.Geocoding: LS :: Region
- Web.Google.Maps.Geocoding: LT :: Region
- Web.Google.Maps.Geocoding: LU :: Region
- Web.Google.Maps.Geocoding: LV :: Region
- Web.Google.Maps.Geocoding: LY :: Region
- Web.Google.Maps.Geocoding: LatLng :: Double -> Double -> LatLng
- Web.Google.Maps.Geocoding: Latvian :: Language
- Web.Google.Maps.Geocoding: Lithuanian :: Language
- Web.Google.Maps.Geocoding: Locale :: Address -> Location
- Web.Google.Maps.Geocoding: Locality :: Text -> FilterComponent
- Web.Google.Maps.Geocoding: MA :: Region
- Web.Google.Maps.Geocoding: MC :: Region
- Web.Google.Maps.Geocoding: MD :: Region
- Web.Google.Maps.Geocoding: ME :: Region
- Web.Google.Maps.Geocoding: MF :: Region
- Web.Google.Maps.Geocoding: MG :: Region
- Web.Google.Maps.Geocoding: MH :: Region
- Web.Google.Maps.Geocoding: MK :: Region
- Web.Google.Maps.Geocoding: ML :: Region
- Web.Google.Maps.Geocoding: MM :: Region
- Web.Google.Maps.Geocoding: MN :: Region
- Web.Google.Maps.Geocoding: MO :: Region
- Web.Google.Maps.Geocoding: MP :: Region
- Web.Google.Maps.Geocoding: MQ :: Region
- Web.Google.Maps.Geocoding: MR :: Region
- Web.Google.Maps.Geocoding: MS :: Region
- Web.Google.Maps.Geocoding: MT :: Region
- Web.Google.Maps.Geocoding: MU :: Region
- Web.Google.Maps.Geocoding: MV :: Region
- Web.Google.Maps.Geocoding: MW :: Region
- Web.Google.Maps.Geocoding: MX :: Region
- Web.Google.Maps.Geocoding: MY :: Region
- Web.Google.Maps.Geocoding: MZ :: Region
- Web.Google.Maps.Geocoding: Malayalam :: Language
- Web.Google.Maps.Geocoding: Marathi :: Language
- Web.Google.Maps.Geocoding: NA :: Region
- Web.Google.Maps.Geocoding: NC :: Region
- Web.Google.Maps.Geocoding: NE :: Region
- Web.Google.Maps.Geocoding: NF :: Region
- Web.Google.Maps.Geocoding: NG :: Region
- Web.Google.Maps.Geocoding: NI :: Region
- Web.Google.Maps.Geocoding: NL :: Region
- Web.Google.Maps.Geocoding: NO :: Region
- Web.Google.Maps.Geocoding: NP :: Region
- Web.Google.Maps.Geocoding: NR :: Region
- Web.Google.Maps.Geocoding: NU :: Region
- Web.Google.Maps.Geocoding: NZ :: Region
- Web.Google.Maps.Geocoding: Norwegian :: Language
- Web.Google.Maps.Geocoding: OK :: Status
- Web.Google.Maps.Geocoding: OM :: Region
- Web.Google.Maps.Geocoding: OverQueryLimit :: Status
- Web.Google.Maps.Geocoding: PA :: Region
- Web.Google.Maps.Geocoding: PE :: Region
- Web.Google.Maps.Geocoding: PF :: Region
- Web.Google.Maps.Geocoding: PG :: Region
- Web.Google.Maps.Geocoding: PH :: Region
- Web.Google.Maps.Geocoding: PK :: Region
- Web.Google.Maps.Geocoding: PL :: Region
- Web.Google.Maps.Geocoding: PM :: Region
- Web.Google.Maps.Geocoding: PN :: Region
- Web.Google.Maps.Geocoding: PR :: Region
- Web.Google.Maps.Geocoding: PS :: Region
- Web.Google.Maps.Geocoding: PT :: Region
- Web.Google.Maps.Geocoding: PW :: Region
- Web.Google.Maps.Geocoding: PY :: Region
- Web.Google.Maps.Geocoding: PlaceId :: Text -> PlaceId
- Web.Google.Maps.Geocoding: Polish :: Language
- Web.Google.Maps.Geocoding: Portuguese :: Language
- Web.Google.Maps.Geocoding: PortugueseBrazil :: Language
- Web.Google.Maps.Geocoding: PortuguesePortugal :: Language
- Web.Google.Maps.Geocoding: PostalCode :: Text -> FilterComponent
- Web.Google.Maps.Geocoding: PostcodeLocality :: Text -> PostcodeLocality
- Web.Google.Maps.Geocoding: QA :: Region
- Web.Google.Maps.Geocoding: RE :: Region
- Web.Google.Maps.Geocoding: RO :: Region
- Web.Google.Maps.Geocoding: RS :: Region
- Web.Google.Maps.Geocoding: RU :: Region
- Web.Google.Maps.Geocoding: RW :: Region
- Web.Google.Maps.Geocoding: RangeInterpolated :: LocationType
- Web.Google.Maps.Geocoding: RequestDenied :: Status
- Web.Google.Maps.Geocoding: Result :: [AddressType] -> Text -> [AddressComponent] -> Maybe [PostcodeLocality] -> Geometry -> Maybe Bool -> PlaceId -> Result
- Web.Google.Maps.Geocoding: Romanian :: Language
- Web.Google.Maps.Geocoding: Rooftop :: LocationType
- Web.Google.Maps.Geocoding: Route :: Text -> FilterComponent
- Web.Google.Maps.Geocoding: Russian :: Language
- Web.Google.Maps.Geocoding: SA :: Region
- Web.Google.Maps.Geocoding: SB :: Region
- Web.Google.Maps.Geocoding: SC :: Region
- Web.Google.Maps.Geocoding: SD :: Region
- Web.Google.Maps.Geocoding: SE :: Region
- Web.Google.Maps.Geocoding: SG :: Region
- Web.Google.Maps.Geocoding: SH :: Region
- Web.Google.Maps.Geocoding: SI :: Region
- Web.Google.Maps.Geocoding: SJ :: Region
- Web.Google.Maps.Geocoding: SK :: Region
- Web.Google.Maps.Geocoding: SL :: Region
- Web.Google.Maps.Geocoding: SM :: Region
- Web.Google.Maps.Geocoding: SN :: Region
- Web.Google.Maps.Geocoding: SO :: Region
- Web.Google.Maps.Geocoding: SR :: Region
- Web.Google.Maps.Geocoding: SS :: Region
- Web.Google.Maps.Geocoding: ST :: Region
- Web.Google.Maps.Geocoding: SV :: Region
- Web.Google.Maps.Geocoding: SX :: Region
- Web.Google.Maps.Geocoding: SY :: Region
- Web.Google.Maps.Geocoding: SZ :: Region
- Web.Google.Maps.Geocoding: Serbian :: Language
- Web.Google.Maps.Geocoding: Slovak :: Language
- Web.Google.Maps.Geocoding: Slovenian :: Language
- Web.Google.Maps.Geocoding: Spanish :: Language
- Web.Google.Maps.Geocoding: Swedish :: Language
- Web.Google.Maps.Geocoding: TC :: Region
- Web.Google.Maps.Geocoding: TD :: Region
- Web.Google.Maps.Geocoding: TF :: Region
- Web.Google.Maps.Geocoding: TG :: Region
- Web.Google.Maps.Geocoding: TH :: Region
- Web.Google.Maps.Geocoding: TJ :: Region
- Web.Google.Maps.Geocoding: TK :: Region
- Web.Google.Maps.Geocoding: TL :: Region
- Web.Google.Maps.Geocoding: TM :: Region
- Web.Google.Maps.Geocoding: TN :: Region
- Web.Google.Maps.Geocoding: TO :: Region
- Web.Google.Maps.Geocoding: TR :: Region
- Web.Google.Maps.Geocoding: TT :: Region
- Web.Google.Maps.Geocoding: TV :: Region
- Web.Google.Maps.Geocoding: TW :: Region
- Web.Google.Maps.Geocoding: TZ :: Region
- Web.Google.Maps.Geocoding: Tagalog :: Language
- Web.Google.Maps.Geocoding: Tamil :: Language
- Web.Google.Maps.Geocoding: Telugu :: Language
- Web.Google.Maps.Geocoding: Thai :: Language
- Web.Google.Maps.Geocoding: Turkish :: Language
- Web.Google.Maps.Geocoding: UA :: Region
- Web.Google.Maps.Geocoding: UG :: Region
- Web.Google.Maps.Geocoding: UK :: Region
- Web.Google.Maps.Geocoding: UM :: Region
- Web.Google.Maps.Geocoding: US :: Region
- Web.Google.Maps.Geocoding: UY :: Region
- Web.Google.Maps.Geocoding: UZ :: Region
- Web.Google.Maps.Geocoding: Ukrainian :: Language
- Web.Google.Maps.Geocoding: UnknownError :: Status
- Web.Google.Maps.Geocoding: VA :: Region
- Web.Google.Maps.Geocoding: VC :: Region
- Web.Google.Maps.Geocoding: VE :: Region
- Web.Google.Maps.Geocoding: VG :: Region
- Web.Google.Maps.Geocoding: VI :: Region
- Web.Google.Maps.Geocoding: VN :: Region
- Web.Google.Maps.Geocoding: VU :: Region
- Web.Google.Maps.Geocoding: Vietnamese :: Language
- Web.Google.Maps.Geocoding: Viewport :: LatLng -> LatLng -> Viewport
- Web.Google.Maps.Geocoding: WF :: Region
- Web.Google.Maps.Geocoding: WS :: Region
- Web.Google.Maps.Geocoding: YE :: Region
- Web.Google.Maps.Geocoding: YT :: Region
- Web.Google.Maps.Geocoding: ZA :: Region
- Web.Google.Maps.Geocoding: ZM :: Region
- Web.Google.Maps.Geocoding: ZW :: Region
- Web.Google.Maps.Geocoding: ZeroResults :: Status
- Web.Google.Maps.Geocoding: [address_component_types] :: AddressComponent -> [AddressType]
- Web.Google.Maps.Geocoding: [address_components] :: Result -> [AddressComponent]
- Web.Google.Maps.Geocoding: [bounds] :: Geometry -> Maybe Viewport
- Web.Google.Maps.Geocoding: [error_message] :: GeocodingResponse -> Maybe Text
- Web.Google.Maps.Geocoding: [formatted_address] :: Result -> Text
- Web.Google.Maps.Geocoding: [geometry] :: Result -> Geometry
- Web.Google.Maps.Geocoding: [lat] :: LatLng -> Double
- Web.Google.Maps.Geocoding: [lng] :: LatLng -> Double
- Web.Google.Maps.Geocoding: [location] :: Geometry -> LatLng
- Web.Google.Maps.Geocoding: [location_type] :: Geometry -> LocationType
- Web.Google.Maps.Geocoding: [long_name] :: AddressComponent -> Text
- Web.Google.Maps.Geocoding: [northeast] :: Viewport -> LatLng
- Web.Google.Maps.Geocoding: [partial_match] :: Result -> Maybe Bool
- Web.Google.Maps.Geocoding: [place_id] :: Result -> PlaceId
- Web.Google.Maps.Geocoding: [postcode_localities] :: Result -> Maybe [PostcodeLocality]
- Web.Google.Maps.Geocoding: [results] :: GeocodingResponse -> [Result]
- Web.Google.Maps.Geocoding: [short_name] :: AddressComponent -> Text
- Web.Google.Maps.Geocoding: [southwest] :: Viewport -> LatLng
- Web.Google.Maps.Geocoding: [status] :: GeocodingResponse -> Status
- Web.Google.Maps.Geocoding: [types] :: Result -> [AddressType]
- Web.Google.Maps.Geocoding: [viewport] :: Geometry -> Viewport
- Web.Google.Maps.Geocoding: api :: Proxy GoogleMapsGeocodingAPI
- Web.Google.Maps.Geocoding: backGeocode :: Manager -> Key -> Maybe LatLng -> Maybe PlaceId -> Maybe AddressType -> Maybe LocationType -> Maybe Language -> IO (Either ServantError GeocodingResponse)
- Web.Google.Maps.Geocoding: data AddressComponent
- Web.Google.Maps.Geocoding: data FilterComponent
- Web.Google.Maps.Geocoding: data GeocodingResponse
- Web.Google.Maps.Geocoding: data Geometry
- Web.Google.Maps.Geocoding: data Language
- Web.Google.Maps.Geocoding: data LatLng
- Web.Google.Maps.Geocoding: data Location
- Web.Google.Maps.Geocoding: data LocationType
- Web.Google.Maps.Geocoding: data Region
- Web.Google.Maps.Geocoding: data Result
- Web.Google.Maps.Geocoding: data Status
- Web.Google.Maps.Geocoding: data Viewport
- Web.Google.Maps.Geocoding: geocode :: Manager -> Key -> Maybe Address -> Maybe [FilterComponent] -> Maybe Viewport -> Maybe Language -> Maybe Region -> IO (Either ServantError GeocodingResponse)
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.AddressComponent
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.AddressType
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.GeocodingResponse
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.Geometry
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.LocationType
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.PlaceId
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.PostcodeLocality
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.Result
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.Status
- Web.Google.Maps.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Maps.Geocoding.Viewport
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.AddressComponent
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.AddressType
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.FilterComponent
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.GeocodingResponse
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.Geometry
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.LocationType
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.PlaceId
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.PostcodeLocality
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.Result
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.Status
- Web.Google.Maps.Geocoding: instance GHC.Classes.Eq Web.Google.Maps.Geocoding.Viewport
- Web.Google.Maps.Geocoding: instance GHC.Generics.Generic Web.Google.Maps.Geocoding.AddressComponent
- Web.Google.Maps.Geocoding: instance GHC.Generics.Generic Web.Google.Maps.Geocoding.AddressType
- Web.Google.Maps.Geocoding: instance GHC.Generics.Generic Web.Google.Maps.Geocoding.GeocodingResponse
- Web.Google.Maps.Geocoding: instance GHC.Generics.Generic Web.Google.Maps.Geocoding.Geometry
- Web.Google.Maps.Geocoding: instance GHC.Generics.Generic Web.Google.Maps.Geocoding.PlaceId
- Web.Google.Maps.Geocoding: instance GHC.Generics.Generic Web.Google.Maps.Geocoding.PostcodeLocality
- Web.Google.Maps.Geocoding: instance GHC.Generics.Generic Web.Google.Maps.Geocoding.Result
- Web.Google.Maps.Geocoding: instance GHC.Generics.Generic Web.Google.Maps.Geocoding.Viewport
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.AddressComponent
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.AddressType
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.FilterComponent
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.GeocodingResponse
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.Geometry
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.LocationType
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.PlaceId
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.PostcodeLocality
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.Result
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.Status
- Web.Google.Maps.Geocoding: instance GHC.Show.Show Web.Google.Maps.Geocoding.Viewport
- Web.Google.Maps.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Maps.Geocoding.AddressType
- Web.Google.Maps.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Maps.Geocoding.FilterComponent
- Web.Google.Maps.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Maps.Geocoding.LocationType
- Web.Google.Maps.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Maps.Geocoding.PlaceId
- Web.Google.Maps.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Maps.Geocoding.Viewport
- Web.Google.Maps.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData [Web.Google.Maps.Geocoding.FilterComponent]
- Web.Google.Maps.Geocoding: newtype Address
- Web.Google.Maps.Geocoding: newtype AddressType
- Web.Google.Maps.Geocoding: newtype Key
- Web.Google.Maps.Geocoding: newtype PlaceId
- Web.Google.Maps.Geocoding: newtype PostcodeLocality
- Web.Google.Maps.Geocoding: type GoogleMapsGeocodingAPI = "geocode" :> "json" :> QueryParam "key" Key :> QueryParam "address" Address :> QueryParam "components" [FilterComponent] :> QueryParam "bounds" Viewport :> QueryParam "language" Language :> QueryParam "region" Region :> Get '[JSON] GeocodingResponse :<|> "geocode" :> "json" :> QueryParam "key" Key :> QueryParam "latlng" LatLng :> QueryParam "place_id" PlaceId :> QueryParam "result_type" AddressType :> QueryParam "location_type" LocationType :> QueryParam "language" Language :> Get '[JSON] GeocodingResponse
+ Web.Google.Geocoding: AC :: Region
+ Web.Google.Geocoding: AD :: Region
+ Web.Google.Geocoding: AE :: Region
+ Web.Google.Geocoding: AF :: Region
+ Web.Google.Geocoding: AG :: Region
+ Web.Google.Geocoding: AI :: Region
+ Web.Google.Geocoding: AL :: Region
+ Web.Google.Geocoding: AM :: Region
+ Web.Google.Geocoding: AO :: Region
+ Web.Google.Geocoding: AQ :: Region
+ Web.Google.Geocoding: AR :: Region
+ Web.Google.Geocoding: AS :: Region
+ Web.Google.Geocoding: AT :: Region
+ Web.Google.Geocoding: AU :: Region
+ Web.Google.Geocoding: AW :: Region
+ Web.Google.Geocoding: AX :: Region
+ Web.Google.Geocoding: AZ :: Region
+ Web.Google.Geocoding: Address :: Text -> Address
+ Web.Google.Geocoding: AddressComponent :: [AddressType] -> Text -> Text -> AddressComponent
+ Web.Google.Geocoding: AddressType :: Text -> AddressType
+ Web.Google.Geocoding: AdministrativeArea :: Text -> FilterComponent
+ Web.Google.Geocoding: Albanian :: Language
+ Web.Google.Geocoding: Approximate :: LocationType
+ Web.Google.Geocoding: Arabic :: Language
+ Web.Google.Geocoding: BA :: Region
+ Web.Google.Geocoding: BB :: Region
+ Web.Google.Geocoding: BD :: Region
+ Web.Google.Geocoding: BE :: Region
+ Web.Google.Geocoding: BF :: Region
+ Web.Google.Geocoding: BG :: Region
+ Web.Google.Geocoding: BH :: Region
+ Web.Google.Geocoding: BI :: Region
+ Web.Google.Geocoding: BJ :: Region
+ Web.Google.Geocoding: BL :: Region
+ Web.Google.Geocoding: BM :: Region
+ Web.Google.Geocoding: BN :: Region
+ Web.Google.Geocoding: BO :: Region
+ Web.Google.Geocoding: BQ :: Region
+ Web.Google.Geocoding: BR :: Region
+ Web.Google.Geocoding: BS :: Region
+ Web.Google.Geocoding: BT :: Region
+ Web.Google.Geocoding: BV :: Region
+ Web.Google.Geocoding: BW :: Region
+ Web.Google.Geocoding: BY :: Region
+ Web.Google.Geocoding: BZ :: Region
+ Web.Google.Geocoding: Basque :: Language
+ Web.Google.Geocoding: Belarusian :: Language
+ Web.Google.Geocoding: Bengali :: Language
+ Web.Google.Geocoding: Bulgarian :: Language
+ Web.Google.Geocoding: Burmese :: Language
+ Web.Google.Geocoding: CA :: Region
+ Web.Google.Geocoding: CC :: Region
+ Web.Google.Geocoding: CD :: Region
+ Web.Google.Geocoding: CF :: Region
+ Web.Google.Geocoding: CG :: Region
+ Web.Google.Geocoding: CH :: Region
+ Web.Google.Geocoding: CI :: Region
+ Web.Google.Geocoding: CK :: Region
+ Web.Google.Geocoding: CL :: Region
+ Web.Google.Geocoding: CM :: Region
+ Web.Google.Geocoding: CN :: Region
+ Web.Google.Geocoding: CO :: Region
+ Web.Google.Geocoding: CR :: Region
+ Web.Google.Geocoding: CU :: Region
+ Web.Google.Geocoding: CV :: Region
+ Web.Google.Geocoding: CW :: Region
+ Web.Google.Geocoding: CX :: Region
+ Web.Google.Geocoding: CY :: Region
+ Web.Google.Geocoding: CZ :: Region
+ Web.Google.Geocoding: Catalan :: Language
+ Web.Google.Geocoding: ChineseSimplified :: Language
+ Web.Google.Geocoding: ChineseTraditional :: Language
+ Web.Google.Geocoding: Coords :: LatLng -> Location
+ Web.Google.Geocoding: Country :: Region -> FilterComponent
+ Web.Google.Geocoding: Croatian :: Language
+ Web.Google.Geocoding: Czech :: Language
+ Web.Google.Geocoding: DE :: Region
+ Web.Google.Geocoding: DJ :: Region
+ Web.Google.Geocoding: DK :: Region
+ Web.Google.Geocoding: DM :: Region
+ Web.Google.Geocoding: DO :: Region
+ Web.Google.Geocoding: DZ :: Region
+ Web.Google.Geocoding: Danish :: Language
+ Web.Google.Geocoding: Dutch :: Language
+ Web.Google.Geocoding: EC :: Region
+ Web.Google.Geocoding: EE :: Region
+ Web.Google.Geocoding: EG :: Region
+ Web.Google.Geocoding: EH :: Region
+ Web.Google.Geocoding: ER :: Region
+ Web.Google.Geocoding: ES :: Region
+ Web.Google.Geocoding: ET :: Region
+ Web.Google.Geocoding: EU :: Region
+ Web.Google.Geocoding: English :: Language
+ Web.Google.Geocoding: EnglishAustralian :: Language
+ Web.Google.Geocoding: EnglishBritish :: Language
+ Web.Google.Geocoding: FI :: Region
+ Web.Google.Geocoding: FJ :: Region
+ Web.Google.Geocoding: FK :: Region
+ Web.Google.Geocoding: FM :: Region
+ Web.Google.Geocoding: FO :: Region
+ Web.Google.Geocoding: FR :: Region
+ Web.Google.Geocoding: Farsi :: Language
+ Web.Google.Geocoding: Filipino :: Language
+ Web.Google.Geocoding: Finnish :: Language
+ Web.Google.Geocoding: French :: Language
+ Web.Google.Geocoding: GA :: Region
+ Web.Google.Geocoding: GB :: Region
+ Web.Google.Geocoding: GD :: Region
+ Web.Google.Geocoding: GE :: Region
+ Web.Google.Geocoding: GF :: Region
+ Web.Google.Geocoding: GG :: Region
+ Web.Google.Geocoding: GH :: Region
+ Web.Google.Geocoding: GI :: Region
+ Web.Google.Geocoding: GL :: Region
+ Web.Google.Geocoding: GM :: Region
+ Web.Google.Geocoding: GN :: Region
+ Web.Google.Geocoding: GP :: Region
+ Web.Google.Geocoding: GQ :: Region
+ Web.Google.Geocoding: GR :: Region
+ Web.Google.Geocoding: GS :: Region
+ Web.Google.Geocoding: GT :: Region
+ Web.Google.Geocoding: GU :: Region
+ Web.Google.Geocoding: GW :: Region
+ Web.Google.Geocoding: GY :: Region
+ Web.Google.Geocoding: Galician :: Language
+ Web.Google.Geocoding: GeocodingResponse :: Status -> Maybe Text -> [Result] -> GeocodingResponse
+ Web.Google.Geocoding: GeometricCenter :: LocationType
+ Web.Google.Geocoding: Geometry :: LatLng -> LocationType -> Viewport -> Maybe Viewport -> Geometry
+ Web.Google.Geocoding: German :: Language
+ Web.Google.Geocoding: Greek :: Language
+ Web.Google.Geocoding: Gujarati :: Language
+ Web.Google.Geocoding: HK :: Region
+ Web.Google.Geocoding: HM :: Region
+ Web.Google.Geocoding: HN :: Region
+ Web.Google.Geocoding: HR :: Region
+ Web.Google.Geocoding: HT :: Region
+ Web.Google.Geocoding: HU :: Region
+ Web.Google.Geocoding: Hebrew :: Language
+ Web.Google.Geocoding: Hindi :: Language
+ Web.Google.Geocoding: Hungarian :: Language
+ Web.Google.Geocoding: ID :: Region
+ Web.Google.Geocoding: IE :: Region
+ Web.Google.Geocoding: IL :: Region
+ Web.Google.Geocoding: IM :: Region
+ Web.Google.Geocoding: IN :: Region
+ Web.Google.Geocoding: IO :: Region
+ Web.Google.Geocoding: IQ :: Region
+ Web.Google.Geocoding: IR :: Region
+ Web.Google.Geocoding: IS :: Region
+ Web.Google.Geocoding: IT :: Region
+ Web.Google.Geocoding: Indonesian :: Language
+ Web.Google.Geocoding: InvalidRequest :: Status
+ Web.Google.Geocoding: Italian :: Language
+ Web.Google.Geocoding: JE :: Region
+ Web.Google.Geocoding: JM :: Region
+ Web.Google.Geocoding: JO :: Region
+ Web.Google.Geocoding: JP :: Region
+ Web.Google.Geocoding: Japanese :: Language
+ Web.Google.Geocoding: KE :: Region
+ Web.Google.Geocoding: KG :: Region
+ Web.Google.Geocoding: KH :: Region
+ Web.Google.Geocoding: KI :: Region
+ Web.Google.Geocoding: KM :: Region
+ Web.Google.Geocoding: KN :: Region
+ Web.Google.Geocoding: KP :: Region
+ Web.Google.Geocoding: KR :: Region
+ Web.Google.Geocoding: KW :: Region
+ Web.Google.Geocoding: KY :: Region
+ Web.Google.Geocoding: KZ :: Region
+ Web.Google.Geocoding: Kannada :: Language
+ Web.Google.Geocoding: Kazakh :: Language
+ Web.Google.Geocoding: Key :: Text -> Key
+ Web.Google.Geocoding: Korean :: Language
+ Web.Google.Geocoding: Kyrgyz :: Language
+ Web.Google.Geocoding: LA :: Region
+ Web.Google.Geocoding: LB :: Region
+ Web.Google.Geocoding: LC :: Region
+ Web.Google.Geocoding: LI :: Region
+ Web.Google.Geocoding: LK :: Region
+ Web.Google.Geocoding: LR :: Region
+ Web.Google.Geocoding: LS :: Region
+ Web.Google.Geocoding: LT :: Region
+ Web.Google.Geocoding: LU :: Region
+ Web.Google.Geocoding: LV :: Region
+ Web.Google.Geocoding: LY :: Region
+ Web.Google.Geocoding: LatLng :: Double -> Double -> LatLng
+ Web.Google.Geocoding: Latvian :: Language
+ Web.Google.Geocoding: Lithuanian :: Language
+ Web.Google.Geocoding: Locale :: Address -> Location
+ Web.Google.Geocoding: Locality :: Text -> FilterComponent
+ Web.Google.Geocoding: MA :: Region
+ Web.Google.Geocoding: MC :: Region
+ Web.Google.Geocoding: MD :: Region
+ Web.Google.Geocoding: ME :: Region
+ Web.Google.Geocoding: MF :: Region
+ Web.Google.Geocoding: MG :: Region
+ Web.Google.Geocoding: MH :: Region
+ Web.Google.Geocoding: MK :: Region
+ Web.Google.Geocoding: ML :: Region
+ Web.Google.Geocoding: MM :: Region
+ Web.Google.Geocoding: MN :: Region
+ Web.Google.Geocoding: MO :: Region
+ Web.Google.Geocoding: MP :: Region
+ Web.Google.Geocoding: MQ :: Region
+ Web.Google.Geocoding: MR :: Region
+ Web.Google.Geocoding: MS :: Region
+ Web.Google.Geocoding: MT :: Region
+ Web.Google.Geocoding: MU :: Region
+ Web.Google.Geocoding: MV :: Region
+ Web.Google.Geocoding: MW :: Region
+ Web.Google.Geocoding: MX :: Region
+ Web.Google.Geocoding: MY :: Region
+ Web.Google.Geocoding: MZ :: Region
+ Web.Google.Geocoding: Macedonian :: Language
+ Web.Google.Geocoding: Malayalam :: Language
+ Web.Google.Geocoding: Marathi :: Language
+ Web.Google.Geocoding: NA :: Region
+ Web.Google.Geocoding: NC :: Region
+ Web.Google.Geocoding: NE :: Region
+ Web.Google.Geocoding: NF :: Region
+ Web.Google.Geocoding: NG :: Region
+ Web.Google.Geocoding: NI :: Region
+ Web.Google.Geocoding: NL :: Region
+ Web.Google.Geocoding: NO :: Region
+ Web.Google.Geocoding: NP :: Region
+ Web.Google.Geocoding: NR :: Region
+ Web.Google.Geocoding: NU :: Region
+ Web.Google.Geocoding: NZ :: Region
+ Web.Google.Geocoding: Norwegian :: Language
+ Web.Google.Geocoding: OK :: Status
+ Web.Google.Geocoding: OM :: Region
+ Web.Google.Geocoding: OverQueryLimit :: Status
+ Web.Google.Geocoding: PA :: Region
+ Web.Google.Geocoding: PE :: Region
+ Web.Google.Geocoding: PF :: Region
+ Web.Google.Geocoding: PG :: Region
+ Web.Google.Geocoding: PH :: Region
+ Web.Google.Geocoding: PK :: Region
+ Web.Google.Geocoding: PL :: Region
+ Web.Google.Geocoding: PM :: Region
+ Web.Google.Geocoding: PN :: Region
+ Web.Google.Geocoding: PR :: Region
+ Web.Google.Geocoding: PS :: Region
+ Web.Google.Geocoding: PT :: Region
+ Web.Google.Geocoding: PW :: Region
+ Web.Google.Geocoding: PY :: Region
+ Web.Google.Geocoding: PlaceId :: Text -> PlaceId
+ Web.Google.Geocoding: Polish :: Language
+ Web.Google.Geocoding: Portuguese :: Language
+ Web.Google.Geocoding: PortugueseBrazil :: Language
+ Web.Google.Geocoding: PortuguesePortugal :: Language
+ Web.Google.Geocoding: PostalCode :: Text -> FilterComponent
+ Web.Google.Geocoding: PostcodeLocality :: Text -> PostcodeLocality
+ Web.Google.Geocoding: Punjabi :: Language
+ Web.Google.Geocoding: QA :: Region
+ Web.Google.Geocoding: RE :: Region
+ Web.Google.Geocoding: RO :: Region
+ Web.Google.Geocoding: RS :: Region
+ Web.Google.Geocoding: RU :: Region
+ Web.Google.Geocoding: RW :: Region
+ Web.Google.Geocoding: RangeInterpolated :: LocationType
+ Web.Google.Geocoding: RequestDenied :: Status
+ Web.Google.Geocoding: Result :: [AddressType] -> Text -> [AddressComponent] -> Maybe [PostcodeLocality] -> Geometry -> Maybe Bool -> PlaceId -> Result
+ Web.Google.Geocoding: Romanian :: Language
+ Web.Google.Geocoding: Rooftop :: LocationType
+ Web.Google.Geocoding: Route :: Text -> FilterComponent
+ Web.Google.Geocoding: Russian :: Language
+ Web.Google.Geocoding: SA :: Region
+ Web.Google.Geocoding: SB :: Region
+ Web.Google.Geocoding: SC :: Region
+ Web.Google.Geocoding: SD :: Region
+ Web.Google.Geocoding: SE :: Region
+ Web.Google.Geocoding: SG :: Region
+ Web.Google.Geocoding: SH :: Region
+ Web.Google.Geocoding: SI :: Region
+ Web.Google.Geocoding: SJ :: Region
+ Web.Google.Geocoding: SK :: Region
+ Web.Google.Geocoding: SL :: Region
+ Web.Google.Geocoding: SM :: Region
+ Web.Google.Geocoding: SN :: Region
+ Web.Google.Geocoding: SO :: Region
+ Web.Google.Geocoding: SR :: Region
+ Web.Google.Geocoding: SS :: Region
+ Web.Google.Geocoding: ST :: Region
+ Web.Google.Geocoding: SV :: Region
+ Web.Google.Geocoding: SX :: Region
+ Web.Google.Geocoding: SY :: Region
+ Web.Google.Geocoding: SZ :: Region
+ Web.Google.Geocoding: Serbian :: Language
+ Web.Google.Geocoding: Slovak :: Language
+ Web.Google.Geocoding: Slovenian :: Language
+ Web.Google.Geocoding: Spanish :: Language
+ Web.Google.Geocoding: Swedish :: Language
+ Web.Google.Geocoding: TC :: Region
+ Web.Google.Geocoding: TD :: Region
+ Web.Google.Geocoding: TF :: Region
+ Web.Google.Geocoding: TG :: Region
+ Web.Google.Geocoding: TH :: Region
+ Web.Google.Geocoding: TJ :: Region
+ Web.Google.Geocoding: TK :: Region
+ Web.Google.Geocoding: TL :: Region
+ Web.Google.Geocoding: TM :: Region
+ Web.Google.Geocoding: TN :: Region
+ Web.Google.Geocoding: TO :: Region
+ Web.Google.Geocoding: TR :: Region
+ Web.Google.Geocoding: TT :: Region
+ Web.Google.Geocoding: TV :: Region
+ Web.Google.Geocoding: TW :: Region
+ Web.Google.Geocoding: TZ :: Region
+ Web.Google.Geocoding: Tagalog :: Language
+ Web.Google.Geocoding: Tamil :: Language
+ Web.Google.Geocoding: Telugu :: Language
+ Web.Google.Geocoding: Thai :: Language
+ Web.Google.Geocoding: Turkish :: Language
+ Web.Google.Geocoding: UA :: Region
+ Web.Google.Geocoding: UG :: Region
+ Web.Google.Geocoding: UK :: Region
+ Web.Google.Geocoding: UM :: Region
+ Web.Google.Geocoding: US :: Region
+ Web.Google.Geocoding: UY :: Region
+ Web.Google.Geocoding: UZ :: Region
+ Web.Google.Geocoding: Ukrainian :: Language
+ Web.Google.Geocoding: UnknownError :: Status
+ Web.Google.Geocoding: Uzbek :: Language
+ Web.Google.Geocoding: VA :: Region
+ Web.Google.Geocoding: VC :: Region
+ Web.Google.Geocoding: VE :: Region
+ Web.Google.Geocoding: VG :: Region
+ Web.Google.Geocoding: VI :: Region
+ Web.Google.Geocoding: VN :: Region
+ Web.Google.Geocoding: VU :: Region
+ Web.Google.Geocoding: Vietnamese :: Language
+ Web.Google.Geocoding: Viewport :: LatLng -> LatLng -> Viewport
+ Web.Google.Geocoding: WF :: Region
+ Web.Google.Geocoding: WS :: Region
+ Web.Google.Geocoding: YE :: Region
+ Web.Google.Geocoding: YT :: Region
+ Web.Google.Geocoding: ZA :: Region
+ Web.Google.Geocoding: ZM :: Region
+ Web.Google.Geocoding: ZW :: Region
+ Web.Google.Geocoding: ZeroResults :: Status
+ Web.Google.Geocoding: [address_component_types] :: AddressComponent -> [AddressType]
+ Web.Google.Geocoding: [address_components] :: Result -> [AddressComponent]
+ Web.Google.Geocoding: [bounds] :: Geometry -> Maybe Viewport
+ Web.Google.Geocoding: [error_message] :: GeocodingResponse -> Maybe Text
+ Web.Google.Geocoding: [formatted_address] :: Result -> Text
+ Web.Google.Geocoding: [geometry] :: Result -> Geometry
+ Web.Google.Geocoding: [lat] :: LatLng -> Double
+ Web.Google.Geocoding: [lng] :: LatLng -> Double
+ Web.Google.Geocoding: [location] :: Geometry -> LatLng
+ Web.Google.Geocoding: [location_type] :: Geometry -> LocationType
+ Web.Google.Geocoding: [long_name] :: AddressComponent -> Text
+ Web.Google.Geocoding: [northeast] :: Viewport -> LatLng
+ Web.Google.Geocoding: [partial_match] :: Result -> Maybe Bool
+ Web.Google.Geocoding: [place_id] :: Result -> PlaceId
+ Web.Google.Geocoding: [postcode_localities] :: Result -> Maybe [PostcodeLocality]
+ Web.Google.Geocoding: [results] :: GeocodingResponse -> [Result]
+ Web.Google.Geocoding: [short_name] :: AddressComponent -> Text
+ Web.Google.Geocoding: [southwest] :: Viewport -> LatLng
+ Web.Google.Geocoding: [status] :: GeocodingResponse -> Status
+ Web.Google.Geocoding: [types] :: Result -> [AddressType]
+ Web.Google.Geocoding: [viewport] :: Geometry -> Viewport
+ Web.Google.Geocoding: api :: Proxy GoogleGeocodingAPI
+ Web.Google.Geocoding: backGeocode :: Manager -> Key -> Maybe LatLng -> Maybe PlaceId -> Maybe AddressType -> Maybe LocationType -> Maybe Language -> IO (Either ServantError GeocodingResponse)
+ Web.Google.Geocoding: data AddressComponent
+ Web.Google.Geocoding: data FilterComponent
+ Web.Google.Geocoding: data GeocodingResponse
+ Web.Google.Geocoding: data Geometry
+ Web.Google.Geocoding: data Language
+ Web.Google.Geocoding: data LatLng
+ Web.Google.Geocoding: data Location
+ Web.Google.Geocoding: data LocationType
+ Web.Google.Geocoding: data Region
+ Web.Google.Geocoding: data Result
+ Web.Google.Geocoding: data Status
+ Web.Google.Geocoding: data Viewport
+ Web.Google.Geocoding: geocode :: Manager -> Key -> Maybe Address -> Maybe [FilterComponent] -> Maybe Viewport -> Maybe Language -> Maybe Region -> IO (Either ServantError GeocodingResponse)
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.AddressComponent
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.AddressType
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.GeocodingResponse
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.Geometry
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.LocationType
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.PlaceId
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.PostcodeLocality
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.Result
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.Status
+ Web.Google.Geocoding: instance Data.Aeson.Types.FromJSON.FromJSON Web.Google.Geocoding.Viewport
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.AddressComponent
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.AddressType
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.FilterComponent
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.GeocodingResponse
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.Geometry
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.LocationType
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.PlaceId
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.PostcodeLocality
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.Result
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.Status
+ Web.Google.Geocoding: instance GHC.Classes.Eq Web.Google.Geocoding.Viewport
+ Web.Google.Geocoding: instance GHC.Generics.Generic Web.Google.Geocoding.AddressComponent
+ Web.Google.Geocoding: instance GHC.Generics.Generic Web.Google.Geocoding.AddressType
+ Web.Google.Geocoding: instance GHC.Generics.Generic Web.Google.Geocoding.GeocodingResponse
+ Web.Google.Geocoding: instance GHC.Generics.Generic Web.Google.Geocoding.Geometry
+ Web.Google.Geocoding: instance GHC.Generics.Generic Web.Google.Geocoding.PlaceId
+ Web.Google.Geocoding: instance GHC.Generics.Generic Web.Google.Geocoding.PostcodeLocality
+ Web.Google.Geocoding: instance GHC.Generics.Generic Web.Google.Geocoding.Result
+ Web.Google.Geocoding: instance GHC.Generics.Generic Web.Google.Geocoding.Viewport
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.AddressComponent
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.AddressType
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.FilterComponent
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.GeocodingResponse
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.Geometry
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.LocationType
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.PlaceId
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.PostcodeLocality
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.Result
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.Status
+ Web.Google.Geocoding: instance GHC.Show.Show Web.Google.Geocoding.Viewport
+ Web.Google.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Geocoding.AddressType
+ Web.Google.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Geocoding.FilterComponent
+ Web.Google.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Geocoding.LocationType
+ Web.Google.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Geocoding.PlaceId
+ Web.Google.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData Web.Google.Geocoding.Viewport
+ Web.Google.Geocoding: instance Web.Internal.HttpApiData.ToHttpApiData [Web.Google.Geocoding.FilterComponent]
+ Web.Google.Geocoding: newtype Address
+ Web.Google.Geocoding: newtype AddressType
+ Web.Google.Geocoding: newtype Key
+ Web.Google.Geocoding: newtype PlaceId
+ Web.Google.Geocoding: newtype PostcodeLocality
+ Web.Google.Geocoding: type GoogleGeocodingAPI = "geocode" :> "json" :> QueryParam "key" Key :> QueryParam "address" Address :> QueryParam "components" [FilterComponent] :> QueryParam "bounds" Viewport :> QueryParam "language" Language :> QueryParam "region" Region :> Get '[JSON] GeocodingResponse :<|> "geocode" :> "json" :> QueryParam "key" Key :> QueryParam "latlng" LatLng :> QueryParam "place_id" PlaceId :> QueryParam "result_type" AddressType :> QueryParam "location_type" LocationType :> QueryParam "language" Language :> Get '[JSON] GeocodingResponse

Files

LICENSE view
@@ -1,4 +1,4 @@-Copyright Mike Pilgrem (c) 2017
+Copyright Mike Pilgrem (c) 2017, 2018
 
 All rights reserved.
 
@@ -27,4 +27,4 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
changelog.md view
@@ -1,3 +1,12 @@+# 0.5.0.0
+
+* Update documentation to reflect changes to Google Maps Platform
+
+* Rename module `Web.Google.Maps.Geocoding` as `Web.Google.Geocoding` and
+  `GoogleMapsGeocodingAPI` as `GoogleGeocodingAPI`
+
+* Update dependencies for GHC 8.6.2 and revisit upper bounds
+
 # 0.4.0.2
 
 * Update dependencies for GHC 8.6.1
google-maps-geocoding.cabal view
@@ -1,15 +1,21 @@ name:                google-maps-geocoding
-version:             0.4.0.2
-synopsis:            Google Maps Geocoding API bindings
-description:         The <https://developers.google.com/maps/documentation/geocoding/intro Google Maps Geocoding API>
+version:             0.5.0.0
+synopsis:            Bindings to the Google Geocoding API (formerly Maps
+                     Geocoding API)
+description:         The
+                     <https://developers.google.com/maps/documentation/geocoding/intro Google Geocoding API>
                      provides a direct way to access geocoding and reverse
                      geocoding services via an HTTP request. This library
                      package provides bindings in Haskell to that API.
                      .
                      NB: The use of the API's services is subject to the
-                     <https://developers.google.com/maps/terms Google Maps APIs Terms of Service>,
-                     which terms restrict the use of content (eg no use without
-                     a Google map).
+                     <https://cloud.google.com/maps-platform/terms/ Google Maps Platform Terms of Service>,
+                     which terms restrict the use of content. End Users’ use of
+                     Google Maps is subject to the then-current Google
+                     Maps/Google Earth Additional Terms of Service at
+                     <https://maps.google.com/help/terms_maps.html> and Google
+                     Privacy Policy at
+                     <https://www.google.com/policies/privacy/>.
                      .
                      This package has no connection with Google Inc. or its
                      affiliates.
@@ -27,13 +33,13 @@ 
 library
   hs-source-dirs:      src
-  exposed-modules:     Web.Google.Maps.Geocoding
+  exposed-modules:     Web.Google.Geocoding
   build-depends:       base >= 4.8 && < 4.13
                      , aeson >= 1.1 && < 1.5
-                     , google-static-maps >= 0.5 && < 0.6
+                     , google-static-maps >= 0.6 && < 0.7
                      , http-client >= 0.5 && < 0.6
-                     , servant >= 0.11 && < 0.15
-                     , servant-client >= 0.11 && < 0.15
+                     , servant >= 0.11 && < 0.16
+                     , servant-client >= 0.11 && < 0.16
                      , text >= 1.2 && < 1.3
   default-language:    Haskell2010
 
+ src/Web/Google/Geocoding.hs view
@@ -0,0 +1,389 @@+{-# LANGUAGE CPP                        #-}
+{-# LANGUAGE DataKinds                  #-}
+{-# LANGUAGE DeriveGeneric              #-}
+{-# LANGUAGE FlexibleInstances          #-}
+{-# LANGUAGE GeneralizedNewtypeDeriving #-}
+{-# LANGUAGE OverloadedStrings          #-}
+{-# LANGUAGE TypeOperators              #-}
+
+-- |
+-- Module      : Web.Google.Geocoding
+-- Description : Bindings to the Google Geocoding API (formerly Maps Geocoding
+--               API)
+-- Copyright   : (c) Mike Pilgrem 2017, 2018
+-- Maintainer  : public@pilgrem.com
+-- Stability   : experimental
+--
+-- This package has no connection with Google Inc. or its affiliates.
+--
+-- The <https://developers.google.com/maps/documentation/geocoding/intro Google Geocoding API>
+-- provides a direct way to access geocoding and reverse geocoding services via
+-- an HTTP request. This library provides bindings in Haskell to that API.
+--
+-- NB: The use of the Google Geocoding API services is subject to the
+-- <https://cloud.google.com/maps-platform/terms/ Google Maps Platform Terms of Service>,
+-- which terms restrict the use of content. End Users’ use of Google Maps is
+-- subject to the then-current Google Maps/Google Earth Additional Terms of
+-- Service at <https://maps.google.com/help/terms_maps.html> and Google Privacy
+-- Policy at <https://www.google.com/policies/privacy/>.
+--
+-- The code below is an example console application to test privately the use of
+-- the library with the Google Geocoding API.
+--
+-- > {-# LANGUAGE OverloadedStrings #-}
+-- >
+-- > module Main (main) where
+-- >
+-- > import Data.Maybe (fromJust)
+-- > import Data.Text (Text)
+-- > import Data.Text.IO as T (getLine, putStr)
+-- > import Graphics.Gloss (Display (..), display, white)
+-- > import Graphics.Gloss.Juicy (fromDynamicImage)
+-- > import Network.HTTP.Client (Manager, newManager)
+-- > import Network.HTTP.Client.TLS (tlsManagerSettings)
+-- > import Web.Google.Geocoding (Address (..), geocode, GeocodingResponse (..),
+-- >   Geometry (..), Key (..), LatLng (..), Result (..), Status (..))
+-- > import Web.Google.Maps.Static (Center (..), Location (..), Size (..),
+-- >   staticmap, Zoom (..))
+-- > import System.IO (hFlush, stdout)
+-- >
+-- > main :: IO ()
+-- > main = do
+-- >   putStrLn $ "A test of the Google Geocoding API.\nNB: The use of " ++
+-- >     "the API services is subject to the Google Maps Platform Terms of " ++
+-- >     "Serivce at https://cloud.google.com/maps-platform/terms/.\n"
+-- >   txt <- input "Enter full address: "
+-- >   mgr <- newManager tlsManagerSettings
+-- >   let apiKey = Key "<REPLACE_THIS_WITH_YOUR_ACTUAL_GOOGLE_API_KEY>"
+-- >   result <- geocode mgr apiKey (Just $ Address txt) Nothing Nothing
+-- >     Nothing Nothing
+-- >   case result of
+-- >     Right response -> do
+-- >       let s = status response
+-- >       case s of
+-- >         OK -> do
+-- >           let latlng = location $ geometry $ head $ results response
+-- >               center = Center $ Coord latlng
+-- >           print center
+-- >           displayMap mgr apiKey center
+-- >         _  -> putStrLn $ "Error! Status: " ++ show s
+-- >     _ -> putStrLn $ "Error! Result:\n" ++ show result
+-- >
+-- > input :: Text -> IO Text
+-- > input msg = T.putStr msg >> hFlush stdout >> T.getLine
+-- >
+-- > displayMap :: Manager -> Key -> Center -> IO ()
+-- > displayMap mgr apiKey center = do
+-- >   let zoom = Just $ Zoom 17
+-- >       w    = 400
+-- >       h    = 400
+-- >       size = Size w h
+-- >   result <- staticmap mgr apiKey Nothing (Just center) zoom size Nothing
+-- >     Nothing [] Nothing [] [] Nothing
+-- >   case result of
+-- >     Right response -> do
+-- >       let picture = fromJust $ fromDynamicImage response
+-- >           title   = "Test Google Geocoding API"
+-- >           window  = InWindow title (w, h) (10, 10)
+-- >       display window white picture
+-- >     Left err -> putStrLn $ "Error while displaying map: " ++ show err
+module Web.Google.Geocoding
+    ( -- * Functions
+      geocode
+    , backGeocode
+      -- * API
+    , GoogleGeocodingAPI
+    , api
+      -- * Types
+    , Key                  (..)
+    , Address              (..)
+    , FilterComponent      (..)
+    , Viewport             (..)
+    , Language             (..)
+    , Region               (..)
+    , GeocodingResponse    (..)
+    , Status               (..)
+    , Result               (..)
+    , AddressType          (..)
+    , AddressComponent     (..)
+    , PostcodeLocality     (..)
+    , Geometry             (..)
+    , LatLng               (..)
+    , PlaceId              (..)
+    , Location             (..)
+    , LocationType         (..)
+    ) where
+
+import Data.Aeson hiding (Result)
+import Data.Aeson.Types (Options (..))
+import Data.List (intersperse)
+import Data.Proxy
+import Data.Text (Text)
+import qualified Data.Text as T (concat, unpack)
+import GHC.Generics (Generic)
+import Network.HTTP.Client (Manager)
+import Servant.API
+import Servant.Client
+import Web.Google.Maps.Common (Address (..), googleMapsApis, Key (..),
+    Language (..), LatLng (..), Location (..), Region (..))
+
+-- | Fliter component: a component that can be used to filter the results
+-- returned in a geocoding response.
+data FilterComponent
+    = Route Text
+    | Locality Text
+    | AdministrativeArea Text
+    | PostalCode Text
+    | Country Region
+    deriving (Eq, Show)
+
+instance ToHttpApiData FilterComponent where
+    toUrlPiece filterComponent
+        | Route route <- filterComponent
+          = T.concat ["route:", route]
+        | Locality locality <- filterComponent
+          = T.concat ["locality:", locality]
+        | AdministrativeArea adminArea <- filterComponent
+          = T.concat ["administrative_area:", adminArea]
+        | PostalCode postalCode <- filterComponent
+          = T.concat ["postal_code:", postalCode]
+        | Country country <- filterComponent
+          = T.concat ["country:", toUrlPiece country]
+
+instance ToHttpApiData [FilterComponent] where
+    toUrlPiece [] = ""
+    toUrlPiece cs = T.concat $ intersperse "|" $ map toUrlPiece cs
+
+-- | Geocoding Reponse
+data GeocodingResponse = GeocodingResponse
+    { status        :: Status
+    , error_message :: Maybe Text
+    , results       :: [Result]
+    } deriving (Eq, Show, Generic)
+
+instance FromJSON GeocodingResponse
+
+-- | Contains the status of the request and may contain debugging information to
+--  help you track down why geocoding is not working.
+data Status
+    = OK              -- ^ Indicates that no errors occurred; the address was
+                      -- successfully parsed and at least one geocode was
+                      -- returned.
+    | ZeroResults     -- ^ Indicates that the geocode was successful but
+                      -- returned no results. This may occur if the geocoder was
+                      -- passed a non-existent address.
+    | OverQueryLimit
+    | RequestDenied
+    | InvalidRequest  -- ^ Generally indicates that the query (address,
+                      -- components or latlng) is missing.
+    | UnknownError
+    deriving (Eq, Show)
+
+instance FromJSON Status where
+    parseJSON = withText "Status" $ \t -> case t of
+        "OK"               -> return OK
+        "ZERO_RESULTS"     -> return ZeroResults
+        "OVER_QUERY_LIMIT" -> return OverQueryLimit
+        "REQUEST_DENIED"   -> return RequestDenied
+        "INVALID_REQUEST"  -> return InvalidRequest
+        "UNKNOWN_ERROR"    -> return UnknownError
+        _                  -> fail $ "Unrecognised status type, namely: " ++
+                                  T.unpack t
+
+-- | A result of the geocoder.
+data Result = Result
+    { types :: [AddressType]
+    , formatted_address :: Text
+    , address_components :: [AddressComponent]
+    , postcode_localities :: Maybe [PostcodeLocality]
+    , geometry :: Geometry
+    , partial_match :: Maybe Bool
+    , place_id :: PlaceId
+    } deriving (Eq, Show, Generic)
+
+instance FromJSON Result
+
+-- | Address (and address component) type: The list of types provided by Google
+-- (as at 4 March 2017) is incomplete.
+newtype AddressType = AddressType Text
+    deriving (Eq, Show, Generic, ToHttpApiData)
+
+instance FromJSON AddressType
+
+-- | Address component
+data AddressComponent = AddressComponent
+    { address_component_types      :: [AddressType]
+    , long_name  :: Text
+    , short_name :: Text
+    } deriving (Eq, Show, Generic)
+
+instance FromJSON AddressComponent where
+    parseJSON = genericParseJSON defaultOptions
+        { fieldLabelModifier = \l -> case l of
+            "address_component_types" -> "types"
+            _ -> l
+        }
+
+-- | Postcode locality: a locality contained in a postal code.
+newtype PostcodeLocality = PostcodeLocality Text
+    deriving (Eq, Show, Generic)
+
+instance FromJSON PostcodeLocality
+
+-- | Geometry
+data Geometry = Geometry
+    { location :: LatLng
+    , location_type :: LocationType
+    , viewport :: Viewport
+    , bounds :: Maybe Viewport
+    } deriving (Eq, Show, Generic)
+
+instance FromJSON Geometry
+
+-- | Location type
+data LocationType
+    = Rooftop
+    | RangeInterpolated
+    | GeometricCenter
+    | Approximate
+    deriving (Eq, Show)
+
+instance ToHttpApiData LocationType where
+    toUrlPiece locationType = case locationType of
+        Rooftop           -> "ROOFTOP"
+        RangeInterpolated -> "RANGE_INTERPOLATED"
+        GeometricCenter   -> "GEOMETRIC_CENTER"
+        Approximate       -> "APPROXIMATE"
+
+instance FromJSON LocationType where
+    parseJSON = withText "LocationType" $ \t -> case t of
+        "ROOFTOP"            -> return Rooftop
+        "RANGE_INTERPOLATED" -> return RangeInterpolated
+        "GEOMETRIC_CENTER"   -> return GeometricCenter
+        "APPROXIMATE"        -> return Approximate
+        _ -> fail $ "Unrecognised location type, namely: " ++ T.unpack t
+
+-- | Viewport
+data Viewport = Viewport
+    { southwest :: LatLng
+    , northeast :: LatLng
+    } deriving (Eq, Show, Generic)
+
+instance ToHttpApiData Viewport where
+    toUrlPiece (Viewport sw ne) = T.concat [toUrlPiece sw, "|", toUrlPiece ne]
+
+instance FromJSON Viewport
+
+-- | Place id
+newtype PlaceId = PlaceId Text
+    deriving (Eq, Show, Generic, ToHttpApiData)
+
+instance FromJSON PlaceId
+
+-- | Google Geocoding API
+type GoogleGeocodingAPI
+    =    "geocode"
+    :>   "json"
+    :>   QueryParam "key"           Key
+    :>   QueryParam "address"       Address
+    :>   QueryParam "components"    [FilterComponent]
+    :>   QueryParam "bounds"        Viewport
+    :>   QueryParam "language"      Language
+    :>   QueryParam "region"        Region
+    :>   Get '[JSON] GeocodingResponse
+    :<|> "geocode"
+    :>   "json"
+    :>   QueryParam "key"           Key
+    :>   QueryParam "latlng"        LatLng
+    :>   QueryParam "place_id"      PlaceId
+    :>   QueryParam "result_type"   AddressType
+    :>   QueryParam "location_type" LocationType
+    :>   QueryParam "language"      Language
+    :>   Get '[JSON] GeocodingResponse
+
+-- | API type
+api :: Proxy GoogleGeocodingAPI
+api = Proxy
+
+geocode'
+    :: Maybe Key
+    -> Maybe Address
+    -> Maybe [FilterComponent]
+    -> Maybe Viewport
+    -> Maybe Language
+    -> Maybe Region
+    -> ClientM GeocodingResponse
+backGeocode'
+    :: Maybe Key
+    -> Maybe LatLng
+    -> Maybe PlaceId
+    -> Maybe AddressType
+    -> Maybe LocationType
+    -> Maybe Language
+    -> ClientM GeocodingResponse
+geocode' :<|> backGeocode' = client api
+
+-- | Geocode. NB: The use of the Google Geocoding API services is subject to the
+-- <https://cloud.google.com/maps-platform/terms/ Google Maps Platform Terms of Service>.
+-- End Users’ use of Google Maps is subject to the then-current Google
+-- Maps/Google Earth Additional Terms of Service at
+-- <https://maps.google.com/help/terms_maps.html> and Google Privacy Policy at
+-- <https://www.google.com/policies/privacy/>.
+geocode
+    :: Manager
+    -> Key
+    -> Maybe Address
+    -> Maybe [FilterComponent]
+    -> Maybe Viewport
+    -> Maybe Language
+    -> Maybe Region
+    -> IO (Either ServantError GeocodingResponse)
+geocode
+    mgr
+    key
+    addressOpt
+    filterComponentsOpt
+    viewportOpt
+    languageOpt
+    regionOpt
+    = runClientM (geocode' (Just key) addressOpt filterComponentsOpt viewportOpt
+          languageOpt regionOpt)
+-- CookieJar supported from servant-client-0.13
+#if MIN_VERSION_servant_client(0,13,0)
+          (ClientEnv mgr googleMapsApis Nothing)
+#else
+          (ClientEnv mgr googleMapsApis)
+#endif
+
+-- | Reverse (back) geocode. NB: The use of the Google Geocoding API services is
+-- subject to the
+-- <https://cloud.google.com/maps-platform/terms/ Google Maps Platform Terms of Service>.
+-- End Users’ use of Google Maps is subject to the then-current Google
+-- Maps/Google Earth Additional Terms of Service at
+-- <https://maps.google.com/help/terms_maps.html> and Google Privacy Policy at
+-- <https://www.google.com/policies/privacy/>.
+backGeocode
+    :: Manager
+    -> Key
+    -> Maybe LatLng
+    -> Maybe PlaceId
+    -> Maybe AddressType
+    -> Maybe LocationType
+    -> Maybe Language
+    -> IO (Either ServantError GeocodingResponse)
+backGeocode
+    mgr
+    key
+    latLngOpt
+    placeIdOpt
+    addressTypeOpt
+    locationTypeOpt
+    languageOpt
+    = runClientM (backGeocode' (Just key) latLngOpt placeIdOpt addressTypeOpt
+          locationTypeOpt languageOpt)
+-- CookieJar supported from servant-client-0.13
+#if MIN_VERSION_servant_client(0,13,0)
+          (ClientEnv mgr googleMapsApis Nothing)
+#else
+          (ClientEnv mgr googleMapsApis)
+#endif
− src/Web/Google/Maps/Geocoding.hs
@@ -1,377 +0,0 @@-{-# LANGUAGE CPP                        #-}
-{-# LANGUAGE DataKinds                  #-}
-{-# LANGUAGE DeriveGeneric              #-}
-{-# LANGUAGE FlexibleInstances          #-}
-{-# LANGUAGE GeneralizedNewtypeDeriving #-}
-{-# LANGUAGE OverloadedStrings          #-}
-{-# LANGUAGE TypeOperators              #-}
-
--- |
--- Module      : Web.Google.Maps.Geocoding
--- Description : Bindings to the Google Maps Geocoding API
--- Copyright   : (c) Mike Pilgrem 2017
--- Maintainer  : public@pilgrem.com
--- Stability   : experimental
---
--- This package has no connection with Google Inc. or its affiliates.
---
--- The <https://developers.google.com/maps/documentation/geocoding/intro Google Maps Geocoding API>
--- provides a direct way to access geocoding and reverse geocoding services via
--- an HTTP request. This library provides bindings in Haskell to that API.
---
--- NB: The use of the Google Maps Geocoding API services is subject to the
--- <https://developers.google.com/maps/terms Google Maps APIs Terms of Service>,
--- which terms restrict the use of content (eg no use without a Google map).
---
--- The code below is an example console application to test privately the use of
--- the library with the Google Maps Geocoding API.
---
--- > {-# LANGUAGE OverloadedStrings #-}
--- >
--- > module Main (main) where
--- >
--- > import Data.Maybe (fromJust)
--- > import Data.Text (Text)
--- > import Data.Text.IO as T (getLine, putStr)
--- > import Graphics.Gloss (Display (..), display, white)
--- > import Graphics.Gloss.Juicy (fromDynamicImage)
--- > import Network.HTTP.Client (Manager, newManager)
--- > import Network.HTTP.Client.TLS (tlsManagerSettings)
--- > import Web.Google.Maps.Geocoding (Address (..), geocode, GeocodingResponse (..),
--- >   Geometry (..), Key (..), LatLng (..), Result (..), Status (..))
--- > import Web.Google.Static.Maps (Center (..), Location (..), Size (..),
--- >   staticmap, Zoom (..))
--- > import System.IO (hFlush, stdout)
--- >
--- > main :: IO ()
--- > main = do
--- >   putStrLn $ "A test of the Google Maps Geocoding API.\nNB: The use of " ++
--- >     "the API services is subject to the Google Maps APIs Terms of " ++
--- >     "Serivce at https://developers.google.com/maps/terms.\n"
--- >   txt <- input "Enter full address: "
--- >   mgr <- newManager tlsManagerSettings
--- >   let apiKey = Key "<REPLACE_THIS_WITH_YOUR_ACTUAL_GOOGLE_API_KEY>"
--- >   result <- geocode mgr apiKey (Just $ Address txt) Nothing Nothing
--- >     Nothing Nothing
--- >   case result of
--- >     Right response -> do
--- >       let s = status response
--- >       case s of
--- >         OK -> do
--- >           let latlng = location $ geometry $ head $ results response
--- >               center = Center $ Coord latlng
--- >           print center
--- >           displayMap mgr apiKey center
--- >         _  -> putStrLn $ "Error! Status: " ++ show s
--- >     _ -> putStrLn $ "Error! Result:\n" ++ show result
--- >
--- > input :: Text -> IO Text
--- > input msg = T.putStr msg >> hFlush stdout >> T.getLine
--- >
--- > displayMap :: Manager -> Key -> Center -> IO ()
--- > displayMap mgr apiKey center = do
--- >   let zoom = Just $ Zoom 17
--- >       w    = 400
--- >       h    = 400
--- >       size = Size w h
--- >   result <- staticmap mgr apiKey Nothing (Just center) zoom size Nothing
--- >     Nothing [] Nothing [] [] Nothing
--- >   case result of
--- >     Right response -> do
--- >       let picture = fromJust $ fromDynamicImage response
--- >           title   = "Test Google Maps Geocoding API"
--- >           window  = InWindow title (w, h) (10, 10)
--- >       display window white picture
--- >     Left err -> putStrLn $ "Error while displaying map: " ++ show err
-module Web.Google.Maps.Geocoding
-    ( -- * Functions
-      geocode
-    , backGeocode
-      -- * API
-    , GoogleMapsGeocodingAPI
-    , api
-      -- * Types
-    , Key                  (..)
-    , Address              (..)
-    , FilterComponent      (..)
-    , Viewport             (..)
-    , Language             (..)
-    , Region               (..)
-    , GeocodingResponse    (..)
-    , Status               (..)
-    , Result               (..)
-    , AddressType          (..)
-    , AddressComponent     (..)
-    , PostcodeLocality     (..)
-    , Geometry             (..)
-    , LatLng               (..)
-    , PlaceId              (..)
-    , Location             (..)
-    , LocationType         (..)
-    ) where
-
-import Data.Aeson hiding (Result)
-import Data.Aeson.Types (Options (..))
-import Data.List (intersperse)
-import Data.Proxy
-import Data.Text (Text)
-import qualified Data.Text as T (concat, unpack)
-import GHC.Generics (Generic)
-import Network.HTTP.Client (Manager)
-import Servant.API
-import Servant.Client
-import Web.Google.Maps.Common (Address (..), googleMapsApis, Key (..),
-    Language (..), LatLng (..), Location (..), Region (..))
-
--- | Fliter component: a component that can be used to filter the results
--- returned in a geocoding response.
-data FilterComponent
-    = Route Text
-    | Locality Text
-    | AdministrativeArea Text
-    | PostalCode Text
-    | Country Region
-    deriving (Eq, Show)
-
-instance ToHttpApiData FilterComponent where
-    toUrlPiece filterComponent
-        | Route route <- filterComponent
-          = T.concat ["route:", route]
-        | Locality locality <- filterComponent
-          = T.concat ["locality:", locality]
-        | AdministrativeArea adminArea <- filterComponent
-          = T.concat ["administrative_area:", adminArea]
-        | PostalCode postalCode <- filterComponent
-          = T.concat ["postal_code:", postalCode]
-        | Country country <- filterComponent
-          = T.concat ["country:", toUrlPiece country]
-
-instance ToHttpApiData [FilterComponent] where
-    toUrlPiece [] = ""
-    toUrlPiece cs = T.concat $ intersperse "|" $ map toUrlPiece cs
-
--- | Geocoding Reponse
-data GeocodingResponse = GeocodingResponse
-    { status        :: Status
-    , error_message :: Maybe Text
-    , results       :: [Result]
-    } deriving (Eq, Show, Generic)
-
-instance FromJSON GeocodingResponse
-
--- | Contains the status of the request and may contain debugging information to
---  help you track down why geocoding is not working.
-data Status
-    = OK              -- ^ Indicates that no errors occurred; the address was
-                      -- successfully parsed and at least one geocode was
-                      -- returned.
-    | ZeroResults     -- ^ Indicates that the geocode was successful but
-                      -- returned no results. This may occur if the geocoder was
-                      -- passed a non-existent address.
-    | OverQueryLimit
-    | RequestDenied
-    | InvalidRequest  -- ^ Generally indicates that the query (address,
-                      -- components or latlng) is missing.
-    | UnknownError
-    deriving (Eq, Show)
-
-instance FromJSON Status where
-    parseJSON = withText "Status" $ \t -> case t of
-        "OK"               -> return OK
-        "ZERO_RESULTS"     -> return ZeroResults
-        "OVER_QUERY_LIMIT" -> return OverQueryLimit
-        "REQUEST_DENIED"   -> return RequestDenied
-        "INVALID_REQUEST"  -> return InvalidRequest
-        "UNKNOWN_ERROR"    -> return UnknownError
-        _                  -> fail $ "Unrecognised status type, namely: " ++
-                                  T.unpack t
-
--- | A result of the geocoder.
-data Result = Result
-    { types :: [AddressType]
-    , formatted_address :: Text
-    , address_components :: [AddressComponent]
-    , postcode_localities :: Maybe [PostcodeLocality]
-    , geometry :: Geometry
-    , partial_match :: Maybe Bool
-    , place_id :: PlaceId
-    } deriving (Eq, Show, Generic)
-
-instance FromJSON Result
-
--- | Address (and address component) type: The list of types provided by Google
--- (as at 4 March 2017) is incomplete.
-newtype AddressType = AddressType Text
-    deriving (Eq, Show, Generic, ToHttpApiData)
-
-instance FromJSON AddressType
-
--- | Address component
-data AddressComponent = AddressComponent
-    { address_component_types      :: [AddressType]
-    , long_name  :: Text
-    , short_name :: Text
-    } deriving (Eq, Show, Generic)
-
-instance FromJSON AddressComponent where
-    parseJSON = genericParseJSON defaultOptions
-        { fieldLabelModifier = \l -> case l of
-            "address_component_types" -> "types"
-            _ -> l
-        }
-
--- | Postcode locality: a locality contained in a postal code.
-newtype PostcodeLocality = PostcodeLocality Text
-    deriving (Eq, Show, Generic)
-
-instance FromJSON PostcodeLocality
-
--- | Geometry
-data Geometry = Geometry
-    { location :: LatLng
-    , location_type :: LocationType
-    , viewport :: Viewport
-    , bounds :: Maybe Viewport
-    } deriving (Eq, Show, Generic)
-
-instance FromJSON Geometry
-
--- | Location type
-data LocationType
-    = Rooftop
-    | RangeInterpolated
-    | GeometricCenter
-    | Approximate
-    deriving (Eq, Show)
-
-instance ToHttpApiData LocationType where
-    toUrlPiece locationType = case locationType of
-        Rooftop           -> "ROOFTOP"
-        RangeInterpolated -> "RANGE_INTERPOLATED"
-        GeometricCenter   -> "GEOMETRIC_CENTER"
-        Approximate       -> "APPROXIMATE"
-
-instance FromJSON LocationType where
-    parseJSON = withText "LocationType" $ \t -> case t of
-        "ROOFTOP"            -> return Rooftop
-        "RANGE_INTERPOLATED" -> return RangeInterpolated
-        "GEOMETRIC_CENTER"   -> return GeometricCenter
-        "APPROXIMATE"        -> return Approximate
-        _ -> fail $ "Unrecognised location type, namely: " ++ T.unpack t
-
--- | Viewport
-data Viewport = Viewport
-    { southwest :: LatLng
-    , northeast :: LatLng
-    } deriving (Eq, Show, Generic)
-
-instance ToHttpApiData Viewport where
-    toUrlPiece (Viewport sw ne) = T.concat [toUrlPiece sw, "|", toUrlPiece ne]
-
-instance FromJSON Viewport
-
--- | Place id
-newtype PlaceId = PlaceId Text
-    deriving (Eq, Show, Generic, ToHttpApiData)
-
-instance FromJSON PlaceId
-
--- | Google Translate API
-type GoogleMapsGeocodingAPI
-    =    "geocode"
-    :>   "json"
-    :>   QueryParam "key"           Key
-    :>   QueryParam "address"       Address
-    :>   QueryParam "components"    [FilterComponent]
-    :>   QueryParam "bounds"        Viewport
-    :>   QueryParam "language"      Language
-    :>   QueryParam "region"        Region
-    :>   Get '[JSON] GeocodingResponse
-    :<|> "geocode"
-    :>   "json"
-    :>   QueryParam "key"           Key
-    :>   QueryParam "latlng"        LatLng
-    :>   QueryParam "place_id"      PlaceId
-    :>   QueryParam "result_type"   AddressType
-    :>   QueryParam "location_type" LocationType
-    :>   QueryParam "language"      Language
-    :>   Get '[JSON] GeocodingResponse
-
--- | API type
-api :: Proxy GoogleMapsGeocodingAPI
-api = Proxy
-
-geocode'
-    :: Maybe Key
-    -> Maybe Address
-    -> Maybe [FilterComponent]
-    -> Maybe Viewport
-    -> Maybe Language
-    -> Maybe Region
-    -> ClientM GeocodingResponse
-backGeocode'
-    :: Maybe Key
-    -> Maybe LatLng
-    -> Maybe PlaceId
-    -> Maybe AddressType
-    -> Maybe LocationType
-    -> Maybe Language
-    -> ClientM GeocodingResponse
-geocode' :<|> backGeocode' = client api
-
--- | Geocode. NB: The use of the Google Maps Geocoding API services is subject
--- to the <https://developers.google.com/maps/terms Google Maps APIs Terms of Service>.
-geocode
-    :: Manager
-    -> Key
-    -> Maybe Address
-    -> Maybe [FilterComponent]
-    -> Maybe Viewport
-    -> Maybe Language
-    -> Maybe Region
-    -> IO (Either ServantError GeocodingResponse)
-geocode
-    mgr
-    key
-    addressOpt
-    filterComponentsOpt
-    viewportOpt
-    languageOpt
-    regionOpt
-    = runClientM (geocode' (Just key) addressOpt filterComponentsOpt viewportOpt
-          languageOpt regionOpt)
--- CookieJar supported from servant-client-0.13
-#if MIN_VERSION_servant_client(0,13,0)
-          (ClientEnv mgr googleMapsApis Nothing)
-#else
-          (ClientEnv mgr googleMapsApis)
-#endif
-
--- | Reverse (back) geocode. NB: The use of the Google Maps Geocoding API
--- services is subject to the
--- <https://developers.google.com/maps/terms Google Maps APIs Terms of Service>.
-backGeocode
-    :: Manager
-    -> Key
-    -> Maybe LatLng
-    -> Maybe PlaceId
-    -> Maybe AddressType
-    -> Maybe LocationType
-    -> Maybe Language
-    -> IO (Either ServantError GeocodingResponse)
-backGeocode
-    mgr
-    key
-    latLngOpt
-    placeIdOpt
-    addressTypeOpt
-    locationTypeOpt
-    languageOpt
-    = runClientM (backGeocode' (Just key) latLngOpt placeIdOpt addressTypeOpt
-          locationTypeOpt languageOpt)
--- CookieJar supported from servant-client-0.13
-#if MIN_VERSION_servant_client(0,13,0)
-          (ClientEnv mgr googleMapsApis Nothing)
-#else
-          (ClientEnv mgr googleMapsApis)
-#endif