Uncaught InvalidValueError: initMap is not a function

前端 未结 6 1796
半阙折子戏
半阙折子戏 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:26

    Found it... Though very late to the party...

    If you downloaded the google maps js code from this link https://maps.googleapis.com/maps/api/js and then tried calling it using

    
    

    There is bug in the development tools that the code gets modified.

    Find the initMap in the downloaded file and replace whole file with "" Or replace with a fresh copy form the above link and then lock the file or mark it as ReadOnly to avoid the same in future.

提交回复
热议问题