distance search best practise ? and how to call from hook
Hello Low,
I would like to ask abou the distance search
we are using Google Maps fieldtype
https://devot-ee.com/add-ons/maps
the addon stores the location data in one field in (channel_data) table.
in format like this
[24.633285504899323|46.681300203704836|17|24.633285504899323|46.681300203704836];
The Question is :
Do I need to create 2 separated fields to get the advantage of distance search with low search addon? and What is the most compatible map fieldtype that can fit with low search?
------------------------------------------------
Second question:
we are developing an extension and we would like to make some Depending on low search (distance).
what is the best practise and what the proper code to do it.
thanks for you help in advance .
License Key is has been sent to hi email
Replies
Low 12 Feb 2015 09:47
1. Either one field with this format: "lat,long", or 2 separate fields with lat and long values. There are quite a few maps add-ons, not sure which ones use that format. Better ask their developers.
2. Can't really advise you how to build extensions. You could take a look at the screencast I did, or check out the LS docs, or maybe even EE's docs on development themselves.
Using the LS hooks won't give you direct access to the distances, tho. But depending on what you need to do, you might be able to work around it. However, that falls outside the scope of LS support, to be honest.