Toolset Maps is a WordPress plugin that allows you to add address fields to any content type or users and display any content on Google Maps.
Toolset Maps User Guides include detailed documentation for creating these special address fields, adding pointers to them and displaying them on maps.
When you ask for help or report issues, make sure to tell us the versions of the Toolset plugins that you have installed and activated.
Viewing 15 topics - 151 through 165 (of 467 total)
Problem: I have a View of custom posts that displays a map with markers, using a distance filter and sorting results by distance. In some cases the distance center is set by a URL parameter, and in others, it is set by a shortcode attribute. I have implemented some custom code in a wpv_view_settings filter to toggle between the shortcode attribute and the URL parameter. In the cases where distance center is set by a shortcode attribute, I am using another custom shortcode to get the User's predicted zip code. That shortcodes an external service to get a predicted zip code based on the User's IP address. The custom zip code service seems to be working correctly, and the results of the View seem to be accurate.
However, in the cases where this zip code shortcode is used to set the View's distance Query Filter by shortcode attribute, the View consistently causes the page generation time to jump by 3 or more seconds. I would like to try to optimize the page load time as much as possible.
Solution: In this case, testing revealed that using the custom zip shortcode inside a wpv_view_settings filter callback was the source of the delay in page generation, for some reason not fully understood. Replacing that shortcode with a hard-coded zip code resulted in a page generation time just a fraction of a second higher than the page without the View present at all.
Optimization of the zip code shortcode is necessary to prevent the latency seen in page generation time.
Problem:
The user would like to extract the latitude and longitude from a Toolset Address field and store them as custom fields.
Solution:
This will need custom code. Hooked to the cred_save_data for Toolset forms, or the save_post for the admin screens. You can use the format argument in the types_render_field function or the types shortcode. Read more about it here https://toolset.com/documentation/customizing-sites-using-php/functions/#address