IlvShapeReader
. try { featureIterator = new IlvShapeFileReader(shapeFileName, dbfFileName); } catch (IOException e) { System.err.println("IOError while instantiating reader"); }
IlvFeatureRenderer renderer = featureIterator.getDefaultFeatureRenderer();
IlvCoordinateTransformation identity = IlvCoordinateTransformation.CreateTransformation(null, null);
IlvMapFeature feature = null; try { feature = featureIterator.getNextFeature(); } catch (IOException io) { System.err.println("IOExeption while getting next feature" +io.getMessage()); } // Loop on all the available map features. while (feature != null) { try {
IlvGraphic graphic = renderer.makeGraphic(feature, identity);
manager.addObject(graphic, layerIndex, false);
} catch (IlvMapRenderException e) { // Should not occur: renderer provided by the feature iterator. System.out.println("Rendering Exception " + e.getMessage()); } catch (IlvCoordinateTransformationException cte) { System.err.println("Coordinate transformation exception " + cte.getMessage()); } }