Implementing multiple store locations on WordPress with ACF Pro and Google Maps

I’m using ACF Pro with a custom post type to display multiple store markers on a Google Map. Any tips to improve performance?

hey alexj, i’ve dealt with this before. try using a custom rest api endpoint to load marker data asynchronously. it’ll keep ur initial page load quick. also, look into marker clustering for better performance with lots of locations. dont forget to optimize ur google maps settings too!

I’ve worked on a similar project and found that performance can be greatly improved by rethinking how data is loaded and displayed. For instance, moving clustering to the server side can ease the load for maps with many markers. Loading the map and markers only when they become visible can also help a lot. I made sure to optimize database queries to retrieve only the necessary information and used caching strategies for map data. Finally, using lightweight SVG icons and minimizing infowindow usage really helped, especially on mobile devices.

Performance optimization for maps with multiple markers is crucial. One effective approach I’ve found is implementing lazy loading for marker data. This means only loading markers for the visible map area and fetching more as the user pans or zooms. Additionally, consider using a GeoJSON format for your location data, which can significantly reduce payload size. If you’re dealing with a large number of stores, look into server-side rendering of map tiles with pre-plotted markers. This can dramatically improve client-side performance, especially on mobile devices. Lastly, ensure you’re using the latest version of the Google Maps API, as newer versions often come with built-in optimizations.