i set custom annotation pin in map on the click of annotation i get call for this method
(void)mapView:(MKMapView *)mapView didSelectAnnotationView:(MKAnnotationView *)view NS_AVAILABLE(NA, 4_0)
in that method i want to open popover so i want frame form (MKAnnotationView *)view i get right frame while map in normal mode.
but when i zoom map and click on annotation at that time i get wrong frame at that time the x and y value is big, so any solution for that any offset or zoom factor i get so i divide according to that so i get actual frame of annotation.
Google Maps - cannot zoom and move at the same time with animateCamera, but can with moveCamera. Bookmark this question.
To fix Google maps zooming problems, for Google maps default zoom you want to know how to change the zoom level on Google Maps. You can change the zoom level by going to the Edit map page and then selecting 'default zoom level' in the map information section and then clicking save map.
Try this:
CGPoint annotationPoint = [mapView convertCoordinate:view.annotation.coordinate
toPointToView:mapView];
float boxDY = annotationPoint.y - 35;
float boxDX = annotationPoint.x - 1;
CGRect box = CGRectMake(boxDX, boxDY, 1, 1);
[popoverControllerDetail presentPopoverFromRect:box
inView:mapView
permittedArrowDirections:(UIPopoverArrowDirectionDown|
UIPopoverArrowDirectionLeft|
UIPopoverArrowDirectionRight)
animated:YES];
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With