Proximity search?

This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 7 years, 9 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #9134
    nazar
    nazar
    Participant

    Is it possible to build a proximity search with either a Slider or Range slider?
    I have lat/long and even zip code as custom fields attached to my CPTs.

    #9169
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I would suggest the Range slider for this purpuse. It uses the “BETWEEN” operator on database level – but it still does not exceeds the selected range, it is strict. So if the range is 1 – 10 and the user selects 2 and 5, then values between 2 and 5 are considered as match – there is no additional boundary.

    I would probably make one range slider for the latitude, other for the longitude, but both latitude and longitude must be a separate custom field as a numeric value (no spaces, no other extra characters) – otherwise it will be recognized as a string by the MySql database.

    Best,
    Ernest Marcinko

    If you like my products, don't forget to rate them on codecanyon :)


Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.