ilog.views.maps.tiling
Class IlvRegionOfInterestTileLoader

java.lang.Object
  extended by ilog.views.maps.format.IlvMapTileLoader
      extended by ilog.views.maps.tiling.IlvRegionOfInterestTileLoader
All Implemented Interfaces:
IlvPersistentObject, IlvTileLoader

public class IlvRegionOfInterestTileLoader
extends IlvMapTileLoader

IlvRegionOfInterestTileLoader implements a tile loader that loads data from a tilable database on demand. This class relies on an IlvMapRegionOfInterestIterator instance whose region of interest is set according to tile bounds.

Since:
JViews 7.5

Constructor Summary
IlvRegionOfInterestTileLoader(IlvInputStream stream)
          Constructs a tile loader from serialized data.
IlvRegionOfInterestTileLoader(IlvMapRegionOfInterestIterator reader, boolean usingGeodeticComputation)
          Creates an IlvRegionOfInterestTileLoader instance that will delegate data extraction to a specific IlvMapRegionOfInterestIterator object.
 
Method Summary
static IlvMapStyle createDefaultFeatureStyle(Class geometryClass)
          Deprecated.  
 IlvFeatureRenderer getDefaultFeatureRenderer()
          Returns the default feature renderer used to render the map features of this tile.
 IlvMapFeatureIterator getFeatureIterator(IlvTile tile)
          Returns an IlvMapFeatureIterator used to iterate over map features within the bounds of the tiles specified.
 boolean isPersistent()
          Tests if this tile loader can be saved.
protected  boolean isUsingGeodeticComputation()
          Indicates if this tile loader should use geodetic computation.
 void load(IlvTile tile)
          Method called when a tile has to be loaded.
 void write(IlvOutputStream stream)
          Writes this tile loader to a specific IlvOutputStream.
 
Methods inherited from class ilog.views.maps.format.IlvMapTileLoader
getFeatureRenderer, isAttachingAttributes, release, setAttachingAttributes, setFeatureRenderer
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlvRegionOfInterestTileLoader

public IlvRegionOfInterestTileLoader(IlvMapRegionOfInterestIterator reader,
                                     boolean usingGeodeticComputation)
Creates an IlvRegionOfInterestTileLoader instance that will delegate data extraction to a specific IlvMapRegionOfInterestIterator object.

Parameters:
reader - The underlying IlvMapRegionOfInterestIterator.
usingGeodeticComputation - Set to true for rendering to take date line wrapping into account.

IlvRegionOfInterestTileLoader

public IlvRegionOfInterestTileLoader(IlvInputStream stream)
                              throws IlvReadFileException
Constructs a tile loader from serialized data.

Parameters:
stream - The input stream to read from.
Throws:
IlvReadFileException - if there is a problem reading from stream.
Method Detail

write

public void write(IlvOutputStream stream)
           throws IOException
Writes this tile loader to a specific IlvOutputStream.

Specified by:
write in interface IlvPersistentObject
Specified by:
write in interface IlvTileLoader
Overrides:
write in class IlvMapTileLoader
Parameters:
stream - The IlvOutputStream to write this object to.
Throws:
IOException - if there is a problem writing to stream.

isPersistent

public boolean isPersistent()
Tests if this tile loader can be saved.

Specified by:
isPersistent in interface IlvTileLoader
Specified by:
isPersistent in class IlvMapTileLoader
Returns:
If this tile loader can be saved, true is returned.

getFeatureIterator

public IlvMapFeatureIterator getFeatureIterator(IlvTile tile)
                                         throws Exception
Returns an IlvMapFeatureIterator used to iterate over map features within the bounds of the tiles specified.

Specified by:
getFeatureIterator in class IlvMapTileLoader
Parameters:
tile - The IlvTile to load.
Returns:
An IlvMapFeatureIterator of map features.
Throws:
Exception - if a runtime exception occurred during iterator creation.

getDefaultFeatureRenderer

public IlvFeatureRenderer getDefaultFeatureRenderer()
Returns the default feature renderer used to render the map features of this tile.

This default feature renderer is used when the user does not set a specific feature renderer.

Specified by:
getDefaultFeatureRenderer in class IlvMapTileLoader
Returns:
The default IlvFeatureRenderer for this tile loader.

createDefaultFeatureStyle

public static IlvMapStyle createDefaultFeatureStyle(Class geometryClass)
Deprecated. 

Creates a map style designed to be applied to the specified geometry class.

Parameters:
geometryClass - subclass
Returns:
the default style to use.
See Also:
IlvDataSourceStylingFactory.createDefaultFeatureStyle(Class, Object, boolean)

load

public void load(IlvTile tile)
          throws Exception
Method called when a tile has to be loaded.
The default implementation gets the feature iterator for the tile to load using getFeatureIterator(), and then adds all objects to the tile using the feature renderer of this tile loader.
If getFeatureIterator() returns null, the specified tile is assumed to be inexistent and tile.loadComplete() is called.

Specified by:
load in interface IlvTileLoader
Overrides:
load in class IlvMapTileLoader
Parameters:
tile - The tile to load.
Throws:
Exception - if an error occurs when loading objects from the specified tile.

isUsingGeodeticComputation

protected boolean isUsingGeodeticComputation()
Indicates if this tile loader should use geodetic computation.

Returns:
If geodetic computation will be used true is returned.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.