Skip Navigation

[Resolved] Sort locations by distance between the searched location and the other locations

This support ticket is created 5 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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+01:00)

This topic contains 4 replies, has 3 voices.

Last updated by Mr. DJ 5 years, 6 months ago.

Assisted by: Nigel.

Author
Posts
#1099498
2018-09-04 12_47_08-Window.png

Tell us what you are trying to do?
Because the simplemap plug-in stopped working on our site we decided to rebuild this functionaliteit with the toolset maps plug-in. We got the most part working except the sorting of locations. When using the 'use my location' button the locations under the map are sorted correctly, but when we search a location like 'Rotterdam' first we get 'Ridderkerk' and then 'Rotterdam'.

What we would like to see?
When we search for a place the locations under the map needs te be sorted correctly based on the linear distance between the searched location and the other locations.

Example when we search for 'Rotterdam':
- Rotterdam
- Ridderkerk
- Vlaardingen
and so on.

Is there any documentation that you are following?
https://toolset.com/documentation/user-guides/display-on-google-maps/
https://toolset.com/2017/12/toolset-maps-1-4-with-geolocation-filtering-by-distance-and-custom-map-styles/

Is there a similar example that we can see?
hidden link

What is the link to your site?
hidden link

#1099603

Nigel
Supporter

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

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

Hi there

It is supposed to be possible to order the results by distance since Maps 1.5, but I'm not seeing the expected option.

Let me check up on this and I'll get back to you after I've had a chance to ask the developer.

#1100306

Nigel
Supporter

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

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

Screen Shot 2018-09-05 at 08.55.05.png

When you edit your View you should see an option to order by the distance from the address field (see screenshot).

If you don't see the distance option there may be a caching issue on that page, perform a hard reload and it should appear.

However, the only options are to order by the distance to a fixed location, or the user's current location.

The option to order by the distance to a location specified in a search isn't available. It appears to have been an oversight, and I have submitted a request for this to be added.

Currently it just isn't possible, but I'll press for this to be added soon as it is an obvious use case.

#1100802

This is something I have been back and forth with support with as well. It seems like a simple addition (makes more sense than sorting by a fixed location) and based on my searches, it seems as though many people could use it. Please add my vote to get this added as well!

#1123911

Hello Toolset,

I saw there is a new version of toolset maps, but it dont seems to fix the issue.
Is this issue still open or did i miss something?

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.