Skip Navigation

[Resolved] MAP with ajax load the informations in the pin

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

Sun Mon Tue Wed Thu Fri Sat
- - 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00 14:00 – 20:00
- - - - - - -

Supporter timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Tagged: 

This topic contains 4 replies, has 2 voices.

Last updated by Ronny Wunderlich 5 years, 10 months ago.

Assisted by: Beda.

Author
Posts
#611966

Hi, i have a map with all my locations. The Marker shows an image and a link.

But now i have 200 entries. The load of the images makes the site slow. It will be great to load the image and the informations only when a user click the pin? This should be work with ajax load.

#612134

This is not possible with Toolset Views, because it generates the list on the moment of pagination (if any) and if not, it will simply output all contents - just as in a PHP loop.

With "it's not possible" I mean, not with Toolset - you would require complex Custom Code that we cannot support.
In that case - if you need help with it, I suggest to discuss this with a Contractor:
https://toolset.com/contractors/

What I suggest to do with Toolset, which should be enough, is this:
- in your Theme, register a relatively light/small image thumbnail size. Maybe 60*100 px, or however you like the size on the Modals of the Pins (those are not so big usually, I as example use a very small image on the modals and link to bigger images in the real post).
- then, when you create the Map, use that thumbnail as the image to display.

This will reduce the load time. Then, you can also play with the cache settings of the View, if you head to the Filter Settings you will see that in there you can as well choose how many images to preload.
Now, the more you preload, the longer the "first load" of the View takes, but the shorter all subsequent paginated or searched items will load faster as they are already there.

Finally, this should solve the problems.
Important is to:
- never use custom size in the View's Loop
- always use image sizes that are already registered by the theme or WordPress
- create image sizes thru the Theme that are small enough (already resized to a thumbnail)
- Eventually paginate and cache the View's Loop output.

We also have a more generic document on sites with large data sets:
https://toolset.com/documentation/user-guides/front-page-filters/how-to-use-views-parametric-search-on-large-sites/

But, the issue with the images can only be addressed partially (to a good part) by loading a properly small size of the image in the Loop of the View.

#614580

Thx for the answer. In an other ticket Noraman ask me to submit this as a feature request to your development team.

https://toolset.com/forums/topic/map-with-html-in-pin-load-with-ajax-to-reduce-site-loading-size/#post-575479

I was too slow to answer. But it will be a great feature! Other maps have this function and it makes sense when a map is used to show many points. Load the informations with ajax on click make the map super fast and the informations in the pin can used in an other way. It will be possible to use only a map and show all informations in one place without switch to the full site of the loacation.

Hope it will be a part of your map in the future!

#614809

Thank you for elaborating and showing me the other link.

The feature request is filed and your voice added to it.

I cannot grant when or if the Developers will implement this, but yes, it makes sense and from my point of View we should consider it.

Thank you for the vote!

#1195303

Hey, is there are news about this? Best Ronny