Revision 1848 branches/Fmap_GisPlanet/libraries/libFMap/src/com/iver/cit/gvsig/fmap/demo/MapImage.java
MapImage.java | ||
---|---|---|
50 | 50 |
|
51 | 51 |
import org.cresques.cts.ProjectionPool; |
52 | 52 |
|
53 |
|
|
53 |
import com.hardcode.driverManager.DriverLoadException; |
|
54 | 54 |
import com.iver.cit.gvsig.fmap.DriverException; |
55 | 55 |
import com.iver.cit.gvsig.fmap.MapControl; |
56 |
import com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver; |
|
56 | 57 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
57 | 58 |
import com.iver.cit.gvsig.fmap.layers.LayerFactory; |
58 | 59 |
import com.iver.cit.gvsig.fmap.tools.ZoomInListenerImpl; |
... | ... | |
104 | 105 |
"C:\\eclipse3\\workspace\\Andami\\gvSIG\\extensiones\\com.iver.cit.gvsig\\drivers"); |
105 | 106 |
|
106 | 107 |
try { |
107 |
FLayer l = LayerFactory.createLayer("Vias", "gvSIG shp driver", |
|
108 |
FLayer l = LayerFactory.createLayer("Vias", |
|
109 |
(VectorialFileDriver) LayerFactory.getDM().getDriver("gvSIG shp driver"), |
|
108 | 110 |
new File("C:/Documents and Settings/fernando/Mis documentos/vias.shp"), |
109 | 111 |
ProjectionPool.get("EPSG:23030")); |
110 | 112 |
newMapControl.getMapContext().getLayers().addLayer(l); |
... | ... | |
112 | 114 |
newMapControl.setTool("zoom"); |
113 | 115 |
} catch (DriverException e) { |
114 | 116 |
e.printStackTrace(); |
117 |
} catch (DriverLoadException e) { |
|
118 |
e.printStackTrace(); |
|
115 | 119 |
} |
116 | 120 |
|
117 | 121 |
|
Also available in: Unified diff