Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a view set up in which I have an exposed filter which allows users to enter a zipcode and distance and the results are displayed and sorted by proximity. The filter is working correctly and the sort feature is working correctly, however, I also have the field proximity,distance displayed and it is not showing results. If I set the proximity field to use a static location, it works fine, but if I select the 'Use Distance / Proximity filter', nothing is displayed. Any ideas as to what I am doing wrong or is this a known issue?
Thanks!
Comment | File | Size | Author |
---|---|---|---|
#16 | screenshot-2.JPG | 29.17 KB | gauravsinghpanwar |
#16 | screenshot-1.JPG | 60.85 KB | gauravsinghpanwar |
#11 | distance.png | 3.41 KB | selva8187 |
#11 | gmap.png | 725.28 KB | selva8187 |
Comments
Comment #1
Dreher CreditAttribution: Dreher commentedTitle fix
Comment #2
Dreher CreditAttribution: Dreher commentedJust noticed, this is only an issue if the fixme long and lat are blank.
Comment #3
Dreher CreditAttribution: Dreher commentedAnother problem that I cannot seem to figure out: I have multiple locations for one of my nodes. It is a bike trail and has a start and end point. The filter seems to only use the furthest location, not the closest. Is there a way I can tweak this to use the closest location to the entered zipcode?
Comment #4
dawehnerIts important to read http://drupal.org/node/571990
In the first lines:
Comment #5
Dreher CreditAttribution: Dreher commentedCan anyone help me with this?
Comment #6
YesCT CreditAttribution: YesCT commentedPlease check to see if this is still a problem in the new release. If it is, reply with a new summary and set the status back to active.
Comment #7
lindsayo CreditAttribution: lindsayo commentedI'm using 6.x-3.1 and am having the same problem. If I expose the Distance / Proximity filter to the user, I can't get the Distance / Proximity field to print any data about its distance. It needs to say how far it is from the zip code entered into the exposed field.
I am using the CCK Location fields, rather than Node Location.
Comment #8
lindsayo CreditAttribution: lindsayo commentedI re-created the View as a Node type View, instead of a Location type View, and now it works perfectly.
Comment #9
rooby CreditAttribution: rooby commentedIf you are still seeing this problem can you please post an export of your view?
Just paste it into a txt file and attach it.
Comment #10
JKingsnorth CreditAttribution: JKingsnorth commentedNo response for a long time. If anyone is still experiencing this problem then please reopen the issue against the latest version with step by step instructions of how to produce the error.
Comment #11
selva8187 CreditAttribution: selva8187 commentedHi Guys,
Issue not fixed
I am have same issue all are working fine. Its give correct result in my functionality nearest location filter. But issue is showing distance differ from google map.
For Example
1. Gmap showing 20.3km for this location(Torino,Italy to Via Giaveno 22,Frazione Gerbole, 10040 Rivalta Di Torino Fraz. Gerbole Torino )
2. In my views showing only 15km. i am using Location: Distance / Proximity Origin i choose Use PHP code to determine latitude/longitude
if(!empty($_REQUEST['long']) && !empty( $_REQUEST['lat']))
return array('longitude' => $_REQUEST['long'], 'latitude' => $_REQUEST['lat']);
else
return array('longitude' => variable_get('default_longitude'), 'latitude' => variable_get('default_latitude'));
I attached screenshot for reference
Comment #12
selva8187 CreditAttribution: selva8187 commentedComment #13
gauravsinghpanwar CreditAttribution: gauravsinghpanwar commentedHi I am facing the same issue that the Gmap is showing different kms then that of what location module is showing. Even i have updated the Location module to the beta or development version (7.x-3.x-dev) but the issue persist on these updated modules also.
I am using Location: Distance / Proximity Origin i choose Postal Code (assume default country)
Did any one figure it out any solution for the existing Location Module ? Please guide.
Comment #14
rooby CreditAttribution: rooby commented@selva8187:
The image of google maps that you are showing is stating the difference between two points via specific roads.
That is different from what this module is doing when it gives a distance between two points. With this module it is calculating the direct distance, not the distance by road. This module doesn't have the required data to give distance by road.
Note: The needs review status is for patches that need review. See the docs on the status options for more information.
Comment #15
rooby CreditAttribution: rooby commentedAs mentioned in previous comments, if you can provide an export of a simple (as simple as possible anyway) view that demonstrates the problem it will be easier to investigate.
Just paste the view export into a txt file and upload that here.
Comment #16
gauravsinghpanwar CreditAttribution: gauravsinghpanwar as a volunteer commentedOne more thing I figure out that the location zipcodes sql in the database is having some latitude longitude differences as compare to google maps.
For example in google maps the latitude longitude of the zip code 89138 is 36.1710616, -115.3689105 (attach screenshot 1) whereas in location module zip code database the latitude and longitude of the zip code 89138 is 35.927901, -114.972061. (attach screenshot 2)
Secondly the latitude longitudes of google maps are of 7 decimal digits whereas in our zipcodes sql it is of 6 decimal digits.
When i manually updated the latitude and longitude of the particular zip code in the location module it shows the correct fly miles. Otherwise it showed me the wrong distance from the distance proximity. I have checked all the latest versions of the location module (including the dev version too) and they have the same old sql with wrong lat long.
Can anybody provide me the corrected zipcodes.us.mysql file as per the google latitude longitude ? so that i will update my zipcodes table in database to over come such type of issues.