跳转百度地图

let ua = navigator.userAgent;
let isiOS = !!ua.match(/(i[^;]+;( U;)? CPU.+Mac OS X/);
if (isiOS) {
location.href = `baidumap://map/marker?location=${this.center.lat},${this.center.lng}&title=门店位置&content=${this.address}&src=webapp.marker.userName.companyName`
} else {
location.href = `bdapp://map/marker?location=${this.center.lat},${this.center.lng}&title=门店位置&content=${this.address}&traffic=on`
}
// 跳移动端地图
location.href = `http://api.map.baidu.com/marker?location=${this.center.lat},${this.center.lng}&title=体检位置&content=${this.address}&output=html&src=YJK`
原文地址:https://www.cnblogs.com/yangyang03/p/7993321.html