Skip to content
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

如何使用高德地图高级窗体AdvancedInfoWindow?求指教! #18

Closed
richartan opened this issue May 19, 2017 · 7 comments
Closed

Comments

@richartan
Copy link

现在发现只有基本的infoWindow, 如何加入原生的AdvancedInfoWindow?

@ioslh
Copy link
Collaborator

ioslh commented May 19, 2017

参考这里

对于我们尚未提供的组件,你也完全可以在地图的实例创建成功后,亲自调用高德的实例化方法进行创建;一个例子参考如何使用AMap.Geocoder以及相应的 jsfiddle 示例。 或者在 GitHub 上给我们提交PR或者issue。

@richartan
Copy link
Author

首先先谢谢快速的回复!我按照你给的示例,写了以下代码,可以调出advancedInfowindow, 但是进行搜索的时候却报错。
image
image

@richartan
Copy link
Author

少了一张错误的screenshot
image
在jsfiddle上运行也是同样的错误。

@richartan
Copy link
Author

@ioslh
Copy link
Collaborator

ioslh commented May 19, 2017

image

注意这一段:

如果设置了panel属性,路线规划和poi搜索的结果可以显示在panel指定的div中:文档地址

我看到你设置了 {panel: 'panel'},页面中应该有个 id 为 panel 的元素才对,否则就会出错。

@richartan
Copy link
Author

解决了,太感谢了!
附上https://jsfiddle.net/fantasy2005/ko6d187t/ 希望对其他人有帮助。

@richartan
Copy link
Author

再次感谢@ioslh

@richartan richartan reopened this May 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants