opencagedata / ruby-opencage-geocoder Goto Github PK
View Code? Open in Web Editor NEWRuby client for the OpenCage geocoding API
Home Page: https://opencagedata.com/tutorials/geocode-in-ruby
License: MIT License
Ruby client for the OpenCage geocoding API
Home Page: https://opencagedata.com/tutorials/geocode-in-ruby
License: MIT License
The current version on rubygems is 1.1.0, if you follow the instructions on the README you won't be able to use it, unless you specify the github repository on the Gemfile.
I would like to request adding alias' to OpenCage::Geocoder::Location.lat
and OpenCage::Geocoder::Location.lng
to be OpenCage::Geocoder::Location.latitude
and OpenCage::Geocoder::Location.longitude
.
def lat
@result['geometry']['lat'].to_f
end
+ alias latitude lat
def lng
@result['geometry']['lng'].to_f
end
+ alias longitude lng
I can open a PR, but the guide said to open an issue first.
Run into this issue while try to test the gem and the service in a couple of projects:
~/open-cage-test/vendor/ruby/2.1.0/gems/opencage-geocoder-0.1.0/lib/opencage/geocoder.rb:1:in `require_relative': cannot load such file -- ~/open-cage-test/vendor/ruby/2.1.0/gems/opencage-geocoder-0.1.0/lib/opencage/geocoder/location (LoadError)
from ~/open-cage-test/vendor/ruby/2.1.0/gems/opencage-geocoder-0.1.0/lib/opencage/geocoder.rb:1:in `<top (required)>'
from hi.rb:2:in `require'
from hi.rb:2:in `<main>'
I followed the usage instructions from the readme. I had gem 'opencage-geocoder'
in the Gemfile
&& i require it like this require 'opencage/geocoder'
I also found out that if you tell bundle to install the gem with the :github
, :path
option the gem works correctly and you don't run into this problem.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.