
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
A Ruby gem for interacting with the Ola Maps API, providing a simple interface for location-based services like autocomplete, geocoding, and reverse geocoding.
Add this line to your application's Gemfile:
gem 'ola_maps'
Then, execute:
$ bundle install
If bundler is not being used to manage dependencies, install the gem by executing:
$ gem install 'ola_maps'
Before using the gem, set up your environment variables in a .env file:
API_KEY=your_api_key
CLIENT_ID=your_client_id
CLIENT_SECRET=your_client_secret
Here's how to use the OlaMaps
gem:
require 'dotenv/load'
require 'ola_maps'
client = OlaMaps::Client.new(
api_key: ENV['API_KEY']
)
# Autocomplete
autocomplete_response = client.autocomplete('kempe')
puts autocomplete_response.body
# Geocode
geocode_response = client.geocode('Bangalore')
puts geocode_response.body
# Reverse Geocode
reverse_geocode_response = client.reverse_geocode('12.931316595874005,77.61649243443775')
puts reverse_geocode_response.body
#autocomplete(input, origin: nil, location: nil, radius: nil, strictbounds: nil)
Returns autocomplete suggestions based on the input string.
input
: The input string for autocomplete.origin
: (Optional) The origin location.location
: (Optional) The location to bias the results.radius
: (Optional) The radius within which to return results.strictbounds
: (Optional) If true, restrict results to the specified area.#geocode(address, bounds: nil, language: 'English')
Returns geocoded address information.
address
: The address to geocode.bounds
: (Optional) The bounds within which to search.language
: (Optional) The language for the response (default is 'English').#reverse_geocode(latlng)
Returns reverse geocoded address information for a given latitude and longitude.
latlng
: The latitude and longitude in the format lat,lng
.To run the tests for this gem, ensure you have the required environment variables set in your .env file, then execute:
bundle exec rspec
git checkout -b feature/YourFeature
)git commit -m 'Add some feature'
)git push origin feature/YourFeature
)Bug reports and pull requests are welcome on GitHub at ola_maps. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the code of conduct.
This gem is available as open-source under the terms of the MIT License.
Feel free to modify sections like the installation instructions or API method descriptions to match your specific implementation details.
Everyone interacting in the OlaMaps project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.
FAQs
Unknown package
We found that ola_maps 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
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.