Commit e398c156 authored by 放牛的园子's avatar 放牛的园子

调整仅仅在有centerOffset值的时候,使用默认0,0,其他时候采用自动计算下边框中点

parent bbc2c158
......@@ -135,8 +135,14 @@
_annotationView.draggable = _draggable;
_annotationView.customCalloutView = _calloutView;
//设置中心点
CGPoint point = CGPointMake(0, -_customView.bounds.size.height/2);
_annotationView.centerOffset = point;
if(_centerOffset.x == 0 && _centerOffset.y == 0)
{
CGPoint point = CGPointMake(0, -_customView.bounds.size.height/2);
_annotationView.centerOffset = point;
} else
{
_annotationView.centerOffset = CGPointMake(0, 0);
}
if (_zIndex) {
_annotationView.zIndex = _zIndex;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment