I have a site for companies and each company can have multiple stores/offices. I use ACF Pro to get that data from the client and I use Google Map ACF field which provides me longitude, latitude and address. I’ve tried following you example in documentation (
[display_map address1=”New Delhi, India” address2=”Mumbai, India”] -> your shortcode
[display_map width=”100%” height=”500″ zoom=”12″ language=”en” map_type=”ROADMAP” map_draggable=”true” scroll_wheel=”false” address1=”Vrbje ulica 7, Zagreb, Hrvatska” address2=”Ulica Ante Mike Tripala 9, Zagreb, Hrvatska” address3=”Avenija Dubrava 228, Zagreb, Hrvatska” ] -> my custom generated shortcode
). It has some issues. I’ve also tried with longitutde and latitude but no luck.
First it won’t show multiple locations.
Second, sometimes it shows first address, sometimes second in order in shortcode.
Third, I get this JS error in console.
Uncaught TypeError: Cannot read property ‘replace’ of null -> maps.js?ver=2.3.4:3721
Here’s the link so you can check it out: https://pinspot.hr/tvrtka/beeronomia/
Please insert this shortcode
[display_map width="100%" height="500" zoom="12" language="en" map_type="ROADMAP" map_draggable="true" scroll_wheel="false" address1="Vrbje ulica 7, Zagreb, Hrvatska | title | infowindow message | beaches" address2="Ulica Ante Mike Tripala 9, Zagreb, Hrvatska | title | infowindow message | beaches" address3="Avenija Dubrava 228, Zagreb, Hrvatska| title | infowindow message | beaches"]and check your issue is resolved or not.
It's working PERFECTLY!
Thank you a lot.
Have a nice day.
Actually it's not working properly. Sometimes everything is shown correctly and works like a charm, but most of the times everything falls apart and I get this JS error in console.
Uncaught TypeError: places.splice is not a function -> maps.js?ver=2.3.4:3786
Sometimes it shows blank map and sometimes it show address2 and 3, but not address1. Could it be that address1 is causing problems?
I just checked your map and I am getting all three locations are displaying properly. I think you have inserted wrong address somewhere that's why single location is not shown but now your locations are shown properly.