-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Distance not appearing #28
Comments
I know it's been a couple weeks since you posted this, but just had a chance to fix this. Download the latest build in the master branch and this should be fixed now. |
How strange, I was literally just looking at this again as you replied. I'm getting this lot http://lnsdev.pepperdigital.com/results/?q=evesham%2C+wr11 - all I did was to upload the folder over the top of the old folder, would it be preferable to reinstall it? |
Ah, right this is my mistake. So previously the distances getting prefixed with your map's handle, ie map_distance. I really didn't like this behavior but I forgot to button up the changes. You can use "distance" for now, that will work. I am going to add a new option so you that you can define this value, and will default to "distance". Kinda complicated as to why this has to be this way, but it's necessary. I will get this fixed. |
Got it, that appears to be working fine now - cheers Justin. |
Hi - I understood the above to say that we could use "distance." When I do, I get an internal server error: "CDbCommand failed to execute the SQL statement: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'distance' in 'order clause'"
I am using 0.8.3. Any thoughts on why it's not working? Than you in advance. |
Did you download the latest master branch? I am in the process of updating this a bit but this should work with the code in the master branch. |
Yes, I did. Andy was also nice enough to share his copy, so I tried it just in case it was different. Both resulted in the same distance error. It's working on his end, but not mine, so I'm not sure how to isolate what the problem is. Andy and I are using the exact same template code, so we know that's not the issue. Very puzzling. I've tried uninstalling and reinstalling. I should probably test this on a fresh install. Running Craft Pro 2.3.2636 w/ Google Maps for Craft 0.8.3 (only plugin installed) |
Do you get this error when you visit the template url with a ?q=Some+Location added to the URL? |
I was able to duplicate this locally, but only when the 'q' variable did not exist. Currently, it's up to you to implement logic in your template to check to see if that variable exists, and if so use it to calculate the distance. I am open to suggestions on how to improve this to make it more automated, but I am almost certain that is causing the issue. |
This worked for me: |
Hi there - I'm working on a "Find your nearest store" and for some reason it isn't returning distances. You can see a working example at http://lnsdev.pepperdigital.com/results/?q=evesham. The code I'm using is below (based on your example at https://github.com/objectivehtml/Google-Maps-for-Craft/wiki/Search-by-Proximity):
The text was updated successfully, but these errors were encountered: