导航时如何将HERE Map View右移 [英] How to shift HERE Map View to the right when navigating

查看:77
本文介绍了导航时如何将HERE Map View右移的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用HERE SDK Android制作导航应用程序.在导航的中间,我想在左侧地图上方扩展一个覆盖视图.这将导致我的某些导航视图被切断.因此,我想将导航中心向右移动.这样,路线和我的箭头将移动到屏幕的右侧,在那里可以看到它们.

I am making a navigation application using HERE SDK Android. During the middle of navigation, I want to expand an overlayed view on top of my map on the left. This causes some of my navigation views to be cut off. So I want to shift the center of my navigation to the right. That way the route and my arrows will be shifted to the right of the screen where they can be seen.

是否可以使用HERE android SDK来完成此操作?

Is there a way to accomplish this using the HERE android SDK?

我尝试查看MapSchemes,但这似乎并没有满足我的要求.

I have tried looking at MapSchemes but this does not seem to do what I want.

我想更简洁地说,我想在导航期间将地图的中心点向右移动.

I think to put it more succinctly I want to shift my center point of the map to the right during navigation.

推荐答案

看看 Map 类中的 setTransformCenter .听起来像您要找的东西:

Have a look at setTransformCenter in the Map class. That sounds like what you are looking for:

设置地图变换(例如缩放)的中心坐标.调用此方法后执行的转换将基于这个新的中心坐标.转换中心可能与地图中心.开发人员不得使用此方法和setPadding(int,int,int,int),因为只有其中一个会被同时使用考虑到这一点,具体取决于调用顺序.

Sets a center coordinate for Map transformations such as zooming. Transformations performed after calling this method will be based on this new center coordinate. The transform center may be different than the Map center. Developer must not use this method and setPadding(int, int, int, int) at the same time as the only one of them will be taken into account, depending on the order of invocation.

请参见 https://developer.here.com/documentation/android-starter/api_reference_java/com/here/android/mpa/mapping/Map.html#setTransformCenter-android.graphics.PointF-

这篇关于导航时如何将HERE Map View右移的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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