我在地圖中使用地圖和leafletjs,我有幾個標記,當用戶單擊標記時,bootstrap模式應該顯示一張highcharts圖表。 這樣的事情:http://leafletjs.com/examples/custom-icons-example.html但與模式。 我怎麼能做到這一點?用leaflets打開bootstrap模式
如果使用angularjs會更好。
我做了一個快速小提琴http://jsfiddle.net/kLLcetev/
這是應該打開模態代碼:
function markerFunction(){
for (var i in markers){
var markerID = markers[i].options.title;
markers[i].openPopup();
$("#Modal").modal("show");
$("#Modal").modal("open");
$("#Modal").modal();
}
}
您是否嘗試過在標記的單擊事件中打開模式? – gusper
@gusper see fiddle –