Class: PhotoOverlay
- Defined in:
- lib/kamelopard/classes.rb
Overview
Corresponds to KML’s PhotoOverlay class
Instance Attribute Summary collapse
-
#imagepyramid ⇒ Object
Returns the value of attribute imagepyramid.
-
#point ⇒ Object
Returns the value of attribute point.
-
#rotation ⇒ Object
Returns the value of attribute rotation.
-
#shape ⇒ Object
Returns the value of attribute shape.
-
#viewvolume ⇒ Object
Returns the value of attribute viewvolume.
Attributes inherited from Overlay
Attributes inherited from Feature
#abstractView, #addressDetails, #atom_author, #atom_link, #description, #extendedData, #metadata, #name, #open, #phoneNumber, #region, #snippet, #styleSelector, #styleUrl, #styles, #timeprimitive, #visibility
Attributes inherited from KMLObject
Instance Method Summary collapse
-
#initialize(icon, point, rotation = 0, viewvolume = nil, imagepyramid = nil, shape = :rectangle) ⇒ PhotoOverlay
constructor
A new instance of PhotoOverlay.
- #to_kml(indent = 0) ⇒ Object
Methods inherited from Feature
#styles_to_kml, #timespan, #timespan=, #timestamp, #timestamp=
Constructor Details
#initialize(icon, point, rotation = 0, viewvolume = nil, imagepyramid = nil, shape = :rectangle) ⇒ PhotoOverlay
Returns a new instance of PhotoOverlay.
1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 |
# File 'lib/kamelopard/classes.rb', line 1390 def initialize(icon, point, rotation = 0, viewvolume = nil, imagepyramid = nil, shape = :rectangle) super(icon) if point.respond_to?('point') @point = point.point else @point = point end @rotation = rotation @viewVolume = viewvolume @imagePyramid = imagepyramid @shape = shape end |
Instance Attribute Details
#imagepyramid ⇒ Object
Returns the value of attribute imagepyramid.
1388 1389 1390 |
# File 'lib/kamelopard/classes.rb', line 1388 def imagepyramid @imagepyramid end |
#point ⇒ Object
Returns the value of attribute point.
1388 1389 1390 |
# File 'lib/kamelopard/classes.rb', line 1388 def point @point end |
#rotation ⇒ Object
Returns the value of attribute rotation.
1388 1389 1390 |
# File 'lib/kamelopard/classes.rb', line 1388 def rotation @rotation end |
#shape ⇒ Object
Returns the value of attribute shape.
1388 1389 1390 |
# File 'lib/kamelopard/classes.rb', line 1388 def shape @shape end |
#viewvolume ⇒ Object
Returns the value of attribute viewvolume.
1388 1389 1390 |
# File 'lib/kamelopard/classes.rb', line 1388 def viewvolume @viewvolume end |
Instance Method Details
#to_kml(indent = 0) ⇒ Object
1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 |
# File 'lib/kamelopard/classes.rb', line 1403 def to_kml(indent = 0) k = "#{ ' ' * indent }<PhotoOverlay>\n" k << super(indent + 4) k << @viewVolume.to_kml(indent + 4) unless @viewVolume.nil? k << @imagePyramid.to_kml(indent + 4) unless @imagePyramid.nil? k << @point.to_kml(indent + 4, true) k << "#{ ' ' * indent } <rotation>#{ @rotation }</rotation>\n" k << "#{ ' ' * indent } <shape>#{ @shape }</shape>\n" k << "#{ ' ' * indent }</PhotoOverlay>\n" end |