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!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dreher’s picture

Title: Proximty/Distance not displaying correctly » Proximity/Distance not displaying correctly

Title fix

Dreher’s picture

Just noticed, this is only an issue if the fixme long and lat are blank.

Dreher’s picture

Another 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?

dawehner’s picture

Project: Views (for Drupal 7) » Location
Version: 6.x-2.8 » 6.x-3.x-dev

Its important to read http://drupal.org/node/571990

In the first lines:

Views provides the ability to list data - if your data is provided by a module other than Drupal Core, please enter your issue in that module's issue queue instead.

Dreher’s picture

Can anyone help me with this?

YesCT’s picture

Status: Active » Postponed (maintainer needs more info)

Please 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.

lindsayo’s picture

Version: 6.x-3.x-dev » 6.x-3.1

I'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.

lindsayo’s picture

I re-created the View as a Node type View, instead of a Location type View, and now it works perfectly.

rooby’s picture

If 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.

JKingsnorth’s picture

Issue summary: View changes
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No 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.

selva8187’s picture

Version: 6.x-3.1 » 7.x-3.7
Status: Closed (cannot reproduce) » Needs review
FileSize
725.28 KB
3.41 KB

Hi 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

selva8187’s picture

Priority: Normal » Major
gauravsinghpanwar’s picture

Hi 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.

rooby’s picture

Status: Needs review » Active

@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.

rooby’s picture

Status: Active » Postponed (maintainer needs more info)

As 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.

gauravsinghpanwar’s picture

FileSize
60.85 KB
29.17 KB

One 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.