Uncaught TypeError: Cannot read property 'offsetWidth' of null [duplicate]

匿名 (未验证) 提交于 2019-12-03 07:36:14

问题:

I read couple of threads before posting this question unfortunately I could not find the suitable answers for my question .

So here is my code snippet

Basically upon changing the categories I am trying to render the map I am getting the data from a xml file .

But I am getting the error "Uncaught TypeError: Cannot read property 'offsetWidth' of null" and my map is not getting load .

My example is exactly same as "http://www.wolfpil.de/v3/toggle-cats.html"

I don't know what might I am doing wrong here .

Please help me out .

回答1:

Uncaught TypeError: Cannot read property 'offsetWidth' of null 

That is typical error when div id of map container is mismatched with id used in map constructor. See example at jsbin.



标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!