Class: Kamelopard::PhotoOverlay

Inherits:
Overlay show all
Includes:
ImagePyramid, ViewVolume
Defined in:
lib/kamelopard/classes.rb

Overview

Corresponds to KML’s PhotoOverlay class

Instance Attribute Summary collapse

Attributes included from ImagePyramid

#gridOrigin, #maxHeight, #maxWidth, #tileSize

Attributes included from ViewVolume

#bottomFov, #leftFov, #near, #rightFov, #topFov

Attributes inherited from Overlay

#color, #drawOrder

Attributes included from Icon

#h, #href, #httpQuery, #refreshInterval, #refreshMode, #viewBoundScale, #viewFormat, #viewRefreshMode, #viewRefreshTime, #w, #x, #y

Attributes inherited from Feature

#abstractView, #addressDetails, #atom_author, #atom_link, #description, #extendedData, #metadata, #name, #open, #phoneNumber, #region, #snippet, #styleSelector, #styleUrl, #styles, #timeprimitive, #visibility

Attributes included from Snippet

#maxLines, #snippet_text

Attributes inherited from Object

#comment, #kml_id

Instance Method Summary collapse

Methods included from ImagePyramid

#imagePyramid_to_kml

Methods included from ViewVolume

#viewVolume_to_kml

Methods included from Icon

#icon_to_kml

Methods inherited from Feature

add_author, #hide, #show, #styles_to_kml, #timespan, #timespan=, #timestamp, #timestamp=

Methods included from Snippet

#snippet_to_kml

Methods inherited from Object

#change

Constructor Details

#initialize(options = {}) ⇒ PhotoOverlay

Returns a new instance of PhotoOverlay.



1570
1571
1572
# File 'lib/kamelopard/classes.rb', line 1570

def initialize(options = {})
    super
end

Instance Attribute Details

#pointObject

Returns the value of attribute point.



1565
1566
1567
# File 'lib/kamelopard/classes.rb', line 1565

def point
  @point
end

#rotationObject

Returns the value of attribute rotation.



1565
1566
1567
# File 'lib/kamelopard/classes.rb', line 1565

def rotation
  @rotation
end

#shapeObject

Returns the value of attribute shape.



1565
1566
1567
# File 'lib/kamelopard/classes.rb', line 1565

def shape
  @shape
end

Instance Method Details

#to_kml(elem = nil) ⇒ Object



1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
# File 'lib/kamelopard/classes.rb', line 1582

def to_kml(elem = nil)
    p = XML::Node.new 'PhotoOverlay'
    super p
    viewVolume_to_kml p
    imagePyramid_to_kml p
    p << @point.to_kml(nil, true)
    {
        :rotation => @rotation,
        :shape => @shape
    }.each do |k, v|
        d = XML::Node.new k.to_s
        d << v.to_s
        p << d
    end
    elem << p unless elem.nil?
    p
end