I’m trying to use a non-native Ionic 2 plugin called Mapbox. The reference site is Telerik mapbox and I make the following steps:
-
I install it via the cordova plugin add
-
On the page where I want to render the native map I declare at the top declare var cordova: any;
-
Finally call up the method to show the map
if (typeof cordova !== 'undefined') {
cordova.plugins.Mapbox.show(
{...})
}else{
console.log("cordova is undefined");
}
The error that returns is -> Cannot read property ‘show’ of undefined.
why? I followed the steps described above.