下面的代碼CLLocation
真正hedding應該工作,並保持圖像的精確位置去的位置標記:
NTMarkerStyleBuilder *builder = [[NTMarkerStyleBuilder alloc]init];
// anchor 0,0 means that image is rotated from the center
// you may have different anchor point depending on graphics
[builder setAnchorPointX:0 anchorPointY:0];
self.positionMarker = [[NTMarker alloc] initWithPos:position style:[builder buildStyle]];
...
// rotate marker, depending on marker graphics
// "180-course" is ok if it is "arrow down"
// additional adjustment is for mapView rotation, image keeps
// here correct course even if map is rotated
double course = location.course;
[self.positionMarker setRotation: 180 - course - self.contentView.mapView.getRotation];
通常是的,點不能旋轉,所以你應該使用標記。請爲標記樣式(MarkerStyleBuilder)添加您的代碼示例,以便我們看到您必須獲取哪些參數值才能獲得真實的標記位置。特別是setAnchorPoint,它應該是0,0值。 – JaakL