Skip Navigation

[Resolved] Show nearest location with 1 result

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to show just the nearest result to a location in a Maps View?

Solution:
It is currently not possible. We have a feature request to order the results by distance that would enable this (by limiting the results to 1), but it is not implemented yet.

This support ticket is created 6 years, 7 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 7:00 – 14:00 -
- 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 15:00 – 16:00 -

Supporter timezone: Europe/London (GMT+00:00)

This topic contains 1 reply, has 2 voices.

Last updated by Nigel 6 years, 7 months ago.

Assisted by: Nigel.

Author
Posts
#777494

Tell us what you are trying to do?
I want the user to input a address or use his gps location to find the nearest marker to that location. So a single result.

Is there a similar example that we can see?
Much like the apple store locator: hidden link

I think this can be solved by increasing the search radius until a marker is found, but I do not know if toolset if capable of that.

#778257

Nigel
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/London (GMT+00:00)

Hi Erwin

I'm sorry to say that it's just not possible at the moment.

We have a feature request for maps to be able to order posts by distance which would allow you to create a View of posts ordered by smallest distance with a limit setting of 1 to return just the nearest post, but it is not yet implemented.

As you are probably aware we are approaching the end of a major development cycle and will shortly have developer resources available to work on new features. We are currently identifying priorities and I will be sure to add your vote for this feature (which has a related feature request of being able to display the calculated distance of posts from the starting point).

It will also soon be possible to submit and vote upon a public list of feature requests, so keep an eye out for a blog post about that.

Sorry I can't be more helpful.