![require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages](https://cdn.sanity.io/images/cgdhsj6q/production/be8ab80c8efa5907bc341c6fefe9aa20d239d890-1600x1097.png?w=400&fit=max&auto=format)
Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Ruby wrapper for the Geocoding and Directions services provided from the Google Maps API.
Add this line to your application's Gemfile:
gem 'geogle'
And then execute:
$ bundle
Or install it yourself as:
$ gem install geogle
Google geocoding documentation: https://developers.google.com/maps/documentation/geocoding/
When creating the Geogle::Geocoder these are the setting parameters:
sensor:
language: ar, eu, bg, bn, ca, cs, da, de, el, en, en-AU, en-GB, es, eu, fa, fi, fil, fr, gl, gu, hi, hr, hu, id, it, iw, ja, kn, ko, lt, lv, ml, mr, nl, no, pl, pt, pt-BR, pt-PT, ro, ru, sk, sl, sr, sv, tl, ta, te, th, tr, uk, vi, zh-CN, zh-TW
raw:
client_id (required for business API): ID of the client. It starts with "gme-" prefix.
crypto_key (required for business API): Criptographic key.
Here's more information about Google Maps API for Business: https://developers.google.com/maps/documentation/business/webservices
Both methods return an array of Geogle::Model::Place. Each place is composed by:
Coordinates:
Area:
Geometry:
address:
client = Geogle::Geocoder.new({ sensor: false, language: "es" })
client.address("Blasco Ibañez, Valencia")
client = Geogle::Geocoder.new({ sensor: false, language: "es" })
components = { country: 'ES' }
client.address("Blasco Ibañez, Valencia", components)
Available components to be used can be found here: https://developers.google.com/maps/documentation/geocoding/#ComponentFiltering
Geogle::Geocoder.new.latlng(39.5073225, -0.2914778)
client = Geogle::Geocoder.new({ client_id: "gme-client-id", crypto_key: "crypto-key" })
client.latlng(39.5073225, -0.2914778)
The signature required to do the request will be appended in the URL.
Google directions documentation: https://developers.google.com/maps/documentation/directions/
The same as with Geocode.
true
returns more than one route.Return an array of Geogle::Model::Route. Each route is composed by:
Time:
TextValue:
Leg:
Route:
options = { region: "de", mode: "driving" }
client = Geogle::Directions.new
client.routes("Berlin", "Munich", options)
client = Geogle::Directions.new
client.routes("39.4699889,-0.3759178", "40.4167158,-3.7037799")
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that geogle demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.