Hello. Thank you for contacting the Toolset support.
When filtering by distance users enter a location to search from in a text field, and we add those addresses to the address cache as well as those stored in custom field address fields.
But the auto-suggestion that is shown by address field does contact the Places API, even if the user ends up entering a place that has been searched for previously. I don't think that can be avoided.
Lets say, you want to use the current post address field so when you try to create a new post and add address field and save the post at that time Toolset will automatically cache the address string you added to address field of this newly submitted post.
Then if you want to filter the posts with current post address field and before query the map API it will check the maps cache table and if the address is available it wont query the map API.
Hi, I explain a little more. I've the CPT Sights, each sight has a location address.
This view is displayed in the Content template for Single Sights, where I want to display the nearby sights in a radius of 10km ordered by distance.
I've added a Query filter (not a search filter, you can see it in the attached image) and I pass the current Single Sights latitude and longitude by the shortcode attribute:
Does this setup uses cached information without calling Google API?
I've also set the order by distance from a Fixed address. I'm getting the fixed address with this shortcode: [wpv-attribute name="mapcenter"] (see attached image).
Does this setup work?
It seems it works, but I'm not completely sure it gets correctly the fixed value by the attribute shortcode.
I've also set the order by distance from a Fixed address. I'm getting the fixed address with this shortcode: [wpv-attribute name="mapcenter"] (see attached image).
==>
You did not share the image but thats ok.
Regarding the address field, it only asks the Google API for the address coordinate address and it Caches the result, and uses the cache every time after that. If there is a address that is not cached then it will fire the Google API one, cache the results and then later when the same address is used, it will be used from cache as its available with map cache table.