Ensure map is centered when updating map extent (fix #6988)