将自定义控件放在平移和缩放控件之间 [英] Place custom control between pan and zoom controls
问题描述
有什么想法如何在Google Maps API v3中的 pan 和 zoom 控件之间放置自定义控件?
Any ideas how to place custom control between pan and zoom controls in google maps API v3?
我知道当自定义控件位于本机google控件堆栈的顶部时(例如,
I know how to do this when the custom control is on the top of native google's controls stack (for exmaple http://jsbin.com/ahetag). But it is not a solution...
推荐答案
您需要对"middle"元素使用LEFT_TOP
控制位置,然后将其设置为zoomControl
的控制选项.这样,将panControl
定位为TOP_LEFT
(默认情况下),然后其他元素向下浮动.
You need to use the LEFT_TOP
control position for the "middle" element and then set it as a control option for the zoomControl
. So that the panControl
is positioned as TOP_LEFT
(by default) and then the other elements float downwards.
http://code.google.com/apis/maps/documentation/javascript/reference.html#ControlPosition
这篇关于将自定义控件放在平移和缩放控件之间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!