将自定义控件放在平移和缩放控件之间 [英] Place custom control between pan and zoom controls

查看:77
本文介绍了将自定义控件放在平移和缩放控件之间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有什么想法如何在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆