Questions tagged [geokit]

A Ruby on Rails gem that provides geocoding and distance calculations.

Geokit is a Rails gem that provides geocoding and distance calculations.

It provides various geocoding and geolocation options, including:

  • Distance calculations between two geographical points
  • Check whether a certain point is within certain rectangular bounds
  • Support of multiple geocoding data providers - Google, Yahoo and others
141 questions
12
votes
7 answers

Change value of request.remote_ip in Ruby on Rails

For test purposes I want to change the return value of request.remote_ip. While being on my development machine it returns always 127.0.0.1 as it should but I would like to give myself different fake IPs to test the correct behavior of my app…
Matt
  • 1,143
  • 1
  • 11
  • 19
8
votes
1 answer

using geokit or other ruby gem to calculate the center of a series of geo coordinates

I've been using the geokit and geokit-rails gem for rails for awhile but one question I haven't found answered is how to find the calculated aggregate center for a collection of points. I know how to calculate the distance between two points, but…
holden
  • 13,471
  • 22
  • 98
  • 160
4
votes
1 answer

Geokit helper usage

I'm trying to localize my users throught their IP address. As the docs say, a class method called geocode_ip_address has been mixed into the ActionController::Base. But there must be something I'm missing. Do I have to define a filter like this…
Alex Epelde
  • 1,679
  • 1
  • 15
  • 16
4
votes
2 answers

Using rails gem geokit sort by distance and pagination?

I come across a small issue in my app. I'm currently using geokit to find objects near a given location, and I use the sort_by_distance_from on the found set. See below: @find = Item.find(:all, :origin…
Nick Faraday
  • 598
  • 5
  • 23
4
votes
6 answers

Geokit and rails 3

I am using the geokit gem and plugin with rails 3. It seems there is a known issue with them, which can be seen here http://github.com/andre/geokit-rails/issues#issue/15 Now, I tried to follow the solution provided at the bottom. I pasted that…
Amit
  • 3,952
  • 7
  • 46
  • 80
4
votes
1 answer

Geokit Rails distance and find(:all)

I have 2 questions regarding the gem 'geokit-rails' This is my sample code class Outlet < ActiveRecord::Base acts_as_mappable :lat_column_name => :address_latitude, :lng_column_name => :address_longitude, …
kilua
  • 711
  • 1
  • 9
  • 16
4
votes
2 answers

How do I obtain a geonames API key

My apologies for the basic question, I am just starting to use Geonames. The Ruby geokit gem contains the following instruction for using Geonames: # To use this service either free or premium, you must register a key. # See…
manngs
  • 41
  • 1
  • 3
4
votes
2 answers

Geokit undefined method `acts_as_mappable' rails

I used the geokit-rails gem in my web application on my local machine i followed the steps from their github repo and it worked flawlessly on my local machine but once i deployed my app on openshift remote server. it doesn't seem to work. the…
4
votes
1 answer

Geokit issue - "could not find generator"

I am trying to get started with Geokit, and I ran the install command and was greeted with the following: rails g geokit_rails:install Could not find generator geokit_rails:install. Any idea what's going on? I am so confused. bundle install works…
Ringo Blancke
  • 2,444
  • 6
  • 30
  • 54
4
votes
2 answers

Rails: Converting from MySQL to PostGres breaks Geokit Distance Calculations?

I recently switched my database from MySQL to PostGres. I also use GeoKit. When I started my app up with the new database already seeded, I get the following error: PGError: ERROR: function radians(character varying) does not exist LINE 1:…
Kevin
  • 1,100
  • 1
  • 11
  • 26
4
votes
2 answers

Geokit Rails - find all users who contain a point(location) in their range

Trying to understand how can I use Geokit Rails to get all users who covers a certain point with their coverage range. For example users A, B, C and D has a radius of i > 0 km. Now let's say I want to find all users who cover a selected point on map…
rmagnum2002
  • 11,341
  • 8
  • 49
  • 86
4
votes
1 answer

Is mysql using my index or not, and can the performance of geokit be improved?

I'm using geokit (acts_as_mappable) in a rails application, and the performance of radial or bounds searches degrades considerably when there is a large number of models (I've tried with 1-2million but the problem no doubt kicks in earlier than…
frankodwyer
  • 13,948
  • 9
  • 50
  • 70
3
votes
1 answer

rails geokit - get travel/commute time

Is there a way to use geokit in rails to get the estimated travel time between two locations? Right now, I'm simply showing the distance away but I think a better approach would be to show '15 minutes away' -- gives it a more practical approach to…
stewart715
  • 5,557
  • 11
  • 47
  • 80
3
votes
2 answers

Using Rails 3 with Geokit-rails3 location gem

I am trying to use the geokit-rails3 gem for geolocation information in a rails application. I have a simple model: class Location < ActiveRecord::Base def lookup_ip_information(post_ip) ip = post_ip location = IpGeocoder.geocode(ip) …
Wesley Tansey
  • 4,555
  • 10
  • 42
  • 69
3
votes
1 answer

Learning geokit-rails3

I'm searching for complete explanations about how to use geokit-rails3. I've found loads for rails2 but not for rails3. Does any of you have a simple and complete tutorial about how to display a google map on Rails3, from A to Z ? Thanks a lot for…
Fabien Lebas
  • 503
  • 7
  • 19
1
2 3
9 10