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
0
votes
1 answer

Find neighbouring polygons in Ruby

I have a Rails app and a bunch of points and polygons in a model I am using mysql > 5.6 and the Geokit gem to generate polygon objects and I'm wondering if it's possible to find neighbouring polygons - That is, polygons that touch the polygon I'm…
lsaffie
  • 1,764
  • 1
  • 17
  • 22
0
votes
1 answer

Rails GeoKit to Exclude a Result Based on ID

I have the following Code @venue = Venue.friendly.find(params[:id]) @venues_nearby = Venue.within(100, :origin => [@venue.lat, @venue.lng]).where(:id != @venue.id) I want to exclude the Record @venue.id Is there any way to chain the same with the…
Harsha M V
  • 54,075
  • 125
  • 354
  • 529
0
votes
1 answer

Rails & Geokit - config: Undefined method api_key= for Geokit::Geocoders::GoogleGeocoder:Class (NoMethodError)

I've set up geokit and geokit-rails and for the most part everything is working. I'm now hitting some 'too many queries' issues during development and I suspect the culprit may be not providing an api_key to the Google Geocoder API. I set up a…
justinraczak
  • 776
  • 2
  • 9
  • 24
0
votes
1 answer

Filtering with geokit rails - dosent show any data

I am building an API for a webbapp using Ruby On Rails, i am using Jbuilder for API/JSON and Geokit. I have this models: Campaign class Campaign < ActiveRecord::Base belongs_to :company belongs_to :venue belongs_to :category …
user592638
0
votes
1 answer

Geokit-Rails: polymorphic location query

Location has :lat and :lng for use with 'geokit-rails' I'm running Rails 4. Is it possible to do a query for distinct Collections that have Tracks in a specified Location range? class Location < ActiveRecord::Base belongs_to :locatable,…
0
votes
0 answers

Geokit: undefined method `key?' for nil:NilClass

I have installed the following gems: geokit (1.8.4) geokit-rails (2.0.1) Model that I want to map: class Merchant < ActiveRecord::Base attr_accessible :name, :geolat, :geolon, :lat, :lng acts_as_mappable :default_units => :miles, …
Lut
  • 1,363
  • 1
  • 14
  • 30
0
votes
2 answers

Rails geokit caching

How would you cache GeoKit requests? This does not work for me... Geokit::Geocoders::query_cache = true Geokit::Geocoders::query_cache_max_age = 86400 # 1 day in seconds URL: http://github.com/seebq/geokit-gem
xpepermint
  • 35,055
  • 30
  • 109
  • 163
0
votes
1 answer

Rails Geokit Too Many Queries Error

I was trying to do a little app to test the gem "geokit", "~> 1.8.4" It was working at the beginning but then started raising this error Geokit::Geocoders::TooManyQueriesError at most I did 100 queries with this line of code suggested_bounds =…
agusgambina
  • 6,229
  • 14
  • 54
  • 94
0
votes
2 answers

Change "limit" clause in Geokit's "closest" scope

it sounds like not difficult at all but after looking for a while I can't find a way to change the limit of the closest scope in Geokit-rails. I've tried to overide the definition of this method which is defined according to the documentation as: …
l_gerard
  • 73
  • 5
0
votes
2 answers

How to get real ip address from user client when visit my website using rails in development mode

i want to get real ip address from user client when visit my website using rails in development mode? but when i typing request.remote_ip, i get ip address 127.0.0.1?? how to get real ip address??? and when i try curl -H"X-Forwarded-For: 8.8.8.8"…
tardjo
  • 1,594
  • 5
  • 22
  • 38
0
votes
1 answer

Setup to get city by IP number with Geokit

I have a Rails 4 app deployed on Heroku. I have a method that decode an ip number to it´s city equivalent. From what I've understood there are a bunch of pitfalls when geocoding, i.e. reaching request limit on shared ip, unupdated geocode providers…
Fellow Stranger
  • 32,129
  • 35
  • 168
  • 232
0
votes
1 answer

Rails 2.3.4 Geokit error?

I have a rails application. Rails version is 2.3.4 and ruby version 1.8.7. In that application I used geokit (1.5.0) gem and geokit-rails plugin to find nearest location. And in my model I have code like this, class Notary <…
Rajendran_R
  • 129
  • 8
0
votes
1 answer

Geokit error - "uninitialized constant"

I followed the install steps to the letter to get Geokit working on my site. I can do a distance calculation just fine, but when I try to render a Google map using: @map = GMap.new("map") It throws me this error: NameError in…
Kevin
  • 1,100
  • 1
  • 11
  • 26
0
votes
1 answer

Multiple Markers on Google Map (Fails to display over 10 markers) - Ruby on Rails Environment YM4R Plugin

I have the following issue. I have a google map (using YM4r + Geokit) within Ruby on Rails, anyhow, i basically have an array of markers which are populated in the following manner @shops.each do |sto| markers << GMarker.new (....) end They…
Erika
  • 2,045
  • 7
  • 25
  • 31
0
votes
1 answer

undefined method `distance_betwwen' geokit-rails

i face a problem with geokit-rails plugin in rails 2.3.12. i've a simple model called place like this: class Place < ActiveRecord::Base
attr_accessible :lat, :long, :name
:acts_as_mappable end and in my…
Awlad Liton
  • 9,366
  • 2
  • 27
  • 53
1 2 3
9
10