| Programming with JViews Maps > Creating a Map Application Using the API > Writing a Data Source > Understanding the Data Source Backup Paradigm |
Understanding the Data Source Backup Paradigm |
INDEX
PREVIOUS
NEXT
|
The base class IlvMapDataSource includes a fallback mechanism to allow map reprojection and export even when associated source data (file, network path, database connection...) is not available at the time the map needs to be manipulated. For that mechanism to operate, a subclass of IlvMapDataSource must override the method isSourceDataAvailable() and perform appropriate checks on related data availability.
If this method returns false, the IlvMapDataSource tries to perform operations on the map (change of coordinate system, export) from the current map objects instead of reading them from the original source data. Note that this may lead to loss of precision or even data as this is the expected behavior when chaining-up several non-invertible projections.
Another way to force the use of a backup data source is by setting a flag using the method setForceUsingBackupDataSource(true). This will result in much faster operations (such as reprojection) as the source data is not read back from its original format. However, as mentioned above, this leads to potential precision or data loss.
Should you need to access directly these backup data sources of a given data source, you can do so by calling getBackupDataSources(). It returns an array of data sources of the class IlvGraphicLayerDataSource.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |