Module: Kamelopard::ImagePyramid

Included in:
PhotoOverlay
Defined in:
lib/kamelopard/classes.rb

Overview

Supporting module for the PhotoOverlay class

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#gridOriginObject

Returns the value of attribute gridOrigin.



1932
1933
1934
# File 'lib/kamelopard/classes.rb', line 1932

def gridOrigin
  @gridOrigin
end

#maxHeightObject

Returns the value of attribute maxHeight.



1932
1933
1934
# File 'lib/kamelopard/classes.rb', line 1932

def maxHeight
  @maxHeight
end

#maxWidthObject

Returns the value of attribute maxWidth.



1932
1933
1934
# File 'lib/kamelopard/classes.rb', line 1932

def maxWidth
  @maxWidth
end

#tileSizeObject

Returns the value of attribute tileSize.



1932
1933
1934
# File 'lib/kamelopard/classes.rb', line 1932

def tileSize
  @tileSize
end

Instance Method Details

#imagePyramid_to_kml(elem = nil) ⇒ Object



1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
# File 'lib/kamelopard/classes.rb', line 1934

def imagePyramid_to_kml(elem = nil)
    @tileSize = 256 if @tileSize.nil?
    p = XML::Node.new 'ImagePyramid'
    {
        :tileSize => @tileSize,
        :maxWidth => @maxWidth,
        :maxHeight => @maxHeight,
        :gridOrigin => @gridOrigin
    }.each do |k, v|
        d = XML::Node.new k.to_s
        v = 0 if v.nil?
        d << v.to_s
        p << d
    end
    elem << p unless elem.nil?
    p
end