From: Xin Zheng Date: 2008-01-03T23:57:42+09:00 Subject: Re: spatial search & search radius circumference with Geokit Bill Eisenhauer wrote: > What would the API be? > Hi Bill, Thanks for the quick reply. It's fantastic you guys are so responsive. The API could be: data_with_location, radius_points = MappableModel.find(:all, :origin => [lat, lng], :within => distance, :return_radius_points => true) I think it will be good having an option in the find method. I am not sure how the radius points should be returned, as returning it to two vars is unconventional. radius_points = [[lat,lng],[lat,lng],...] FYI. I am using KML with Google Maps. KML wants the coordinates like this: -112.3372510731295,36.14888505105317,1784 -112.3356128688403,36.14781540589019,1784 -112.3368169371048,36.14658677734382,1784 -112.3384408457543,36.14762778914076,1784 -112.3372510731295,36.14888505105317,1784 Perhaps radius_points can be an object with helper method to_kml: radius_points.to_kml What do you think? -- Posted via http://www.ruby-forum.com/.