Detecting request type in PHP (GET, POST, PUT or DELETE) 1116. This may cause unexpected errors.,The function I am using is this :,I am working with google maps, and I am using their asynchronous loading. Loading Google Maps API with wpenqueuescript. How can I prevent the function that's asigned to ready from creating duplicates ?,You have included the Google Maps API multiple times on this page. So, instead of this: if(window.google != undefined & window.google != null) ) ,Stack Overflow en español,Stack Overflow на русском Find the part in the code where the Google Maps API is being called, and use condition below, if you’re not sure or familiar in coding, you can request our devs to do it, and we’ll quote you accordingly $url = '. We would recommend you to download the theme files to local machine, then, use Notepad++ and search for keyword maps.google usually it looks like code below wp_enqueue_script('google-maps', '///maps/api/js'.Ģ. Latest themes will have an option to disable Google Maps API calls moving forward (which most themes already have right now) because the plugin has a special call with parameters for the store locator.īut certain web owners will want to use the Google maps on the Contact Us page, thus disabling it will make the contact form not working, thus we propose a solution below.ġ. ![]() The most common solution for all major theme is to modify the theme code or have an option to disable it This may cause unexpected errors. First of all enqueue the Google Maps API js in the right way. I get an error: 'You have included the Google Maps API multiple times on this page. Disable this option to remove the Google Maps API script from your Divi Builder Pages. Google is converting the hex code back into a simple & before parsing the parameters. The site is also using google maps api to display a map in the footer on all pages. Calling Google Maps API, at least for version 3.X and higher, works correctly with &038 in the URL. If it’s conflicting with your theme, at the moment there’s no choice because the plugin calls google maps api with special parameters where most theme do not.ģ. Howdy, I've got a site using events calendar pro v. If you suspect that there are other plugins using Google Maps API, you can refer to this article to disable other plugins (using Plugin Organizer – Download here) on your Super Store Finder page.Ģ. If you’re facing this issue, recommended solution as below:ġ. * Google Maps API has been changed in Feb 2016 causing a lot of javascript error if multiple map APIs being called at once Make sure you only load the Google Maps API once which from Super Store Finder plugin which has calls to specific libraries and parameters. Also thanks to the suggestion you posted last week for someone else regarding Divi and turning off Enqueue Google Maps Script is settings to get the Map Block working. This may cause unexpected errors.,Im developing a plugin that use a Google Maps API. I spent too much time experimenting with this. You have included the Google Maps API multiple times on this page. Super Store Finder is a multi-language fully featured store locator PHP Application & WordPress Plugin integrated with Google Maps API v3 that allows customers to locate your stores easily. Can I make a suggestion that the display of this message be changed as it is disconcerting and suggests that the maps will not work. When this occurs, an error will be printed to the javascript console related to the Google Maps API. ![]() ![]() I usually add true to the google-map script as well. If two or more plugins (or theme) load the Google Maps API, and the library is loaded twice, a javascript error will occur and the maps will stop working. You spelled enqueue wrong on the add action line for your function name. However, this should only be loaded once. ![]() Themes and plugins that want to use Google Maps functionality load the Google Maps API javascript. If two or more plugins (or theme) load the Google Maps API, and the library is loaded twice, a javascript error will occur and the maps will stop working.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |