Uncaught InvalidValueError: initMap is not a function

前端 未结 6 1781
半阙折子戏
半阙折子戏 2020-12-10 16:57

I am trying to load a google map with some specific parmeters. I understand the problem is most likely that the initMap function needs to be declared globally. However, I h

6条回答
  •  抹茶落季
    2020-12-10 17:00

    Not a best way but it fixed my problem.

    Call initMap() function manually as a fallback if ever the callback function wont work.

    jQuery(document).ready(function($) {
        initMap();
    });
    

    Hope this helps.

提交回复
热议问题