If I create a new view of a map named mymap for example, using Menu > View > New map view, and then in groovy I type,
def s = []
c.getOpenMaps().each { map ->
s.add(map.name)
}
javax.swing.JOptionPane.showMessageDialog(null, s.join('\n'));
the list of maps that will be displayed with contain 2 times the same name for mymap,
mymap<2>
mymap<2>
but it should be
mymap
mymap<2>
because of that one my script fails to find a map because I created a new view of it.
Also if more than 2 views would be created, let's say 3 (I tested with 3) then the list of map names would be:
mymap<2>
mymap<2>
mymap<2>
which is really is wrong, it should be:
mymap
mymap<2>
mymap<3>
preview 1.9.8_04
Now only different maps are returned even if some maps have more than one view