Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
167 views
in Technique[技术] by (71.8m points)

android - How to shift HERE Map View to the right when navigating

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.

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

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.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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.

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...