引入
ts
import { openLocationInMp, openLocationInH5 } from 't-comm';
// 不支持 tree-shaking 的项目
import { openLocationInMp, openLocationInH5} from 't-comm/lib/open-location/index';
// 只支持 ESM 的项目
import { openLocationInMp, openLocationInH5} from 't-comm/es/open-location/index';
openLocationInMp(param)
描述:
打开地图,查看位置
参数:
参数名 | 描述 |
---|---|
param | 参数 |
返回:
查看Promise
示例
ts
openLocationInMp({
lat,
lng,
name,
address,
});
openLocationInH5(param)
描述:
打开地图,查看位置
参数:
参数名 | 描述 |
---|---|
param | 参数 |
返回:
查看Promise
示例
ts
openLocationInH5({
lat,
lng,
name,
address,
context: this,
route: '/map'
});