Gist 186528
✓ Published0🌍 Public
DDylanFM
Last edited Sep 14, 2009
Created on Sep 14, 2009
This example shows a geospatial search for golf courses near a specific postcode in New South Wales, Australia. The visualization maps the query’s results by displaying course locations as points, with the postcode’s coordinates as a central reference. It uses the GeoKit Rails plugin, invoked via `Postcode.find_by_postcode` and `Course.find(:all, :origin => [postcode.lat, postcode.lng], :within => 20)`, to filter courses within a 20-mile radius. The data comes from a database of course records, each with latitude, longitude, and review metrics, rendered as a simple point-based map. The code does not use d3 or Three.js; it relies on ActiveRecord and GeoKit for spatial queries.
AI-generated description