Reputation:
I created map in ionic 2 using leaflet library. And also added marker
let marker = L.marker([47.561495, 7.592376]).addTo(this.map);
My question is how can I open page on marker click.
I am doing something like this.
marker.on('click', this.onMarkerClicked);
...
onMarkerClicked() {
this.navCtrl.push(SomePage);
}
But it gives following error.
Upvotes: 0
Views: 844