Re: [Illume Magazine] GeoCoder URL Query
Hi,
So you are trying to retrieve a list of records near the current record. Is that right? If so, you can try a modification of the searching code.
for example (NOTE: this code is untested):
// get geocoding data
list($myLat, $myLng) = geocodeAddress( $record['address'] );
$kmOrMiles = 'miles'; // can be 'miles' or 'km'
$geoOptions = geocoder_getOptions($myLat, $myLng, "100", $kmOrMiles);
// get records
list($addressRecords, $addressMetaData) = getRecords(array(
'tableName' => $GLOBALS['GEOCODER_SAMPLE_TABLENAME'],
'where' => "num != '".intval($record['num'])."'",
) + $geoOptions); // geoOptions WILL NOT override the above options
In this example, we start by geocoding the current record ($record) and setting a radius of 100 miles.
Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com
Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/