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
network_link(bounds, path)
click to toggle source
# File lib/nswtopo/formats/kmz.rb, line 36 def network_link(bounds, path) lambda do |network| network.add_element("Region").tap(®ion(bounds)) network.add_element("Link").tap do |link| link.add_element("href").text = path link.add_element("viewRefreshMode").text = "onRegion" link.add_element("viewFormat") 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