

from org.gvsig.fmap.mapcontext import MapContext as JMapContext


def __call(self):
  return self

def __iter(self):
    return self.getLayers().__iter__()

def __len(self):
  return self.getLayers().getLayersCount()

def __getitem(self, index):
  return self.getLayers().getLayer(index)
  
#
# Inject new methods in the class JMapContext
#

JMapContext.__call__ = __call
JMapContext.__iter__ = __iter
JMapContext.__len__ = __len
JMapContext.__getitem__ = __getitem

