--- In oodleapi@yahoogroups.com, "allw521" <kerampran@...> wrote:
> Using the distance and zip filter within the get query
> only works with US zip codes but not with UK postcodes.
>
> There must be a way as the OOdle website actually works fine with UK
> postcodes. (it is possible to search for classifieds within x miles
> from CO1 (UK postcode)
>
> This is what I want to do:
> $filters['filters'][] = array('type'=>'distance','params'=>array
> ('value'=>50,'units'=>'mi','zip'=>'CO1'));
You're on the right track! For UK distance filters, add
"country_code" to your distance filter with the value of "GBR".
Like this:
$filters['filters'][] = array(
'type' => 'distance',
'params' => array(
'value' => 50,
'units' => 'mi',
'zip' => 'CO1',
'country_code' => 'GBR'
)
);
-Steve Baker
Oodle Engineering