lib/map-kit-wrapper/zoom_level.rb
def set_center_coordinates(center_coordinate, zoom_level, animated = false)
      # clamp large numbers to 18
      zoom_level = [zoom_level, 18].min

      # use the zoom level to compute the region
      span = self.class.coordinate_span_with_map_view(self, center_coordinate, zoom_level)
      region = CoordinateRegion.new(center_coordinate, span)

      # set the region like normal
      self.setRegion(region.api, animated: animated)
    end
def set_center_coordinates(center_coordinate, zoom_level, animated = false)
      # clamp large numbers to 18
      zoom_level = [zoom_level, 18].min

      # use the zoom level to compute the region
      span = self.class.coordinate_span_with_map_view(self, center_coordinate, zoom_level)
      region = CoordinateRegion.new(center_coordinate, span)

      # set the region like normal
      self.setRegion(region.api, animated: animated)
    end
def set_center_coordinates ( center_coordinate , zoom_level , animated = false ) # clamp large numbers to 18 zoom_level = [ zoom_level , 18 ] . min # use the zoom level to compute the region span = self . class . coordinate_span_with_map_view ( self , center_coordinate , zoom_level ) region = CoordinateRegion . new ( center_coordinate , span ) # set the region like normal self . setRegion ( region . api , animated : animated ) end
Set the views center coordinates with a given zoom level

 * *Args*    :
   - +center_coordinate+ -> A MKMapPoint
   - +zoom_level+ -> Zoom level as Int
   - +animated+ -> bool
Set the views center coordinates with a given zoom level