Web.Google.Maps.Geocoding - Hackage

文章推薦指數: 80 %
投票人數:10人

The code below is an example console application to test privately the use of the library with the Google Maps Geocoding API. {-# LANGUAGE OverloadedStrings #-} ... SourceContentsIndexgoogle-maps-geocoding-0.3.0.0:GoogleMapsGeocodingAPIbindingsCopyright(c)[email protected] Stabilityexperimental SafeHaskellNoneLanguageHaskell2010Web.Google.Maps.GeocodingContentsFunctionsAPITypesDescriptionThispackagehasnoconnectionwithGoogleInc.oritsaffiliates.TheGoogleMapsGeocodingAPI providesadirectwaytoaccessgeocodingandreversegeocodingservicesvia anHTTPrequest.ThislibraryprovidesbindingsinHaskelltothatAPI.NB:TheuseoftheGoogleMapsGeocodingAPIservicesissubjecttothe GoogleMapsAPIsTermsofService, whichtermsrestricttheuseofcontent(egnousewithoutaGooglemap).Thecodebelowisanexampleconsoleapplicationtotestprivatelytheuseof thelibrarywiththeGoogleMapsGeocodingAPI.{-#LANGUAGEOverloadedStrings#-} moduleMain(main)where importData.Maybe(fromJust) importData.Text(Text) importData.Text.IOasT(getLine,putStr) importGraphics.Gloss(Display(..),display,white) importGraphics.Gloss.Juicy(fromDynamicImage) importNetwork.HTTP.Client(Manager,newManager) importNetwork.HTTP.Client.TLS(tlsManagerSettings) importWeb.Google.Maps.Geocoding(Address(..),geocode,GeocodingResponse(..), Geometry(..),Key(..),LatLng(..),Result(..),Status(..)) importWeb.Google.Static.Maps(Center(..),Location(..),Size(..), staticmap,Zoom(..)) importSystem.IO(hFlush,stdout) main::IO() main=do putStrLn"AtestoftheGoogleMapsGeocodingAPI.\nNB:Theuseofthe\ \APIservicesissubjecttotheGoogleMapsAPIsTermsofSerivceat\ \https://developers.google.com/maps/terms.\n" txt" resultdo lets=statusresponse casesof OK->do letlatlng=location$geometry$head$results response center=Center$Coordlatlng printcenter displayMapmgrapiKeycenter _->putStrLn$"Error!Status:"++shows _->putStrLn$"Error!Result:\n"++showresult input::Text->IOText inputmsg=T.putStrmsg>>hFlushstdout>>T.getLine displayMap::Manager->Key->Center->IO() displayMapmgrapiKeycenter=do letzoom=Just$Zoom17 w=400 h=400 size=Sizewh resultdo letpicture=fromJust$fromDynamicImageresponse title="TestGoogleMapsGeocodingAPI" window=InWindowtitle(w,h)(10,10) displaywindowwhitepicture Lefterr->putStrLn$"Errorwhiledisplayingmap:"++showerrSynopsisgeocode::Manager->Key->MaybeAddress->Maybe[FilterComponent]->MaybeViewport->MaybeLanguage->MaybeRegion->IO(EitherServantErrorGeocodingResponse)backGeocode::Manager->Key->MaybeLatLng->MaybePlaceId->MaybeAddressType->MaybeLocationType->MaybeLanguage->IO(EitherServantErrorGeocodingResponse)typeGoogleMapsGeocodingAPI=("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::ProxyGoogleMapsGeocodingAPInewtypeKey::*=KeyTextnewtypeAddress::*=AddressTextdataFilterComponent=RouteText|LocalityText|AdministrativeAreaText|PostalCodeText|CountryRegiondataViewport=Viewport{southwest::LatLngnortheast::LatLng}dataLanguage::*=Arabic|Basque|Bengali|Bulgarian|Catalan|ChineseSimplified|ChineseTraditional|Croatian|Czech|Danish|Dutch|German|Greek|English|EnglishAustralian|EnglishBritish|Farsi|Filipino|Finnish|French|Galician|Gujarati|Hebrew|Hindi|Hungarian|Indonesian|Italian|Japanese|Kannada|Korean|Latvian|Lithuanian|Malayalam|Marathi|Norwegian|Polish|Portuguese|PortugueseBrazil|PortuguesePortugal|Romanian|Russian|Serbian|Slovak|Slovenian|Spanish|Swedish|Tagalog|Tamil|Telugu|Thai|Turkish|Ukrainian|VietnamesedataRegion::*=AD|AE|AF|AG|AI|AL|AM|AO|AQ|AR|AS|AT|AU|AW|AX|AZ|BA|BB|BD|BE|BF|BG|BH|BI|BJ|BL|BM|BN|BO|BQ|BR|BS|BT|BV|BW|BY|BZ|CA|CC|CD|CF|CG|CH|CI|CK|CL|CM|CN|CO|CR|CU|CV|CW|CX|CY|CZ|DE|DJ|DK|DM|DO|DZ|EC|EE|EG|EH|ER|ES|ET|FI|FJ|FK|FM|FO|FR|GA|GB|GD|GE|GF|GG|GH|GI|GL|GM|GN|GP|GQ|GR|GS|GT|GU|GW|GY|HK|HM|HN|HR|HT|HU|ID|IE|IL|IM|IN|IO|IQ|IR|IS|IT|JE|JM|JO|JP|KE|KG|KH|KI|KM|KN|KP|KR|KW|KY|KZ|LA|LB|LC|LI|LK|LR|LS|LT|LU|LV|LY|MA|MC|MD|ME|MF|MG|MH|MK|ML|MM|MN|MO|MP|MQ|MR|MS|MT|MU|MV|MW|MX|MY|MZ|NA|NC|NE|NF|NG|NI|NL|NO|NP|NR|NU|NZ|OM|PA|PE|PF|PG|PH|PK|PL|PM|PN|PR|PS|PT|PW|PY|QA|RE|RO|RS|RU|RW|SA|SB|SC|SD|SE|SG|SH|SI|SJ|SK|SL|SM|SN|SO|SR|SS|ST|SV|SX|SY|SZ|TC|TD|TF|TG|TH|TJ|TK|TL|TM|TN|TO|TR|TT|TV|TW|TZ|UA|UG|UM|US|UY|UZ|VA|VC|VE|VG|VI|VN|VU|WF|WS|YE|YT|ZA|ZM|ZW|AC|UK|EUdataGeocodingResponse=GeocodingResponse{status::Statuserror_message::MaybeTextresults::[Result]}dataStatus=OK|ZeroResults|OverQueryLimit|RequestDenied|InvalidRequest|UnknownErrordataResult=Result{types::[AddressType]formatted_address::Textaddress_components::[AddressComponent]postcode_localities::Maybe[PostcodeLocality]geometry::Geometrypartial_match::MaybeBoolplace_id::PlaceId}newtypeAddressType=AddressTypeTextdataAddressComponent=AddressComponent{address_component_types::[AddressType]long_name::Textshort_name::Text}newtypePostcodeLocality=PostcodeLocalityTextdataGeometry=Geometry{location::LatLnglocation_type::LocationTypeviewport::Viewportbounds::MaybeViewport}dataLatLng::*=LatLng{lat::Doublelng::Double}newtypePlaceId=PlaceIdTextdataLocation::*=CoordsLatLng|LocaleAddressdataLocationType=Rooftop|RangeInterpolated|GeometricCenter|ApproximateFunctionsgeocode::Manager->Key->MaybeAddress->Maybe[FilterComponent]->MaybeViewport->MaybeLanguage->MaybeRegion->IO(EitherServantErrorGeocodingResponse)Source#Geocode.NB:TheuseoftheGoogleMapsGeocodingAPIservicesissubject totheGoogleMapsAPIsTermsofService.backGeocode::Manager->Key->MaybeLatLng->MaybePlaceId->MaybeAddressType->MaybeLocationType->MaybeLanguage->IO(EitherServantErrorGeocodingResponse)Source#Reverse(back)geocode.NB:TheuseoftheGoogleMapsGeocodingAPI servicesissubjecttothe GoogleMapsAPIsTermsofService.APItypeGoogleMapsGeocodingAPI=("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))))))))Source#GoogleTranslateAPIapi::ProxyGoogleMapsGeocodingAPISource#APItypeTypesnewtypeKey::*#APIkeyConstructorsKeyText InstancesEqKey Methods(==)::Key->Key->Bool#(/=)::Key->Key->Bool#ShowKey MethodsshowsPrec::Int->Key->ShowS#show::Key->String#showList::[Key]->ShowS#ToHttpApiDataKey MethodstoUrlPiece::Key->Text#toHeader::Key->ByteString#toQueryParam::Key->Text#newtypeAddress::*#AddressConstructorsAddressText InstancesEqAddress Methods(==)::Address->Address->Bool#(/=)::Address->Address->Bool#ShowAddress MethodsshowsPrec::Int->Address->ShowS#show::Address->String#showList::[Address]->ShowS#ToHttpApiDataAddress MethodstoUrlPiece::Address->Text#toHeader::Address->ByteString#toQueryParam::Address->Text#dataFilterComponentSource#Flitercomponent:acomponentthatcanbeusedtofiltertheresults returnedinageocodingresponse.ConstructorsRouteText LocalityText AdministrativeAreaText PostalCodeText CountryRegion InstancesEqFilterComponentSource# Methods(==)::FilterComponent->FilterComponent->Bool#(/=)::FilterComponent->FilterComponent->Bool#ShowFilterComponentSource# MethodsshowsPrec::Int->FilterComponent->ShowS#show::FilterComponent->String#showList::[FilterComponent]->ShowS#ToHttpApiDataFilterComponentSource# MethodstoUrlPiece::FilterComponent->Text#toHeader::FilterComponent->ByteString#toQueryParam::FilterComponent->Text#ToHttpApiData[FilterComponent]Source# MethodstoUrlPiece::[FilterComponent]->Text#toHeader::[FilterComponent]->ByteString#toQueryParam::[FilterComponent]->Text#dataViewportSource#ViewportConstructorsViewport Fieldssouthwest::LatLng northeast::LatLng InstancesEqViewportSource# Methods(==)::Viewport->Viewport->Bool#(/=)::Viewport->Viewport->Bool#ShowViewportSource# MethodsshowsPrec::Int->Viewport->ShowS#show::Viewport->String#showList::[Viewport]->ShowS#GenericViewportSource# AssociatedTypestypeRepViewport::*->*#Methodsfrom::Viewport->RepViewportx#to::RepViewportx->Viewport#FromJSONViewportSource# MethodsparseJSON::Value->ParserViewport#parseJSONList::Value->Parser[Viewport]#ToHttpApiDataViewportSource# MethodstoUrlPiece::Viewport->Text#toHeader::Viewport->ByteString#toQueryParam::Viewport->Text#typeRepViewportSource# typeRepViewport=D1(MetaData"Viewport""Web.Google.Maps.Geocoding""google-maps-geocoding-0.3.0.0-9gB8FFmYqs0FZiYtBPMKTa"False)(C1(MetaCons"Viewport"PrefixITrue)((:*:)(S1(MetaSel(JustSymbol"southwest")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0LatLng))(S1(MetaSel(JustSymbol"northeast")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0LatLng))))dataLanguage::*#Language:supportedlanguagesbasedonthelistat https://developers.google.com/maps/faq#languagesupport(asat13March 2017).ConstructorsArabic Basque Bengali Bulgarian Catalan ChineseSimplified ChineseTraditional Croatian Czech Danish Dutch German Greek English EnglishAustralian EnglishBritish Farsi Filipino Finnish French Galician Gujarati Hebrew Hindi Hungarian Indonesian Italian Japanese Kannada Korean Latvian Lithuanian Malayalam Marathi Norwegian Polish Portuguese PortugueseBrazil PortuguesePortugal Romanian Russian Serbian Slovak Slovenian Spanish Swedish Tagalog Tamil Telugu Thai Turkish Ukrainian Vietnamese InstancesEqLanguage Methods(==)::Language->Language->Bool#(/=)::Language->Language->Bool#ShowLanguage MethodsshowsPrec::Int->Language->ShowS#show::Language->String#showList::[Language]->ShowS#ToHttpApiDataLanguage MethodstoUrlPiece::Language->Text#toHeader::Language->ByteString#toQueryParam::Language->Text#dataRegion::*#Region:accTLD(countrycodetopleveldomain).ConstructorsAD AE AF AG AI AL AM AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW AC UK EU InstancesEqRegion Methods(==)::Region->Region->Bool#(/=)::Region->Region->Bool#ShowRegion MethodsshowsPrec::Int->Region->ShowS#show::Region->String#showList::[Region]->ShowS#ToHttpApiDataRegion MethodstoUrlPiece::Region->Text#toHeader::Region->ByteString#toQueryParam::Region->Text#dataGeocodingResponseSource#GeocodingReponseConstructorsGeocodingResponse Fieldsstatus::Status error_message::MaybeText results::[Result] InstancesEqGeocodingResponseSource# Methods(==)::GeocodingResponse->GeocodingResponse->Bool#(/=)::GeocodingResponse->GeocodingResponse->Bool#ShowGeocodingResponseSource# MethodsshowsPrec::Int->GeocodingResponse->ShowS#show::GeocodingResponse->String#showList::[GeocodingResponse]->ShowS#GenericGeocodingResponseSource# AssociatedTypestypeRepGeocodingResponse::*->*#Methodsfrom::GeocodingResponse->RepGeocodingResponsex#to::RepGeocodingResponsex->GeocodingResponse#FromJSONGeocodingResponseSource# MethodsparseJSON::Value->ParserGeocodingResponse#parseJSONList::Value->Parser[GeocodingResponse]#typeRepGeocodingResponseSource# typeRepGeocodingResponse=D1(MetaData"GeocodingResponse""Web.Google.Maps.Geocoding""google-maps-geocoding-0.3.0.0-9gB8FFmYqs0FZiYtBPMKTa"False)(C1(MetaCons"GeocodingResponse"PrefixITrue)((:*:)(S1(MetaSel(JustSymbol"status")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Status))((:*:)(S1(MetaSel(JustSymbol"error_message")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0(MaybeText)))(S1(MetaSel(JustSymbol"results")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0[Result])))))dataStatusSource#Containsthestatusoftherequestandmaycontaindebugginginformationto helpyoutrackdownwhygeocodingisnotworking.ConstructorsOKIndicatesthatnoerrorsoccurred;theaddresswas successfullyparsedandatleastonegeocodewas returned.ZeroResultsIndicatesthatthegeocodewassuccessfulbut returnednoresults.Thismayoccurifthegeocoderwas passedanon-existentaddress.OverQueryLimit RequestDenied InvalidRequestGenerallyindicatesthatthequery(address, componentsorlatlng)ismissing.UnknownError InstancesEqStatusSource# Methods(==)::Status->Status->Bool#(/=)::Status->Status->Bool#ShowStatusSource# MethodsshowsPrec::Int->Status->ShowS#show::Status->String#showList::[Status]->ShowS#FromJSONStatusSource# MethodsparseJSON::Value->ParserStatus#parseJSONList::Value->Parser[Status]#dataResultSource#Aresultofthegeocoder.ConstructorsResult Fieldstypes::[AddressType] formatted_address::Text address_components::[AddressComponent] postcode_localities::Maybe[PostcodeLocality] geometry::Geometry partial_match::MaybeBool place_id::PlaceId InstancesEqResultSource# Methods(==)::Result->Result->Bool#(/=)::Result->Result->Bool#ShowResultSource# MethodsshowsPrec::Int->Result->ShowS#show::Result->String#showList::[Result]->ShowS#GenericResultSource# AssociatedTypestypeRepResult::*->*#Methodsfrom::Result->RepResultx#to::RepResultx->Result#FromJSONResultSource# MethodsparseJSON::Value->ParserResult#parseJSONList::Value->Parser[Result]#typeRepResultSource# typeRepResult=D1(MetaData"Result""Web.Google.Maps.Geocoding""google-maps-geocoding-0.3.0.0-9gB8FFmYqs0FZiYtBPMKTa"False)(C1(MetaCons"Result"PrefixITrue)((:*:)((:*:)(S1(MetaSel(JustSymbol"types")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0[AddressType]))((:*:)(S1(MetaSel(JustSymbol"formatted_address")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Text))(S1(MetaSel(JustSymbol"address_components")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0[AddressComponent]))))((:*:)((:*:)(S1(MetaSel(JustSymbol"postcode_localities")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0(Maybe[PostcodeLocality])))(S1(MetaSel(JustSymbol"geometry")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Geometry)))((:*:)(S1(MetaSel(JustSymbol"partial_match")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0(MaybeBool)))(S1(MetaSel(JustSymbol"place_id")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0PlaceId))))))newtypeAddressTypeSource#Address(andaddresscomponent)type:ThelistoftypesprovidedbyGoogle (asat4March2017)isincomplete.ConstructorsAddressTypeText InstancesEqAddressTypeSource# Methods(==)::AddressType->AddressType->Bool#(/=)::AddressType->AddressType->Bool#ShowAddressTypeSource# MethodsshowsPrec::Int->AddressType->ShowS#show::AddressType->String#showList::[AddressType]->ShowS#GenericAddressTypeSource# AssociatedTypestypeRepAddressType::*->*#Methodsfrom::AddressType->RepAddressTypex#to::RepAddressTypex->AddressType#FromJSONAddressTypeSource# MethodsparseJSON::Value->ParserAddressType#parseJSONList::Value->Parser[AddressType]#ToHttpApiDataAddressTypeSource# MethodstoUrlPiece::AddressType->Text#toHeader::AddressType->ByteString#toQueryParam::AddressType->Text#typeRepAddressTypeSource# typeRepAddressType=D1(MetaData"AddressType""Web.Google.Maps.Geocoding""google-maps-geocoding-0.3.0.0-9gB8FFmYqs0FZiYtBPMKTa"True)(C1(MetaCons"AddressType"PrefixIFalse)(S1(MetaSel(NothingSymbol)NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Text)))dataAddressComponentSource#AddresscomponentConstructorsAddressComponent Fieldsaddress_component_types::[AddressType] long_name::Text short_name::Text InstancesEqAddressComponentSource# Methods(==)::AddressComponent->AddressComponent->Bool#(/=)::AddressComponent->AddressComponent->Bool#ShowAddressComponentSource# MethodsshowsPrec::Int->AddressComponent->ShowS#show::AddressComponent->String#showList::[AddressComponent]->ShowS#GenericAddressComponentSource# AssociatedTypestypeRepAddressComponent::*->*#Methodsfrom::AddressComponent->RepAddressComponentx#to::RepAddressComponentx->AddressComponent#FromJSONAddressComponentSource# MethodsparseJSON::Value->ParserAddressComponent#parseJSONList::Value->Parser[AddressComponent]#typeRepAddressComponentSource# typeRepAddressComponent=D1(MetaData"AddressComponent""Web.Google.Maps.Geocoding""google-maps-geocoding-0.3.0.0-9gB8FFmYqs0FZiYtBPMKTa"False)(C1(MetaCons"AddressComponent"PrefixITrue)((:*:)(S1(MetaSel(JustSymbol"address_component_types")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0[AddressType]))((:*:)(S1(MetaSel(JustSymbol"long_name")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Text))(S1(MetaSel(JustSymbol"short_name")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Text)))))newtypePostcodeLocalitySource#Postcodelocality:alocalitycontainedinapostalcode.ConstructorsPostcodeLocalityText InstancesEqPostcodeLocalitySource# Methods(==)::PostcodeLocality->PostcodeLocality->Bool#(/=)::PostcodeLocality->PostcodeLocality->Bool#ShowPostcodeLocalitySource# MethodsshowsPrec::Int->PostcodeLocality->ShowS#show::PostcodeLocality->String#showList::[PostcodeLocality]->ShowS#GenericPostcodeLocalitySource# AssociatedTypestypeRepPostcodeLocality::*->*#Methodsfrom::PostcodeLocality->RepPostcodeLocalityx#to::RepPostcodeLocalityx->PostcodeLocality#FromJSONPostcodeLocalitySource# MethodsparseJSON::Value->ParserPostcodeLocality#parseJSONList::Value->Parser[PostcodeLocality]#typeRepPostcodeLocalitySource# typeRepPostcodeLocality=D1(MetaData"PostcodeLocality""Web.Google.Maps.Geocoding""google-maps-geocoding-0.3.0.0-9gB8FFmYqs0FZiYtBPMKTa"True)(C1(MetaCons"PostcodeLocality"PrefixIFalse)(S1(MetaSel(NothingSymbol)NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Text)))dataGeometrySource#GeometryConstructorsGeometry Fieldslocation::LatLng location_type::LocationType viewport::Viewport bounds::MaybeViewport InstancesEqGeometrySource# Methods(==)::Geometry->Geometry->Bool#(/=)::Geometry->Geometry->Bool#ShowGeometrySource# MethodsshowsPrec::Int->Geometry->ShowS#show::Geometry->String#showList::[Geometry]->ShowS#GenericGeometrySource# AssociatedTypestypeRepGeometry::*->*#Methodsfrom::Geometry->RepGeometryx#to::RepGeometryx->Geometry#FromJSONGeometrySource# MethodsparseJSON::Value->ParserGeometry#parseJSONList::Value->Parser[Geometry]#typeRepGeometrySource# typeRepGeometry=D1(MetaData"Geometry""Web.Google.Maps.Geocoding""google-maps-geocoding-0.3.0.0-9gB8FFmYqs0FZiYtBPMKTa"False)(C1(MetaCons"Geometry"PrefixITrue)((:*:)((:*:)(S1(MetaSel(JustSymbol"location")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0LatLng))(S1(MetaSel(JustSymbol"location_type")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0LocationType)))((:*:)(S1(MetaSel(JustSymbol"viewport")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Viewport))(S1(MetaSel(JustSymbol"bounds")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0(MaybeViewport))))))dataLatLng::*#Latitudeandlongitude:precisionbeyond6decimalplacesisignored.ConstructorsLatLng Fieldslat::DoubleTakesanyvaluebetween-90and90.lng::DoubleTakesanyvaluebetween-180and180.InstancesEqLatLng Methods(==)::LatLng->LatLng->Bool#(/=)::LatLng->LatLng->Bool#ShowLatLng MethodsshowsPrec::Int->LatLng->ShowS#show::LatLng->String#showList::[LatLng]->ShowS#GenericLatLng AssociatedTypestypeRepLatLng::*->*#Methodsfrom::LatLng->RepLatLngx#to::RepLatLngx->LatLng#FromJSONLatLng MethodsparseJSON::Value->ParserLatLng#parseJSONList::Value->Parser[LatLng]#ToHttpApiDataLatLng MethodstoUrlPiece::LatLng->Text#toHeader::LatLng->ByteString#toQueryParam::LatLng->Text#typeRepLatLng typeRepLatLng=D1(MetaData"LatLng""Web.Google.Maps.Common""google-static-maps-0.4.0.0-Ih3ErfSHAZ6F62CLq0gkdB"False)(C1(MetaCons"LatLng"PrefixITrue)((:*:)(S1(MetaSel(JustSymbol"lat")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Double))(S1(MetaSel(JustSymbol"lng")NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Double))))newtypePlaceIdSource#PlaceidConstructorsPlaceIdText InstancesEqPlaceIdSource# Methods(==)::PlaceId->PlaceId->Bool#(/=)::PlaceId->PlaceId->Bool#ShowPlaceIdSource# MethodsshowsPrec::Int->PlaceId->ShowS#show::PlaceId->String#showList::[PlaceId]->ShowS#GenericPlaceIdSource# AssociatedTypestypeRepPlaceId::*->*#Methodsfrom::PlaceId->RepPlaceIdx#to::RepPlaceIdx->PlaceId#FromJSONPlaceIdSource# MethodsparseJSON::Value->ParserPlaceId#parseJSONList::Value->Parser[PlaceId]#ToHttpApiDataPlaceIdSource# MethodstoUrlPiece::PlaceId->Text#toHeader::PlaceId->ByteString#toQueryParam::PlaceId->Text#typeRepPlaceIdSource# typeRepPlaceId=D1(MetaData"PlaceId""Web.Google.Maps.Geocoding""google-maps-geocoding-0.3.0.0-9gB8FFmYqs0FZiYtBPMKTa"True)(C1(MetaCons"PlaceId"PrefixIFalse)(S1(MetaSel(NothingSymbol)NoSourceUnpackednessNoSourceStrictnessDecidedLazy)(Rec0Text)))dataLocation::*#LocationConstructorsCoordsLatLng LocaleAddress InstancesEqLocation Methods(==)::Location->Location->Bool#(/=)::Location->Location->Bool#ShowLocation MethodsshowsPrec::Int->Location->ShowS#show::Location->String#showList::[Location]->ShowS#ToHttpApiDataLocation MethodstoUrlPiece::Location->Text#toHeader::Location->ByteString#toQueryParam::Location->Text#ToHttpApiData[Location] MethodstoUrlPiece::[Location]->Text#toHeader::[Location]->ByteString#toQueryParam::[Location]->Text#dataLocationTypeSource#LocationtypeConstructorsRooftop RangeInterpolated GeometricCenter Approximate InstancesEqLocationTypeSource# Methods(==)::LocationType->LocationType->Bool#(/=)::LocationType->LocationType->Bool#ShowLocationTypeSource# MethodsshowsPrec::Int->LocationType->ShowS#show::LocationType->String#showList::[LocationType]->ShowS#FromJSONLocationTypeSource# MethodsparseJSON::Value->ParserLocationType#parseJSONList::Value->Parser[LocationType]#ToHttpApiDataLocationTypeSource# MethodstoUrlPiece::LocationType->Text#toHeader::LocationType->ByteString#toQueryParam::LocationType->Text#ProducedbyHaddockversion2.17.3



請為這篇文章評分?