Where I must put the API of google maps in visual composer ? I can not find where I must put it . thanks
Hey @Borislav.VD,
Thereās currently a known issue where the API key field is missing in X Google Map VC integration.
Thereās no API setting in VCās native Google Maps element also so regretfully, showing a Google Map isnāt currently possible using VC. You need to use Cornerstone and its Map element for this.
Thanks.
I have a problem with cornerstone and I can not use it . I leave credentials thanks
Hello @Borislav.VD,
Thanks for asking.
Looks like you are using a custom url to login into WordPress admin section. I tried following URLās and both are pointing towards 404 page.
I scrolled previous replies in this ticket and seems you havenāt shared the admin URL. Can you please share the admin URL for us to take a closer look? Also please let us know the problem you are facing while using Cornerstone.
Thanks.
For sure I have attached them in the last message , thank you !
Hello @Borislav.VD,
Thanks for asking.
I created a test post in Cornerstone and can confirm that itās preview panel is not working properly, I checked the console and donāt see any error message as such. Further investigating I noticed that you are using two cache plugins WP Super Cache and Autoptimize. Well there is no issues in using both the plugins but sometimes they can cause conflicts. I also request you to please disable CSS and JS minification.
As itās a customer website, I donāt have the authority to fiddle with the core functioning of the same without taking due permission. If above solutions donāt workout then please try testing for plugin conflict by deactivating all plugins. If you see Cornerstone working the we can be sure that itās conflicting plugin thatās causing the problem. After that you need to reactivate one at a time to narrow down.
Regarding maps, you can use Cornerstone Maps element and under setup enter the API in API Key text box. https://cl.ly/1G3t0T3R0t13
However, in order to use Maps element we first need to get Cornerstone working. Please let us know the output of above solutions.
Thanks.
ok i have seen this topic , is still that works?
function my_add_frontend_scripts() {
wp_register_script( āvendor-google-mapsā, āhttps://maps.googleapis.com/maps/api/js?key=YOUR_API_KEYā);
wp_enqueue_script( āvendor-google-mapsā );
}
add_action(āwp_enqueue_scriptsā, āmy_add_frontend_scriptsā, 100);
Hi There,
Weāve already tested that code. It will not work.
Right now, you can try using the iframe emebed code instead.
Regards!
OK and if I put the api code in the uber menu?
Hello @Borislav.VD,
Thanks for updating the thread.
Do you plan to display maps location in menu? I suggest you to please take a look at following article.
As per your request, I have moved the URLās into secure note. That way information is in between you and Themeco staff.
Thanks.
No , but i have read that if there is 1 google maps api into the website it would be enough in order to activate all of the google maps into it . If the cornerstone has a problem , the functions.php alternative is not working , I must find how could put a google api into the mine website somehow . Any ideas ( without using additional plugins ) ?
Hi,
Yes, it only needs to be added once.
Can you try disabling google map api ni your ubermenu then add the code below in your child themeās functions.php file
function my_add_frontend_scripts() {
wp_register_script( 'vendor-google-maps', 'https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY');
wp_enqueue_script( 'vendor-google-maps' );
}
add_action('wp_enqueue_scripts', 'my_add_frontend_scripts', 100);
Donāt forget to change YOUR_API_KEY
with your key
Thanks
Morning ! Your colleague have told me that this code would not work . Who is right ? Thanks
ĀØ
Hi There,
Weāve already tested that code. It will not work.
Right now, you can try using the iframe emebed code instead.
Regards!
ĀØ
Hey @Borislav.VD,
I just pasted the code in my test site and it works. Not sure why it does not work on @thaiās end.
I also rechecked your page with Google Maps and see that itās working now. Looks like this is resolved?
Thanks.
Hi everyone,
on my side, no needs to add any js code in my child-theme function.php.
In the Google API Key field in Cornerstone, I just found a āspaceā at the beginning and at the end of my API code.
Everything works fine once I removed it.
Try it and let know if it works!
Hello,
With the risk of cluttering I can confirm that Google Map Api Key Field is not shown on Visual Composer (VC latest version 5.4.7 and Theme Pro 2.0.4).
The duplicate js is throwing errors:
Tried to unregister the script, no luckā¦
Please make a checkbox (it should be possible) that read : āLoad Google Maps Java ?ā Like this we cand put our key functions.php in child theme as registered script. Or other plugins (where someone can chose his API key) can do what CornerStone shortcode canāt. Is one of the most used shortcodes in CS⦠and itās a little broken.
Update:
Creating the Google Map Shortcode with Cornerstone (With Visual Composer deactivated).
Creating the API Key and adding that to the CS field.
Saving the page and then when looking at it :
You have included the Google Maps API multiple times on this page. This may cause unexpected errors.
So the problem is not VisualComposer, is the Cornerstone that load twice the āhttps://maps.googleapis.com/maps/api/jsā , perhaps one in google_map.php and second time in partials.
Please assure us that those shortcodes are tested before release.
Hi,
I tried this in my test sites and canāt seem to replicate the issue.
There could be another plugin that is causing the issue.
You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If itās fixed, youāll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.
If that doesnāt help, kindly create a new topic and provide us your login credentials in Secure Note
Thanks
Thank you for yout answer.
I will debug the charging order with https://fr.wordpress.org/plugins/query-monitor/ and come back with findings since the bug with Visual Composer not showing the API field is known, maybe I will find the culprit and tell you.
Thanks.