javascript 谷歌地图上的下拉菜单
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6623342/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Drop down menu on Google Maps
提问by conpill
I would like to create a drop down menu on top of my google maps, or a menu to the side of my google maps. This menu would have the options to select markers that are on the map and center the map around the selected marker. Does anyone know of any tutorials that show this, or how to do this?
我想在我的谷歌地图顶部创建一个下拉菜单,或者在我的谷歌地图侧面创建一个菜单。此菜单将提供选择地图上的标记并将地图围绕所选标记居中的选项。有谁知道任何展示这一点的教程,或者如何做到这一点?
回答by Bharath Lakshman
回答by Mark Holland
回答by Pratik
for menu define div tag for menu. this menu set the postion as absolute and for that you need to set the left and top value. As you define the div as absolute that div you can display any where on the screen.
为菜单定义菜单的 div 标签。此菜单将位置设置为绝对位置,为此您需要设置左值和上值。当您将 div 定义为绝对该 div 时,您可以在屏幕上的任何位置显示。
and your menu code put into this div so you can set your menu at anywhere on the screen
并将您的菜单代码放入此 div 中,以便您可以在屏幕上的任何位置设置菜单