Google map error: a is null

后端 未结 10 1867
予麋鹿
予麋鹿 2021-01-03 17:15

I have a program that I want to use google maps for. The problem is I get an error that says a is null where a is a var used in the google map api. Here is how I call my goo

10条回答
  •  情歌与酒
    2021-01-03 18:11

    Solved, the google map type a error, make sure you get object var map = document.getElementById('map-canvas') returning properly using alert(map). Check the div container id name same as specified in getElementByid.

    I have also stuck with the same type a error, fixed it by checking getElementByid('map-canvas'). Sample code enter link description here

提交回复
热议问题