Class: KML::Icon
Overview
Defines an image associated with an Icon style or overlay. Icon has the same child elements as Link. The required href defines the location of the image to be used as the overlay or as the icon for the placemark. This location can either be on a local file system or a remote web server.
Instance Attribute Summary
Attributes inherited from Link
#href, #http_query, #refresh_interval, #refresh_mode, #view_bound_scale, #view_format, #view_refresh_mode, #view_refresh_time
Attributes inherited from Object
Instance Method Summary collapse
Methods inherited from Object
Constructor Details
This class inherits a constructor from KML::Object
Instance Method Details
#render(xm = Builder::XmlMarkup.new(:indent => 2)) ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'lib/kml/icon.rb', line 6 def render(xm=Builder::XmlMarkup.new(:indent => 2)) raise InvalidKMLError, "Icon.href must be specified" if href.nil? xm.Icon { self.elements.each do |a| xm.__send__(a, self.__send__(a)) unless self.__send__(a).nil? end } end |