我不太清楚如何将LRM导入到ts文件中。通过npm install leaflet-routing-machine
安装后,我定义路由这样的:如何将Leaflet-routing-machine导入到Ionic2项目中?
var Routing = require('leaflet-routing-machine');
var newRoute = Routing.control({Options});
这并没有帮助我和我:
Error caused by: Routing.control is not a function
这里是我的离子信息:
Cordova CLI: 6.4.0
Ionic Framework Version: 2.0.1
Ionic CLI Version: 2.2.1
Ionic App Lib Version: 2.2.0
Ionic App Scripts Version: 1.1.0
Node Version: v6.3.1
BTW,我对传单本身没有任何问题。
是的,我得到这个错误:'属性'路由'不存在类型'typeof L''。 –