Revision 13074 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLayers.java
FLayers.java | ||
---|---|---|
960 | 960 |
// } catch (MalformedURLException e) { |
961 | 961 |
// throw new XMLException(e); |
962 | 962 |
// } |
963 |
} else if (className.equals((FLyrRaster.class.getName()))) { |
|
964 |
//if (xml.getChild(i).contains("file")) { |
|
965 |
/*layer = LayerFactory.createLayer(s[i], |
|
966 |
xml.getChild(i).getStringProperty("driverName"), |
|
967 |
new File(xml.getChild(i).getStringProperty("file")), |
|
968 |
this.getFMap().getViewPort().getProjection());*/ |
|
969 |
layer = new FLyrRaster(); |
|
970 |
layer.setName(s[i]); |
|
971 |
if (!xml.getChild(i).contains("proj")) |
|
972 |
((FLyrRaster)layer).setProjection(this.getMapContext().getViewPort().getProjection()); |
|
973 |
layer.setXMLEntity03(xml.getChild(i)); |
|
974 |
layer.load(); |
|
975 |
|
|
976 |
}else if (className.equals((FLayers.class.getName()))) { |
|
963 |
} else if (className.equals((FLayers.class.getName()))) { |
|
977 | 964 |
layer = new FLayers(getMapContext(),this); |
978 | 965 |
layer.setXMLEntity(xml.getChild(i)); |
979 | 966 |
} else { |
... | ... | |
992 | 979 |
|
993 | 980 |
this.addLayer(layer); |
994 | 981 |
} |
995 |
} /*azabala-modificaciones en layerfactory- |
|
996 |
catch (DriverException e) { |
|
997 |
throw new XMLException(e); |
|
998 |
}*/ |
|
982 |
} |
|
999 | 983 |
catch (DriverLoadException e) { |
1000 | 984 |
throw new XMLException(e); |
1001 |
} catch (LoadLayerException e) { |
|
1002 |
throw new XMLException(e); |
|
1003 |
} |
|
985 |
} |
|
1004 | 986 |
|
1005 | 987 |
} |
1006 | 988 |
|
... | ... | |
1389 | 1371 |
|
1390 | 1372 |
layer.setXMLEntity(xml); |
1391 | 1373 |
|
1392 |
// } else if (className.equals(FLyrWMS.class.getName())) { |
|
1393 |
// try { |
|
1394 |
// layer = LayerFactory.createLayer(s[i], |
|
1395 |
// StringUtilities.string2Rect( |
|
1396 |
// xml.getChild(i).getStringProperty("fullExtent")), |
|
1397 |
// new URL(xml.getChild(i).getStringProperty("host")), |
|
1398 |
// xml.getChild(i).getStringProperty("format"), |
|
1399 |
// xml.getChild(i).getStringProperty("layerQuery"), |
|
1400 |
// xml.getChild(i).getStringProperty("infoLayerQuery"), |
|
1401 |
// xml.getChild(i).getStringProperty("srs")); |
|
1402 |
// layer.setXMLEntity(xml.getChild(i)); |
|
1403 |
// } catch (MalformedURLException e) { |
|
1404 |
// throw new XMLException(e); |
|
1405 |
// } |
|
1406 |
} else if (className.equals((FLyrRaster.class.getName()))) { |
|
1407 |
//if (xml.getChild(i).contains("file")) { |
|
1408 |
/*layer = LayerFactory.createLayer(s[i], |
|
1409 |
xml.getChild(i).getStringProperty("driverName"), |
|
1410 |
new File(xml.getChild(i).getStringProperty("file")), |
|
1411 |
this.getFMap().getViewPort().getProjection());*/ |
|
1412 |
layer = new FLyrRaster(); |
|
1413 |
layer.setName(name); |
|
1414 |
if (!xml.contains("proj")) |
|
1415 |
((FLyrRaster)layer).setProjection(this.getMapContext().getViewPort().getProjection()); |
|
1416 |
layer.setXMLEntity(xml); |
|
1417 |
layer.load(); |
|
1418 |
|
|
1419 |
}else if (className.equals((FLayers.class.getName()))) { |
|
1374 |
} else if (className.equals((FLayers.class.getName()))) { |
|
1420 | 1375 |
layer = new FLayers(getMapContext(),this); |
1421 | 1376 |
layer.setXMLEntity(xml); |
1422 | 1377 |
} else { |
Also available in: Unified diff