Bastes / elm-google-geocoding

Elm interface to the Google Geocoding API

Home Page:http://package.elm-lang.org/packages/labzero/elm-google-geocoding/latest

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

elm-google-geocoding

An Elm interface to the Google Geocoding API

This provides a pipeline friendly, builder-like API. It also provides Elm types for many of Google's JSON structures.

Basic usage:

import Geocoding
import Http
import Task

apiKey : String
apiKey = "your_google_api_key"

type Msg
  = MyGeocoderResult (Result Http.Error Geocoder.Response)

geocodeThis : String -> Cmd Msg
geocodeThis str =
  Geocoding.requestForAddress apiKey str
    |> Geocoding.send MyGeocoderResult    

Take a look at the tests for examples of building requests with other parameters

About

Elm interface to the Google Geocoding API

http://package.elm-lang.org/packages/labzero/elm-google-geocoding/latest

License:MIT License


Languages

Language:Elm 100.0%