This was originally built to see if a community project qualified for a grant if it was within 2.5 miles of a listed recycling centre.

Frontend

The user enters a postcode and the system calculates the distance from that postcode to all the ones contained in the database; if the distance falls within the given miles a message is displayed that they meet this part of the criteria and the user can progress. If it falls outside the distance the user is informed that they do not qualify.

This is a sample installation using test data and an active radius of 2.5 miles.

Backend

The backend settings allow the site administrator to control the qualifying distance, default latitude, longitude and zoom level of the map. It also allows for the two Google API key to be saved together with instructions of how to generate the key.

The nearby sites can be imported from a CSV file or manually added. Editing is enabled for each site and there is a toggle to switch each one on or off allowing for temporary deactivation of a site.

Nearby Sites WordPress plugin edit screen

Technology

  • Google Maps
  • Bespoke database tables
  • Ajax