0

I want to fix the moving custom imageview marker in the center of the google map irrespective of the location coordinates. If the user move with car on map I want it to keep showing up in the center without any flickering in marker and new location on that marker shows,If it is possible then How can I do that? Please help out. Thanks I am using this code display on Map:

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)
  • see [this](http://stackoverflow.com/questions/33009004/fixed-marker-on-center-of-google-map-ios-sdk) and [this](http://stackoverflow.com/questions/16686795/ios-google-maps-sdk-gmsmarker-positioning) it helps ypu – Anbu.Karthik Jul 11 '16 at 05:56
  • ur probkem is resolved on not – Anbu.Karthik Jul 11 '16 at 06:11
  • not solved because i am using custom marker(UIImageView). I am not using GMSmarker. – Anil Kumar Reddy Jul 11 '16 at 09:22
  • Please be more clear. How did you put the imageView marker on the map? Is it dynamic or static? The car denotes your current location or its a location you are getting via cloud? – Bharat Jul 11 '16 at 09:27

0 Answers0