Skip Navigation

[Fixed in next Release] Map not behaving as expected

This support ticket is created 3 years, 10 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
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 29 replies, has 2 voices.

Last updated by Jamal 3 years, 10 months ago.

Assisted by: Jamal.

Author
Posts
#1660085
viewsettings.jpg
mapscreenshot-onload.jpg

Tell us what you are trying to do?
I am trying to display a list of meetings in ascending order, within 25 miles of user location on load, with the option to change search criteria. For instance a user goes to our meetings page and sees relevant meetings instantly within 25 miles of him, but decides he's willing to drive further, so he changes the search radius to 40 miles.

I have two problems:
The page currently displays (one) all results on load, (two) in the wrong order. I have my view set to display results in ascending order as a distance from the URL parameter "toolset_maps_distance_center" with a query filter of 25 miles as a default. Even though that is my setting, the page loads everything in descending order, so a meeting 190 miles away shows before closer meetings. Under the current settings, only when I click 'use my location', will it filter as expected in the correct order.

I cannot fix it unless I change my query filter to"Distance center is set from user location.", which restricts the results and disables any further search. We have thousands of meetings all over the world. I don't want users to see meetings on the other side of the planet first, I want them to see relevant meetings near them first, and be able to change the criteria as needed.

Is there any documentation that you are following?
https://toolset.com/reference-site/toolset-real-estate/

Is there a similar example that we can see?
hidden link but it seems to have the same issue I'm having

What is the link to your site?
hidden link

#1660107
searchfilters.jpg

Here is what my search criteria looks like

#1660403

As I work trying to fix this, it seems like no matter what I do, something is broken. If I fix the distance problem, the day and post date sorting break. If I fix the day and post date sorting, the distance breaks. Views is so finicky, I don't know the right combination of settings it wants to make everything work.

#1661111

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Hello and thank you for contacting the Toolset support.

To better assist you with this issue, I would need to take a closer look at your view, if you would agree, your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

Please explain a case that will help me test this issue quickly as I am not yet used to your website and data model:
1. Go to xxx
2. Enter xxx
3. We expect to have xxx
4. Instead, we get xxx

#1663163

Go to hidden link
You will see 3 test meetings ranging from 6 to 321 miles away. For now, that seems to work, but it has broken the other filters.
I have the published dates in the meeting names for reference.
You will see sorting by newest does not work
Sorting by Meeting day doesn't work either, it should be Every Day, Sunday, then Monday. I have the days labeled with a number in front of them so they should show up in order of days. 0Every Day, 1Sunday, 2Monday, etc.

If I make it so that Newest and Meeting Day sorting works, then the distance breaks.
Frustrating.

Thanks for checking on this.

#1663795

I had another ticket open for a separate issue on this same page. The solution was that I didn't have Bootstrap enabled in Toolset Settings. That fix seems to have remedied this problem as well.

#1663799

It seems this problem still exists. Currently, my day sorting works, my post date sorting works, but sorting by distance does not. When I select "Closest To Me", I get meetings 11 miles away, then 515, then 304. The distance (mi away) also seems off in the table loop. It is showing several miles more than actual.

#1664785

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

My apologies for the late reply, but I do not work on Sundays and Mondays.

This ticket was resolved at some point and our automatic bot has removed the credentials as you may see in this screenshot hidden link

Please provide the credentials again and let me debug the view and its query. If I am not able to figure out the issue or if I need to confirm it is a bug, I'll need to take a copy of your website for further analysis, let me know if that's ok for you?

#1665137

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Thank you for the credential information, it is working for me.

I tried a distance search based on 250 miles from Philadelphia, it should return New York's post then Washington's. It works for me for the following cases, check this screenshot hidden link :
- Simulate my position as if it was in Philadelphia.
- Search based on Philadelphia(choosing Philadelphia in the location search input)

Can you please provide an example when the search does not work in a way such as:
1. I select ... in ...
2. Enter ... in ...
3. We expect to have ...
4. Instead, we get ...

#1665143

The results are backwards. The closer meeting should come up first, not the farther away. This is exactly the issue.

In your example search,
"I tried a distance search based on 250 miles from Philadelphia, it should return New York's post then Washington's."
Washington should come up first, then New York.

#1665227
Image1.jpg

I also see in your screenshot that the distance number is gone under the table loop. In the parentheses next to the address, it should say (515.7 mi away) for the NY listing and (304.5 mi away) for the DC listing using your test of Philadelphia and a 250 mi radius. I attach a screenshot. You will see the farther away listing appears first, even though my view is set to show in ascending order.

#1665455

Jamal
Supporter

Languages: English (English ) French (Français )

Timezone: Africa/Casablanca (GMT+01:00)

Screen Shot 2020-06-16 at 11.08.40 AM.png

On my screenshot, I think that the results were correct, New York is closer to Philadelphia than Washington, my colleague Christian confirms it and has shared this screenshot from Google Maps, which is attached to this ticket.

On the other hand, I can see the issue if we increased the distance radius. Check this screenshot, Pittsburgh should be the latest one as it is not the nearest to Philadelphia hidden link

Then I realized that the ordering on the view is wrong, it should be a distance instead of a number, check this screenshot hidden link

I fixed it by choosing the following hidden link and it seems to work for me check this screenshot hidden link

I hope this helps. Let us know if there is still something missing.

#1665467
OnPageLoad.jpg

This still is not working properly. This was the setting I had before. See screenshot. On page load, nothing is right about the distance sorting. The closest meeting is dead last. I live in Pittsburgh.

Now, I cannot change the page search at all. I can set the distance to 25 miles or 5000 miles and nothing on the page changes. I can't change the location either. The page is static now.

It's the same in your screenshots. You have your distance set to just 1025 miles, and yet all the listings still show even they are all way outside of that radius. The current settings make the page unchangeable.

#1665493

It does seem, no matter the setting, that the search is using the user location and ignoring any location or radius input. The Query Filter seems to render the page static and makes it ignore any changes to the search radius or location.

Does this feature not have the ability to use the user location on load, and then offer the ability to change it if the user wishes?
I would also prefer that the page initially show the results of the default radius of 25 miles on load, with the option to change it.
Neither of those things seem to be an option here.
Then if we could just get the sorting right, closest first, we'd be there.

#1665575

I would even be okay loading the page with no results, and not automatically geolocating the user. The user could then decide whether or not they want to use their location or a different location (say they were traveling) and what radius they want. If it would solve our problem, I'm good with that.