Hi @bartekszkla
The Google Maps API seems to be loading more than once on the page – as a result of this an error is thrown and the maps are affected.
The duplicate call seems to be coming from ‘wd-google-maps’. Please try disabling this plugin and let me know if this helps?
No, wd-google-maps is not an issue here. wd-google-maps is another google map pluging which I’ve installed after submitting this thread. Now I’ve unistalled it and the problem still persists.
Hi there
There now seems to be a JS error originating from your theme files.
Please login to your site via FTP and go to the following file:
/wp-content/themes/himalayas/js/jquery.nav.js
Then search for a block of code that looks like this:
getHash: function($link) {
return $link.attr(‘href’).split(‘#’)[1];
},
Change it to
getHash: function($link) {
if( typeof $link !== ‘undefined’ ){
if( typeof $link.attr(‘href’) !== ‘undefined’ ){
return $link.attr(‘href’).split(‘#’)[1];
}
}
},
Does this help?
No, it didn’t helped. When I changed this code the map still doesn’t show and I have new errors in the console:
“Uncaught SyntaxError: Invalid or unexpected token jquery.nav.js:108
Uncaught TypeError: jQuery(…).onePageNav is not a function himalayas.js?ver=4.6.1:24”
I tried to reinstall the plugin and create new API but it didn’t help as well. The map isn’t showing and I have errors in console:
“Uncaught TypeError: Cannot read property ‘split’ of undefined jquery.nav.js?ver=3.0.0:108
Uncaught TypeError: Cannot read property ‘setCenter’ of null wpgmaps.min.js?ver=6.3.18b:29”
I tired to change the theme and in the other theme the map is showing all right. So the problem is with the theme I’m using but I don’t understand why it worked before.
Hi there
We recently made changes to our plugin and the way it loads it’s JavaScript file – this is likely now being affected by the errors in your theme.
May I suggest getting in touch with your theme developer to see if they can resolve the errors originating from your theme?