Problem with the GeoKit plug

I’m currently using the GeoKit plugin for a Rails web application I’m
building, and I’m having a problem with the “find all locations within
a distance from this location” aspect of it.

I have a browse form, which takes a distance, and a zipcode, and
returns all locations that fit. However, it seems to only be returning
the first location for each zipcode it finds.

For example, I have 5 locations:

Loc1 - 02110

Loc2 - 02110

Loc3 - 02360

Loc4 - 02110

Loc5 - 02360

The search function only returns two results, Loc1 and Loc3. My search
function in the controller looks like this:

def search
if params[:zip]
@location = Location.find(:all, :origin =>
params[:zip], :within => params[:miles]
@location = @location.sort_by { |location| location.name }

I hit enter and cut my search function off.

def search
if params[:zip]
@location = Location.find(:all, :origin =>
params[:zip], :within => params[:miles]
@location = @location.sort_by { |location| location.name }
@pages, @location = paginate(@location)
end
end

Never Mind, I’m an idiot,

I forgot that the first 2/3 of my test data was inputting before I had
geomapping working correctly, so there wasn’t any lat/lng to test
against.

case closed!