[Gvsig_desarrolladores] Cargar una capa por defecto en el localizador

David Deman 591267 en unizar.es
Mar Jun 11 10:23:01 CEST 2013


Buenas,
al final lo que estoy haciendo es una extensión que cuando le de me cargue
en el localizador las capas que tengo cargadas. Para cargarlas he hecho
esto:

com.iver.andami.ui.mdiManager.IWindow view =
PluginServices.getMDIManager().getActiveWindow();
if (!(view instanceof View))
return;
vista=(View)view;
loc = vista.getMapOverview();
for(int i=0;
i<vista.getMapControl().getMapContext().getLayers().getLayersCount() ; i++){
loc.getMapContext().getLayers().addLayer(vista.getMapControl().getMapContext().getLayers().getLayer(i).cloneLayer());
}
if (loc instanceof MapOverview){
      	((MapOverview)loc).refreshExtent();
}

Si se te ocurre cómo hacerlo de la otra manera, o alguna mejora ya me
contarás ;)



--
View this message in context: http://osgeo-org.1560.x6.nabble.com/Cargar-una-capa-por-defecto-en-el-localizador-tp5058189p5059319.html
Sent from the gvSIG desarrolladores mailing list archive at Nabble.com.


Más información sobre la lista de distribución gvSIG_desarrolladores