Using the IlvVMAPDataSource class to create vector data

To read VMAP features using the IlvVMAPDataSource: object:
  1. Create an IlvVMAPDataSource. Note that the path of the VMAP library, not the path of the database, must be passed to the constructor:
    String libraryPath = ":/VMAP/vmaplv0/eurnasia";
    IlvVMAPDataSource VMAPSource = new IlvVMAPDataSource(libraryPath);
    
    // connect this data source with the manager of the view
    VMAPSource.setManager(getView().getManager());
    
  2. Select the map features you want to read by specifying the FACC codes for those features (for further information about FACC codes, refer to the VMAP format specification). For instance, to read only roads, you can use:
    VMAPSource.setFaccCodeList(new String[]{"AP030"});
    
  3. Specify the area of interest (in degrees). Only features in this area are read:
    VMAPSource.setAreaOfinterest(Math.toRadians(0),Math.toRadians(30),
      Math.toRadians(15),Math.toRadians(45));
    
  4. Choose whether to use load-on-demand. This is useful when you specify a large area of interest but want to display only a small part of it:
    boolean useTiling = true;
    int rowCount = 5;
    int columnCount = 5;
    VMAPSource.setTilingParameters(useTiling, rowCount, columnCount);
    
  5. Finally, start the VMAP data source:
    VMAPSource.start();
    
For further information, see: