Class: KML::Snippet
- Inherits:
-
Object
- Object
- KML::Snippet
- Defined in:
- lib/kml/snippet.rb
Overview
A short description of a feature. In Google Earth, this description is displayed in the Places panel under the name of the feature. If a Snippet is not supplied, the first two lines of the description are used. In Google Earth, if a Placemark contains both a description and a Snippet, the Snippet appears beneath the Placemark in the Places panel, and the description appears in the Placemark’s description balloon. This object does not support HTML markup.
Instance Attribute Summary collapse
-
#max_lines ⇒ Object
The maximum number of lines to display.
-
#text ⇒ Object
The text that is displayed (HTML not supported).
Instance Method Summary collapse
-
#initialize(text, max_lines = nil) ⇒ Snippet
constructor
Initialize the snippet with the given text and optionally with the given max_lines value.
Constructor Details
#initialize(text, max_lines = nil) ⇒ Snippet
Initialize the snippet with the given text and optionally with the given max_lines value.
15 16 17 18 |
# File 'lib/kml/snippet.rb', line 15 def initialize(text, max_lines=nil) @text = text @max_lines = max_lines end |
Instance Attribute Details
#max_lines ⇒ Object
The maximum number of lines to display. Default is 2
9 10 11 |
# File 'lib/kml/snippet.rb', line 9 def max_lines @max_lines end |
#text ⇒ Object
The text that is displayed (HTML not supported)
12 13 14 |
# File 'lib/kml/snippet.rb', line 12 def text @text end |