Commit b3bb3058 authored by codingman's avatar codingman

修改了移动动画最后定格帧,计算中心点位置修改

parent 2b481e32
......@@ -85,6 +85,10 @@
});
}
- (void)layoutSubviews{
NSLog(@"CustomSubview layoutSubviews");
}
- (void)setInfoWindowDisabled:(BOOL)disabled {
_canShowCallout = !disabled;
_annotationView.canShowCallout = !disabled;
......@@ -130,12 +134,12 @@
_annotationView.canShowCallout = _canShowCallout;
_annotationView.draggable = _draggable;
_annotationView.customCalloutView = _calloutView;
_annotationView.centerOffset = _centerOffset;
//设置中心点
CGPoint point = CGPointMake(0, -_customView.bounds.size.height/2);
_annotationView.centerOffset = point;
if (_zIndex) {
_annotationView.zIndex = _zIndex;
}
if (_image != nil) {
_annotationView.image = _image;
}
......
......@@ -53,7 +53,9 @@
_annotation.coordinate = coords[0];
_annotation.title = @"I can fly!";
if(_annotationView != nil) {
[_annotation addMoveAnimationWithKeyCoordinates:coords count:coordinates.count withDuration:_duration withName:nil completeCallback:^(BOOL isFinished) { }];
[_annotation addMoveAnimationWithKeyCoordinates:coords count:coordinates.count-1 withDuration:_duration withName:nil completeCallback:^(BOOL isFinished) {
}];
}
}
......@@ -111,7 +113,9 @@
for (NSUInteger i = 0; i < _coordinates.count; i++) {
coords[i] = _coordinates[i].coordinate;
}
[_annotation addMoveAnimationWithKeyCoordinates:coords count:_coordinates.count withDuration:_duration withName:nil completeCallback:^(BOOL isFinished) { }];
[_annotation addMoveAnimationWithKeyCoordinates:coords count:_coordinates.count-1 withDuration:_duration withName:nil completeCallback:^(BOOL isFinished) {
}];
[self setActive:_active];
}
return _annotationView;
......
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