Closed webvader closed 8 years ago
Re-installed the plugin and re-saved the entries. now the SQL error is gone and search is working, but marker.distance is empty.
Nevermind got it working: I used location.map.markers
instead of location.map.markers()
... both work except the latter returns distance, the first one does not.
@objectivehtml is there any fixes in the works for this issue? I noticed there's a couple more open with the same issue.
Hi,
When i try to use the search on proximity I get an SQL error Column not found distance whatever i put in for the order e.g. MyFieldHandle_distance I still get Column not found ... Any idea how to fix this?
This is the code I use:
{% set query = craft.request.getParam('q') %}
{% if query is defined %}
{% set searchParams = { 'address': query, distance: 200 } %}
{% set foundLocations = craft.entries.section('locations').map(searchParams).order('googleMapField_distance asc') %}
{% else %}
{% set foundLocations = locations %}
{% endif %}