lib/bplmodels/geographic_data_funcs.rb
def bbox_dateline_fix(min_x, max_x)
        if min_x > 0
          degrees_to_add = 180 - min_x
          min_x = -(180 + degrees_to_add)
        elsif min_x < 0 && max_x < 0
          degrees_to_add = 180 + max_x
          max_x = 180 + degrees_to_add
        else
          Rails.logger.error("This bbox format was not parsed correctly: '#{coords}'")
        end
        [min_x, max_x]
      end
##
# if this bbox crosses the dateline (min_x > max_x), have to adjust latitude values
# so that bbox overlay displays properly in blacklight-maps views (Leaflet)
# @param min_x [Float] minimum longitude
# @param max_x [Float] maximum longitude
# @return [Array]
if this bbox crosses the dateline (min_x > max_x), have to adjust latitude values
so that bbox overlay displays properly in blacklight-maps views (Leaflet)
if this bbox crosses the dateline ( min_x > max_x ) have to adjust latitude values so that bbox overlay displays properly in blacklight - maps views ( Leaflet )
def bbox_dateline_fix(min_x, max_x)
        if min_x > 0
          degrees_to_add = 180 - min_x
          min_x = -(180 + degrees_to_add)
        elsif min_x < 0 && max_x < 0
          degrees_to_add = 180 + max_x
          max_x = 180 + degrees_to_add
        else
          Rails.logger.error("This bbox format was not parsed correctly: '#{coords}'")
        end
        [min_x, max_x]
      end
def bbox_dateline_fix ( min_x , max_x ) if min_x > 0 degrees_to_add = 180 - min_x min_x = - ( 180 + degrees_to_add ) elsif min_x < 0 && max_x < 0 degrees_to_add = 180 + max_x max_x = 180 + degrees_to_add else Rails . logger . error ( "This bbox format was not parsed correctly: '#{coords}'" ) end [ min_x , max_x ] end
if this bbox crosses the dateline (min_x > max_x), have to adjust latitude values
so that bbox overlay displays properly in blacklight-maps views (Leaflet)
if this bbox crosses the dateline ( min_x > max_x ) have to adjust latitude values so that bbox overlay displays properly in blacklight - maps views ( Leaflet )
None
Array
min_x
None
max_x
None