Hi
Please help me understanding what's wrong with geolocalization. I have a simple view that when I was home (Milan,Italy), a few days ago, seemed to work perfectly. I set it to show all stores in a 10km range from the current user location (my home) and it worked well. Then I moved for the holidays and it was a unique occasion to check which stores were displayed, giving for granted that I'd see local stores within the same range from my new location. Instead:
- from my PC using Chrome+admin credential I can see just one store ... in ROME !!!!. Rome is 200 kms away with a sea in between and has nothing to do with my home or where I am now.
- from my PC using Firefox + user credentials I can see are stores in Milan (400 kms away with a sea in between)!!!
- from my Android phone stores are the right local ones (!!!) but distance calculation seems to be wrong in many cases:
Store1 is 3.2 km away according to Google maps, in WP I get 9.4 kms
Store2 is 20.2 km away according to Google maps, in WP I get 9.3 kms
Store3 is 13.9 km away according to Google maps, in WP I get 9.1 kms
Store4 is 2.3 km away according to Google maps, in WP I get 2.5 kms - pretty ok...
Can you explain this weird behaviour ? has it anything to do with my PC being currently connected to the Internet via my phone hotspot ? or what else ?
Thanks
Regards
Nicola
Hello,
This is a really Weird issue, please try these:
1) Check if there is any JS/PHP errors in your website, when "PC being currently connected to the Internet via phone hotspot":
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
2) Connect your PC with local WIFI and test again.
Hi Luo Yang
1.
- No JS errors on page, "successfully updated user preferred location" message ok
- I've tried to set the View debug mode on, but when I select the option no compact/full selection appears and no SAVE button either, so I cannot use it, see picture. Is it a bug ? all my plugins are updated.
2.
Yesterday I moved 40km away to find a good wifi connection at an internet point of a bigger town. My PC immediately returned the right stores in the area, while my phone still returned the stores of my original location. I asked the manager to connect with his own phone and it showed the right stores (same as my PC). So it looks like this time my phone was wrong, I don't know why (I cleared Android Chrome cash and geolocalization is set to Hi sensitivity).
Distance calculation however seems quite weird:
Store1: Toolset = 1.1 km ; Google Maps = 1.5 km (+36%)
Store2: Toolset = 7.5 km ; Google Maps = 9.5 km (+26%)
Store3: Toolset = 1.2 km ; Google Maps = 2.5 km (+108%)
Store4: Toolset = 0.5 km ; Google Maps = 0.7 km (+40%)
Store5: Toolset = 3.3 km ; Google Maps = 4.6 km (+39%)
Store6: Toolset = 2.5 km ; Google Maps = 2.8 km (+12%)
Toolset distance is always shorter than Maps. Who's wrong ? Doesn't Toolset use the Google API to calculate the distances ? if so why are they so different ? is there anything I should know or warn users about ? (like "don't use the hotspot ...")
Thanks
Regards
Nicola
Q1) Is it a bug ? all my plugins are updated.
I have tried it in my localhost with a fresh WP installation + the latest version of Toolset plugins, it works fine, see my screenshot:
debug-mode.JPG
And there does not exist any "Save" button, since all those settings are saved with AJAX
So the problem is abnormal, please do the normal debug steps:
1) deactivate all other plugins, and switch to wordpress default theme 2020, deactivate all custom PHP/JS code snippets, and test again
2) Also check if there is any PHP/JS error in your website:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/
Q2) Toolset Maps can only get the Straight line distance, but if in Google Maps, you will get Road distance, it conducts the issue you mentioned above.
Q3) It should be a problem of your mobile device, I suggest you check it with your sim card provider, check if it can provide the local IP address when you are travel in some other cities.
My issue is resolved now. Thank you!