Hi,
I’m creating a plugin for ACF. I needed a google maps drawing plugin so started to creating it.
Works fine but sometimes it works and sometimes it does not.
Seems it is conflicting with the google maps plugin.
Gives the following error:
.. http://imgur.com/Og99ARs
I think its because the two sources of jsapi are loaded async, at the same time.
I check if duplicate with the following code:
// validate google
if( typeof window['google'] === 'undefined' )
{
$.getScript('https://www.google.com/jsapi', function(){
google.load('maps', '3', { other_params: 'libraries=places,drawing', callback: function() {
acf.fields.google_map_draw.set({ $el : $el }).init();
}});
});
}
else
{
google.load('maps', '3', { other_params: 'libraries=places,drawing', callback: function(){
acf.fields.google_map_draw.set({ $el : $el }).init();
}});
}
Here is a sample of the plugin:
.. http://imgur.com/mCzFFHH
Hi @wouter84
Could you please ask Google Map community about that error?
Thanks!