Uncaught TypeError:Cannot read property 'fc' of undefined

725 阅读1分钟

百度地图调用报错Uncaught TypeError:Cannot read property 'fc' of undefined

百度地图调用出现这个错误,说明你的百度地图没有在页面加载完之后调用,而是在页面加载之前调用的。

也就是下面这两行一定要在页面加载完之后进行调用

 map = new BMap.Map("allmap",{maxZoom:8,minZoom:8});

 map.centerAndZoom(new BMap.Point(122.825755,45.632862),8);