Personal tools
You are here: Home Members Joaquin del Cerro gvSIG Scripting - raster Notas 2 Patch gvsig.py

Patch to the [gvsig-install-folder]/gvSIG/extensiones/org.gvsig.scripting.extension/scripting/lib/gvsig.py

In the header of file, add the import:

from org.gvsig.fmap.mapcontext.layers.vectorial import FLyrVect

In the method "getLayer" of class "View", the last lines should be

ls = self.getLayers()
for i in xrange(ls.getLayersCount()):
  l = ls.getLayer(i)
  if l.name == name:
     if isinstance(layer, FLyrVect):
      return Layer(l)
     else:
      return l

return None

Changed the "return Layer(l)" by a "if" with a "isinstance".

Care with the indentation!

Whenever you modify this file you must restart gvSIG for the changes to take effect


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: