Class: Lod

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

Overview

Corresponds to the LOD (Level of Detail) object

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(minpixels, maxpixels, minfade, maxfade) ⇒ Lod

Returns a new instance of Lod.



1525
1526
1527
1528
1529
1530
# File 'lib/kamelopard/classes.rb', line 1525

def initialize(minpixels, maxpixels, minfade, maxfade)
    @minpixels = minpixels
    @maxpixels = maxpixels
    @minfade = minfade
    @maxfade = maxfade
end

Instance Attribute Details

#maxfadeObject

Returns the value of attribute maxfade.



1524
1525
1526
# File 'lib/kamelopard/classes.rb', line 1524

def maxfade
  @maxfade
end

#maxpixelsObject

Returns the value of attribute maxpixels.



1524
1525
1526
# File 'lib/kamelopard/classes.rb', line 1524

def maxpixels
  @maxpixels
end

#minfadeObject

Returns the value of attribute minfade.



1524
1525
1526
# File 'lib/kamelopard/classes.rb', line 1524

def minfade
  @minfade
end

#minpixelsObject

Returns the value of attribute minpixels.



1524
1525
1526
# File 'lib/kamelopard/classes.rb', line 1524

def minpixels
  @minpixels
end

Instance Method Details

#to_kml(indent = 0) ⇒ Object



1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
# File 'lib/kamelopard/classes.rb', line 1532

def to_kml(indent = 0)

    <<-lod
#{ ' ' * indent }<Lod>
#{ ' ' * indent }    <minLodPixels>#{ @minpixels }</minLodPixels>
#{ ' ' * indent }    <maxLodPixels>#{ @maxpixels }</maxLodPixels>
#{ ' ' * indent }    <minFadeExtent>#{ @minfade }</minFadeExtent>
#{ ' ' * indent }    <maxFadeExtent>#{ @maxfade }</maxFadeExtent>
#{ ' ' * indent }</Lod>
    lod
end