谷歌地图Xamarin:移动指南针按钮 [英] Google maps Xamarin : moving the compass button
问题描述
我可以将指南针按钮移动到其他位置吗?
Can I move compass button to a different location ?
在顶部,我有菜单,它涵盖了我的指南针
On top I have menu and that covers my compass
推荐答案
您不能为这些控件选择任意位置,但是可以设置填充以将控件从边框移开以允许控件.
You can not pick arbitrary positions for those controls, but you can set the padding to move the controls away from the border to allow for your controls.
googleMap.SetPadding(0,30,0,0);
此方法允许您在地图上定义可见区域,通过在地图的四个边缘中的每一个上设置填充来向地图发送信号,告知地图边缘附近的部分可能被遮盖.地图功能将适应填充.例如,缩放控件,指南针,版权声明和Google徽标将被移动以适合定义的区域,相机的移动将相对于可见区域的中心,等等.
This method allows you to define a visible region on the map, to signal to the map that portions of the map around the edges may be obscured, by setting padding on each of the four edges of the map. Map functions will be adapted to the padding. For example, the zoom controls, compass, copyright notices and Google logo will be moved to fit inside the defined region, camera movements will be relative to the center of the visible region, etc.
注意:请记住不要遮盖Google版权声明,因为这违反了他们的服务条款,并会导致商店被拒绝...
Note: Just remember not to cover the Google Copyright notice as that is against their TOS and will cause a Store rejection...
这篇关于谷歌地图Xamarin:移动指南针按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!