class ADIWG::Mdtranslator::Writers::Html::Html_GeometryObject

Public Class Methods

new(html) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_geometryObject.rb, line 14
def initialize(html)
   @html = html
end

Public Instance Methods

writeHtml(hObject) click to toggle source
# File lib/adiwg/mdtranslator/writers/html/sections/html_geometryObject.rb, line 18
def writeHtml(hObject)

   # geometry object - coordinates
   unless hObject[:coordinates].nil?
      @html.details do
         @html.summary('Coordinates', 'class' => 'h5')
         @html.section(:class => 'block') do
            @html.text!(hObject[:coordinates].to_s)
         end
      end
   end

   # geographic element - native GeoJson
   unless hObject[:nativeGeoJson].empty?
      @html.details do
         @html.summary('GeoJson', 'class' => 'h5')
         @html.section(:class => 'block') do
            @html.text!(hObject[:nativeGeoJson].to_json)
         end
      end
   end

end