我想在google地图的中心修复移动的自定义imageview标记,而不管位置坐标如何。如果用户在地图上随车移动,我希望它继续显示在中心而没有任何闪烁的标记和该标记上的新位置显示,如果可能那么我该怎么做?请帮忙。谢谢 我在地图上使用此代码显示:
UIImageView *sampleImgView = [[UIImageView alloc]init];
sampleImgView.center = myMapView.center;
sampleImgView.backgroundColor = [UIColor clearColor];
[myMapView addSubview:sampleImgView];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.8f];
sampleImgView.transform = CGAffineTransformMakeRotation(45);
[UIView commitAnimations];
[UIView beginAnimations:nil context:nil];
[UIView setAnimationDuration:0.3f];
sampleImgView.transform = CGAffineTransformMakeRotation(0);
[UIView commitAnimations];
CGPoint ImgCenter = sampleImgView.center;
CGRect frameRect = sampleImgView.frame;
frameRect.size.width = 30.0f;
frameRect.size.height = 30.0f;
sampleImgView.image = [UIImage imageNamed:@"car.png"]; // place your own vehicle image
sampleImgView.center = ImgCenter;
sampleImgView.frame = frameRect;
i am using iOS google map sdk(objective-c)