-
Notifications
You must be signed in to change notification settings - Fork 151
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
调用高德手机客户端 #22
Comments
你好,高德地图提供了接口,可以在不同的实例中都可以调起高德地图客户端; 以地图为例,假如需求是点击地图后调起客户端的代码示例: const map = null;
const amapEvents = {
created(m) {
map = m;
},
click(e) {
if (map) {
map.poiOnAMAP({
id: 'B000A7BD6C',
location: e.lnglat
})
}
}
};
/* JSX */
<Map zoom={8} events={amapEvents}> 上述代码中用到的 另外,JavaScript API在Marker、Map、PlaceSearch、Driving、Transfer、Walking这些类中提供了调起高德地图的方法,参考这些类相应的高德文档。 希望能帮到你。 |
谢谢您啊
发件人: ioslh
答复: ElemeFE/react-amap
日期: 2017年5月27日 星期六 上午12:46
至: ElemeFE/react-amap
抄送: wuhuihui, Author
主题: Re: [ElemeFE/react-amap] 调用高德手机客户端 (#22)
你好,高德地图提供了接口,可以在不同的实例中都可以调起高德地图客户端;
比如:点击地图,点击标记点,位置搜索等等;请问你需求是在什么操作后调起客户端?
以地图为例,假如需求是点击地图后调起客户端的代码示例:
const map = null;
const amapEvents = {
created(m) {
map = m;
},
click(e) {
if (map) {
map.poiOnAMAP({
id: 'B000A7BD6C',
location: e.lnglat
})
}
}
};
/* JSX */<Map zoom={8} events={amapEvents}>
上述代码中用到的poiOnAMAP方法在 Map 类的高德官方文档中有说明<http://lbs.amap.com/api/javascript-api/reference/map/>。
另外,JavaScript API在Marker、Map、PlaceSearch、Driving、Transfer、Walking这些类中提供了调起高德地图的方法<http://lbs.amap.com/api/javascript-api/guide/function/callapp>,参考这些类相应的高德文档。
希望能帮到你。
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#22 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AXGAAgHgydi_5ZlucSYqTOjbAl6jNz0qks5r9wHRgaJpZM4NmUZy>.
|
有什么疑问或者建议欢迎继续回复 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
您好,我不知道怎么在咱们的插件中使用调用高德客户端的方法,您能指导一下么
The text was updated successfully, but these errors were encountered: