module NSWTopo::Formats::Kmz

Constants

EARTH_RADIUS
FOV
TILE_SIZE
TILT

Public Instance Methods

lat_lon_box(bounds) click to toggle source
# File lib/nswtopo/formats/kmz.rb, line 18
def lat_lon_box(bounds)
  lambda do |box|
    [%w[west east south north], bounds.flatten].transpose.each do |limit, value|
      box.add_element(limit).text = value
    end
  end
end
region(bounds, topmost = false) click to toggle source
# File lib/nswtopo/formats/kmz.rb, line 26
def region(bounds, topmost = false)
  lambda do |region|
    region.add_element("Lod").tap do |lod|
      lod.add_element("minLodPixels").text = topmost ? 0 : TILE_SIZE / 2
      lod.add_element("maxLodPixels").text = -1
    end
    region.add_element("LatLonAltBox").tap(&lat_lon_box(bounds))
  end
end
style() click to toggle source
# File lib/nswtopo/formats/kmz.rb, line 10
def style
  lambda do |style|
    style.add_element("ListStyle", "id" => "hideChildren").tap do |list_style|
      list_style.add_element("listItemType").text = "checkHideChildren"
    end
  end
end