问题
I'm using the Here Android SDK API. I set position indicator via:
positionManager.start(PositioningManager.LocationMethod.GPS_NETWORK);
map.getPositionIndicator().setVisible(true);
map.getPositionIndicator().setAccuracyIndicatorVisible(true);
together with NavigationManager:
navMngr.setMapUpdateMode(NavigationManager.MapUpdateMode.ROADVIEW);
My map use isometric view:
clusterMap.setTilt(60);
Thats works, but position indicator apears at the center of the screen. I need to set some offset (or padding) in order to display position indicator way below the center (some offset or padding), so driver could see more of the road ahead. Can't find anything for setting padding for position indicator and binding to view center (only for regular map markers).
Any help would be appreciated<
回答1:
Set the transform center of the map at the screen position where you want the user position to be at. That is how we accomplish it.
回答2:
to achive navigation look and view set transform center to lower than center
PointF pc = m_map.getTransformCenter();
PointF pointF = new PointF(pc.x,pc.y* 85/50);
m_map.setTransformCenter(pointF);
来源:https://stackoverflow.com/questions/43325005/here-api-offset-map-center