ArcgisGeocode v0.1.0 ArcgisGeocode

Provides the ability to Geocode an Address using the ArcGIS World Geocoding Service REST API “find” operation.

Summary

Functions

Geocodes an Address and returns an ArcgisGeocode.GeocodeResult struct

Starts the application and the ArcgisGeocode.Cache Agent

Functions

geocode(address)

Specs

geocode(String.t) :: {:ok | :error, %ArcgisGeocode.GeocodeResult{city: term, error: term, formatted: term, lat: term, lon: term, state_abbr: term, state_name: term, street_name: term, street_number: term, street_type: term, zip_code: term}}

Geocodes an Address and returns an ArcgisGeocode.GeocodeResult struct.

Examples

iex>ArcgisGeocode.geocode("463 Mountain View Dr Colchester VT 05446")
  {:ok,
   %ArcgisGeocode.GeocodeResult{city: "Colchester", error: nil,
    formatted: "463 Mountain View Dr, Colchester, Vermont, 05446",
    lat: 44.51295958611712, lon: -73.18369692467252,
    state_abbr: "VT", state_name: "Vermont", street_name: "Mountain View",
    street_number: "463", street_type: "Dr", zip_code: "05446"}}
start(type, args)

Starts the application and the ArcgisGeocode.Cache Agent.

Note: Developers typically won’t be calling this function directly.