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, #master_only

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, #extended_data_to_kml, #hide, #show, #styles_to_kml, #timespan, #timespan=, #timestamp, #timestamp=

Methods included from Snippet

#snippet_to_kml

Methods inherited from Object

#_alternate_to_kml, #change, #master_only?, parse

Constructor Details

#initialize(options = {}) ⇒ PhotoOverlay

Returns a new instance of PhotoOverlay.



2128
2129
2130
# File 'lib/kamelopard/classes.rb', line 2128

def initialize(options = {})
    super
end

Instance Attribute Details

#pointObject

Returns the value of attribute point.



2123
2124
2125
# File 'lib/kamelopard/classes.rb', line 2123

def point
  @point
end

#rotationObject

Returns the value of attribute rotation.



2123
2124
2125
# File 'lib/kamelopard/classes.rb', line 2123

def rotation
  @rotation
end

#shapeObject

Returns the value of attribute shape.



2123
2124
2125
# File 'lib/kamelopard/classes.rb', line 2123

def shape
  @shape
end

Instance Method Details

#to_kml(elem = nil) ⇒ Object



2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
# File 'lib/kamelopard/classes.rb', line 2140

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