From 76e5547a5f605eeb66821edecbf8d0688d5b7fad Mon Sep 17 00:00:00 2001 From: kayakyakr <kayakyakr@gmail.com> Date: Wed, 10 Sep 2014 18:38:50 -0500 Subject: [PATCH] Update so opencagedata will return coordinates. In the current opencagedata api, latitude and longitude are stored under geometry: {lat: ..., lng: ...} --- lib/geocoder/results/opencagedata.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/geocoder/results/opencagedata.rb b/lib/geocoder/results/opencagedata.rb index 1dcf9582..7011a3ed 100644 --- a/lib/geocoder/results/opencagedata.rb +++ b/lib/geocoder/results/opencagedata.rb @@ -64,7 +64,7 @@ module Geocoder::Result end def coordinates - [@data['lat'].to_f, @data['lon'].to_f] + [@data['geometry']['lat'].to_f, @data['geometry']['lng'].to_f] end def self.response_attributes %w[boundingbox license -- GitLab