ArcGIS API for JavaScript问题总结

Uncaught TypeError: *** is not a function

Uncaught TypeError: tocWidget.setTitle is not a function

这个问题大体就是两个方面,url加载顺序或者模块加载顺序错误。

小声说一句,TMD,这也能错!!!

我把这个模块放到了中间出现了❌,改正放到最前面成功解决问题。

 lang.hitch()

 var mapLoadHandle = this.map.on("load", lang.hitch(this, function (map)
在map进行加载的时候,进行lang.hitch()

 但是我的加载地图的时候没有引用这个模块,this.drawToolbar=new Draw(this,map)不能实例化

其实这个bug不是lang.hitch()这个知识点,在解决bug的时候顺手解决了。

猜你喜欢

转载自blog.csdn.net/qq_41664159/article/details/105433925