| Programming with JViews Maps > Creating a Map Application Using the API > Generic Code Sample for Creating a Map |
Generic Code Sample for Creating a Map |
INDEX
PREVIOUS
NEXT
|
This section steps you through the creation of a basic map using a generic code sample.
The complete source code for this example can be found in the following file:
<installdir>/jviews-maps81/codefragments/readers/src/GenericReader.java
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); |
IlvGraphic graphic = renderer.makeGraphic(feature, identity); |
manager.addObject(graphic, layerIndex, false); |
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |