Class: Mappum::MapServer::MapTable

Inherits:
Object
  • Object
show all
Defined in:
lib/mappum/mapserver/maptable.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(map) ⇒ MapTable

Returns a new instance of MapTable.



6
7
8
9
10
11
12
13
14
15
# File 'lib/mappum/mapserver/maptable.rb', line 6

def initialize(map)
  unless map.normalized?
     raise "Tables are for unidirectional maps only"
  end
  @edge_maps = {}
  
  @max_llevel, @max_rlevel = 0, 0
  findMaxLevel(map)
  @table = "<TABLE BORDER=1 CELLPADDING=3 CELLSPACING=1 RULES=ALL FRAME=BOX>" + getRowsFrom(map).join("\n") + "</TABLE>"
end

Instance Attribute Details

#edge_mapsObject (readonly)

Returns the value of attribute edge_maps.



4
5
6
# File 'lib/mappum/mapserver/maptable.rb', line 4

def edge_maps
  @edge_maps
end

Instance Method Details

#getHtmlObject



16
17
18
# File 'lib/mappum/mapserver/maptable.rb', line 16

def getHtml()
  return @table
end