package opencage

  1. Overview
  2. Docs
OCaml bindings for the OpenCage Geocoding API

Install

dune-project
 Dependency

Authors

Maintainers

Sources

1.0.5.tar.gz
md5=9c6f22f22693ec77df2df042ae4a3ca8
sha512=75153a4d8d3d976684e131a4e55c022bed999807f6a0a141ef23701aa5398edea02eb31b7506a2f3261eb4a4d1f0d09dba06f95379680e8deae5cfa2f3f0559e

doc/opencage/Opencage/index.html

Module OpencageSource

Sourcetype 'a response = ('a, [ `Msg of string ]) result
Sourceval geocode : ?params:(string * string) list -> string -> Yojson.Safe.t response Lwt.t

geocode ~params query Forward geocodes the given query string.

  • parameter params

    A list of optional parameters to pass to the API.

  • parameter query

    The query to geocode.

  • returns

    A Lwt promise that resolves to a result containing either the JSON response or an error message.

Sourceval reverse_geocode : ?params:(string * string) list -> float -> float -> Yojson.Safe.t response Lwt.t

reverse_geocode ~params lat lon Reverse geocodes the given latitude and longitude.

  • parameter params

    A list of optional parameters to pass to the API.

  • parameter lat

    The latitude.

  • parameter lon

    The longitude.

  • returns

    A Lwt promise that resolves to a result containing either the JSON response or an error message.