Class: ImagePyramid

Inherits:
Object
  • Object
show all
Defined in:
lib/kamelopard/classes.rb

Overview

Supporting object for the PhotoOverlay class

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(maxWidth, maxHeight, gridOrigin, tileSize = 256) ⇒ ImagePyramid

Returns a new instance of ImagePyramid.



1366
1367
1368
1369
1370
1371
# File 'lib/kamelopard/classes.rb', line 1366

def initialize(maxWidth, maxHeight, gridOrigin, tileSize = 256)
    @tileSize = tileSize
    @maxWidth = maxWidth
    @maxHeight = maxHeight
    @gridOrigin = gridOrigin
end

Instance Attribute Details

#gridOriginObject

Returns the value of attribute gridOrigin.



1364
1365
1366
# File 'lib/kamelopard/classes.rb', line 1364

def gridOrigin
  @gridOrigin
end

#maxHeightObject

Returns the value of attribute maxHeight.



1364
1365
1366
# File 'lib/kamelopard/classes.rb', line 1364

def maxHeight
  @maxHeight
end

#maxWidthObject

Returns the value of attribute maxWidth.



1364
1365
1366
# File 'lib/kamelopard/classes.rb', line 1364

def maxWidth
  @maxWidth
end

#tileSizeObject

Returns the value of attribute tileSize.



1364
1365
1366
# File 'lib/kamelopard/classes.rb', line 1364

def tileSize
  @tileSize
end

Instance Method Details

#to_kml(indent = 0) ⇒ Object



1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
# File 'lib/kamelopard/classes.rb', line 1373

def to_kml(indent = 0)
    
    <<-imagepyramid
#{ ' ' * indent }<ImagePyramid>
#{ ' ' * indent }    <tileSize>#{@tileSize}</tileSize>
#{ ' ' * indent }    <maxWidth>#{@maxWidth}</maxWidth>
#{ ' ' * indent }    <maxHeight>#{@maxHeight}</maxHeight>
#{ ' ' * indent }    <gridOrigin>#{@gridOrigin}</gridOrigin>
#{ ' ' * indent }</ImagePyramid>
    imagepyramid
end