Closed (won't fix)
Project:
Location
Version:
6.x-3.x-dev
Component:
Location_views
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
26 May 2009 at 14:43 UTC
Updated:
29 Mar 2016 at 14:58 UTC
Jump to comment: Most recent
Comments
Comment #1
juicytoo commentedThe query should be something like this
>>>>>
$query = "SELECT i.itemid, i.title, lng.data_txt as lng, lat.data_txt as lat, ";
// Haversine formula
$query .= "( %s * acos( cos( radians(%s) ) * cos( radians( lat.data_txt) ) * cos( radians( lng.data_txt) - radians(%s) ) + sin( radians(%s) ) * sin( radians( lat.data_txt) ) ) ) as distance ";
$query .= "FROM db_item as i, db_fields_data as lat, db_fields_data as lng ";
$query .= "WHERE lng.itemid=i.itemid and lat.itemid=i.itemid and ";
// Change these numbers to your fieldid's
// Fieldid 13 is the longitude field
// Fieldid 12 is the latitude field
$query .= "lng.fieldid=16 and lat.fieldid=15 ";
if ($radius!="")
{
// if theres a radius, then limit the results
$query .= "HAVING distance <= " . $radius . " ";
}
$query .= "ORDER BY distance ";
$query .= "LIMIT 20 ";
>>>>>>
Comment #2
rc2020 commentedNote, I have offered a $100 bounty on this thread (similar issue) http://drupal.org/node/357295
Comment #3
ankur commentedI believe this was added in another ticket last year.
Comment #4
drupalina commentedI'd offer an additional $50 USD bountry for 7x.
1) location field in proximity search must have an autocomplete
2) end-users can currently enter either City or Postcode, but (optionally) it would be nice if they could also enter the areas within the City, Province names etc.
Comment #5
dom. commentedHi !
I have made a patch that sound like what you would need:
#2696207: Add an address autocomplete for View proximity filter.
If the bounty is still available I would be happy with :p !!