Skip to content

Commit

Permalink
Adapt to Geocoder API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
vouillon committed Dec 2, 2016
1 parent 84cfec7 commit c3eb8ec
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions geoloc.ml
Original file line number Diff line number Diff line change
Expand Up @@ -240,8 +240,8 @@ let geocoder () = Geocoder.new_geocoder ()
let address_of_latlng latlng =
let at, au = Lwt.wait () in
let callback' result_l (status:geocoder_status) =
match status with
| Ok ->
match status, result_l with
| Ok, Some result_l ->
let addr_list =
List.map GeocoderResult.formatted_address result_l in
Lwt.wakeup au (addr_list)
Expand All @@ -259,8 +259,8 @@ let address_of_coords (lat,lng) =
let latlng_of_address addr =
let at, au = Lwt.wait () in
let callback' result_l (status:geocoder_status) =
match status with
| Ok ->
match status, result_l with
| Ok, Some result_l ->
if List.length result_l = 0
then Lwt.wakeup au None
else
Expand Down

0 comments on commit c3eb8ec

Please sign in to comment.