add method to calculate center of map