我开始从事离子技术的开发。 bindPopup中的按钮不起作用,我不明白为什么。
loadmap(data){
this.map = leaflet.map('map').setView([48.845,2.424],10);
leaflet.tileLayer('https://api.mapbox.com/URL',{
minZoom:0,
maxZoom:18,
tileSize:256,
attribution : "ClicParcelle",
}).addTo(this.map);
leaflet.geoJSON( (data) , {
onEachFeature: function (feature, layer) {
var template = "<h6>"+feature.properties.Name+" </h6><button class='button button-clear button-small button-royal' ng-click='GoParcelleJob("+ feature.properties.Id +")'>Rajouter une observation</button>";
layer.bindPopup(template);
}
}).addTo(this.map);
}
提前谢谢! 朱利安