I just made this switch myself. I found that animateCamera()
is more versatile and allows for cleaner syntax.
The biggest pro for animateCamera()
is that you can do multiple animations from a single method call.
An example of centering to coords and turning the camera 180 degrees with animateCamera()
:
this.map.animateCamera({
center: {
latitude: 0,
longitude: 0,
},
heading: 180,
});
If you wanted to do the same thing with animateToRegion()
you would need to call two methods:
this.map.animateToRegion({
latitude: 0,
longitude: 0,
});
this.map.animateCamera({
heading: 180,
});
Not as clean.
As of right now, a con for animateCamera()
is that you don't seem to be able to pass a latitudeDelta
and longitudeDelta
into the center
property like you can with region, specified here.
In short, if you don't need to use a latitudeDelta
and longitudeDelta
then animateCamera()
is the way to go. If I had to speculate, I would say animateToRegion()
is going to be deprecated like the other methods sometime in the future in favor of animateCamera()
.