app/models/geographic_area.rb
# Find a centroid by scaling this object tree up to the first antecedent which provides a geographic_item, and
# provide a point on which to focus the map.  Return 'nil' if there are no GIs in the chain.
# @return [GeographicItem] a point.
Find a centroid by scaling this object tree up to the first antecedent which provides a geographic_item, and
provide a point on which to focus the map.  Return 'nil' if there are no GIs in the chain.
Find a centroid by scaling this object tree up to the first antecedent which provides a geographic_item and provide a point on which to focus the map . Return ' nil ' if there are no GIs in the chain .
def geographic_area_map_focus
    item = nil
    if geographic_items.count == 0
      item = parent.geographic_area_map_focus unless parent.nil?
    else
      item = GeographicItem.new(point: geographic_items.first.st_centroid)
    end
    item
  end
def geographic_area_map_focus item = nil if geographic_items . count == 0 item = parent . geographic_area_map_focus unless parent . nil? else item = GeographicItem . new ( point : geographic_items . first . st_centroid ) end item end
Find a centroid by scaling this object tree up to the first antecedent which provides a geographic_item, and
provide a point on which to focus the map.
Find a centroid by scaling this object tree up to the first antecedent which provides a geographic_item and provide a point on which to focus the map .
# this nil signals the top of the stack: Everything terminates at 'Earth'
None
GeographicItem