VISIT_LOCATION:拜访位置
VISIT_LOCATION_LON:拜访位置坐标经度
VISIT_LOCATION_LAT:拜访位置坐标纬度
{
field: 'id', title: '操作', align: 'center', valign: 'middle', clickToSelect: false,
formatter: function (value, row) {
var html = '<div class=" action-buttons">';
if (row.visitLocationLon != undefined && row.visitLocationLon != null && row.visitLocationLon != '' && row.visitLocationLat != undefined && row.visitLocationLat != null && row.visitLocationLat != '') {
html += '<a href="javascript:showMap(\'' + row.visitLocationLon + ',' + row.visitLocationLat + '\',\'' + row.visitLocation + '\');" class="btn btn-xs btn-info" style="margin: 2px;"><i class="icon-edit bigger-120"></i>查看地图</a>';
}
html += '</div>';
return html;
}
}
点击查看地图,会调用 showMap 函数,显示地图。
// 显示地图
function showMap(loc, locTxt) {
$('#visitLocTxt').text('签到位置:' + locTxt);
$('#iframe-map').attr('src', 'https://m.amap.com/navi/?dest=' + loc + '&destName=签到位置&hideRouteIcon=1&key=XXXXXXXXXXXXXXXXX');
$('#modal-map').modal('show');
}
版权说明 : 本文为转载文章, 版权归原作者所有 版权申明
原文链接 : https://blog.csdn.net/chengqiuming/article/details/121429782
内容来源于网络,如有侵权,请联系作者删除!