This thread is resolved. Here is a description of the problem and solution.
Problem:
Map markers are not displaying in a View when layout is applied on the page where I have inserted this View. Whereas Map was added in the post body and displayed in layout using Post Content cell.
Solution:
Insert View cell or Map directly in the Layout template which is a better way, then markers should display properly.
This support ticket is created 6 years, 8 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.
Show a map with markers related to the "address" field from specific custom posts.
Link to a page where the issue can be seen:
hidden link
I expected to see:
A map with markers.
Instead, I got:
A default map with no markers. The same problem happens when I try to set a static Toolset map without using a view loop. The map doesn't show any marker. The view works since I can render a simple text list of addresses. It's just the map that seems to be somewhat buggy. I also read that some template can cause glitches to Toolset maps but even when I set wp to the default template, the problem remains. I tried to put a different api for the template's map api field, same api or nothng at all, the result is the same. I also tried to deactivate other plugins than Toolset's with also the same result. Also tried different apis, set with or without :
Google Maps Geocoding API
Google Maps JavaScript API
Google Places API Web Service
The toolset token is still the one set for my localhost version but I got the same problem on localhost.
This is the view code (I tried many different ways without luck) :
Thank you for contacting Toolset support. I can see that you are using older version of Toolset plugins (Types, Views, CRED,etc) so please make sure to use latest version of Toolset plugins: https://toolset.com/account/downloads/
Please let me know if this resolves the issue or not.
I have thoroughly checked the issue in your and noticed Google Maps API error or warning in your website when checked with Chrome browser Console on the front-end. See attached screenshot.
Please generate new Google Maps API key and add again in your site >> Toolset >> Settings >> Maps >> Google Map API key
In the new API key setup, please make sure that you have NOT restricted the API key usage limit for your site URL or domain. This is an option in google api key setup that cause the blockage if the url is restricted.
I already tried many different api options/config and I still can't figure why it's not working.
I still get this error in the console "You have included the Google Maps API multiple times on this page. This may cause unexpected errors." The only place where the key has been set is in Toolset's settings.
The template has a Google map api field but this field is empty right now. Anyway, since the template has it's own (inactive) Google map system, could it be a problem ?
Console also shows "Google Maps API warning: InvalidKey" but it can't be.
I made another api for you and the problem remains. You can take a look at the screenshot. I got the 3 right API in a project linked to a key. I've never had such problems with maps and apis before. Also, the api is not restricted.
I have thoroughly checked the issue in your site and below are my findings:
1. Google map errors and warnings in browser console are coming from your theme, I have changed the theme to Twenty Sixteen and there is no any error in browser console.
2. I have added the Carte view directly in Layout which is a better way, and marker is displaying properly, you can check here: hidden link
Thanks a lot Noman 🙂 It seems to be perfect. I'll remember your advice for all of my next projects. I'm gonna make some tests right now to be sure that everything is 100% fine and then, I'll change the status of the topic.