问题描述
我想升级到最新版本,以使用一些不错的新功能。我正在使用ExtJS,因此必须使用带有ol
全局变量的捆绑软件。我跟随this step创建了它,但是它使用了Parcel
。我还尝试了Rollup,Webpack和browserify,但均未成功。使用他们的捆绑包时,出现以下错误:
Uncaught ReferenceError: ol is not defined
const map = new ol.Map({
target: 'map',layers: [
new ol.layer.Tile({
source: new ol.source.OSM()
})
],view: new ol.View({
center: [0,0],zoom: 0
})
});
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)