Comments (5)
Damnit! "Note, when you want to sort by the proximity you must use the following format yourMapField_distance. When the query is built, the field name is prepended to the distance column."
Too late a night writing code. Nvm me.
from google-maps-for-craft.
Well, "Column not found: 1054 Unknown column 'googleMapField_distance' in 'order clause". What am I doing wrong then? I prepended and no dice...
{% set entries = craft.entries.section('storeLocations').level(2).map(params).order('googleMapField_distance asc') %}
googleMapField is the handle for the Google Map I added to the Store Location fields which go in the Store Locations section. I'm stumped. Its late.
from google-maps-for-craft.
I'm getting the same error - any updates here?
Column not found: 1054 Unknown column 'distance' in 'order clause'.
Also doesn't work if I append my googleMap field to distance ::
Column not found: 1054 Unknown column 'googleMap_distance' in 'order clause'.
from google-maps-for-craft.
I have found a fix for distance. Hopefully this helps someone down the road. I originally used zip codes in comparison and was unable to get distance to work. Even after attempting to use street addresses and cities I was still unsuccessful. However, when I used lat/lng for both addresses it worked like a charm.
I used the geocode function to get the lat/lng from zipcodes and then did the proximity example to get the distance associated between two endpoints.
from google-maps-for-craft.
Sorry for the lack of replies guy. Was off work most of last year due to some serious health and personal issues. I'll try to address the problems here in case people are still wondering or having issues.
First off, I changed some code in the last major release and didn't update the wiki so that's likely causing confusing. Now, distance
is the default value that is used, and there is a parameter to override. No more should you use the mapField_distance
value. This format is obsolete at this point.
Here is another thread where I posted some additional remarks and possible fixes. Im going to close this thread, but if anyone else has any questions related to this issue please feel free to post them here.
from google-maps-for-craft.
Related Issues (20)
- Error when Google maps can't find the location HOT 2
- Folder Name HOT 2
- Polgyon Color Options HOT 2
- Force search within specific country HOT 1
- Create map from front-end form HOT 10
- Address Fields doesn't work if the field is of type Address HOT 2
- Geocoder seems to run each time, despite saved locations HOT 1
- Required setting not working for map field HOT 2
- Customising Styling for Routes / Polylines
- Search: show nearest entry on map HOT 1
- Remove googlemaps isSecure because it is not necessary
- Info Window on a PolyLine HOT 1
- Test for No Results HOT 1
- Bug on Route and setting map ID
- API Key HOT 1
- Centering map and setting marker with dynamic fields
- Insecure file transfer on reverse proxy server because protocol is being set incorrectly
- GoogleMaps_TemplatesService.php data function looks to be broken
- This project dead? HOT 4
- Adding Marker
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-maps-for-craft.