I am trying to create an Apple Map(MapKit) based app using Nativescript+NG2 and I am not sure how to go about including the map on the template. I have tried this plugin in Nativescript-JS app where it works but not in NS+NG2.
I tried to create MapViewEl as below and doesn't display any errors or the map.
declare var MKMapView: any;
declare var UIScreen: any;
export class MapViewEl {
private _ios: any;
constructor() {
console.log("MapViewEl");
this._ios = MKMapView.alloc().initWithFrame( UIScreen.mainScreen().bounds );
}
get ios(): any {
return this._ios;
}
}
//in app.component.ts
@Component({
selector:"<my-app></my-app>"
template:"<StackLayout><MapViewEl></MapViewEl></StackLayout>"
})
Any links or directions on how to approach this.
Thanks