移动谷歌地图指南针 [英] Moving the google maps compass

查看:100
本文介绍了移动谷歌地图指南针的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新的iOS版Google Maps SDK现在具有用于显示指南针的UI小部件.唯一的问题是我只看到将其打开或关闭的方法.您知道是否可以更改其在地图上的位置吗?

The new google maps SDK for iOS now has a UI widget for displaying a compass. The only problem is I only see methods to toggle it on or off. Do you know if it's possible to change it's position on the map?

https://developers.google.com/maps/documentation/ios/map#compass

推荐答案

-(void)viewDidAppear:(BOOL)animated{
mapView.padding = UIEdgeInsetsMake (64,0,0,0);
}

此代码将使指南针"按钮向下移动64像素.

This Code It will move Compass Button downward in 64 pixel.

这篇关于移动谷歌地图指南针的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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