iOS_MovingAnnotation_Demo
iOS_MovingAnnotation_Demo copied to clipboard
使用2D地图 pointForMapPoint:这个方法不生效
使用2D地图 @interface MAMapView(Additional)
-(CGPoint)pointForMapPoint:(MAMapPoint)mapPoint; @end 这个方法不生效
@lxc1999110 2D地图没有这个接口,可以使用其他接口将MapPoint转换为屏幕坐标。具体可以咨询高德API团队。
关于这个问题 我已经找到了解决方案 用其他方式进行了替换
CLLocationCoordinate2D coo = BMKCoordinateForMapPoint(mappoint);
CGPoint center = [self.mapView convertCoordinate:coo toPointToView:self.mapView];
用这两句代码替换pointForMapPoint这个方法即可
CLLocationCoordinate2D coo = BMKCoordinateForMapPoint(mappoint); CGPoint center = [self.mapView convertCoordinate:coo toPointToView:self.mapView]; 这个方法还是不行啊,请问哪里还需要设置吗?