skip to main content
Defense > Programmer's documentation > Programming with JViews Maps > Introducing the main classes > Reader framework
 
Reader framework
Class diagram
The class diagram for the reader framework is shown in Reader Framework UML Diagram.
Reader Framework UML Diagram
JViews Maps provides a set of classes that you can use to read data from various cartographic data sources (files, databases, map servers, and so on), create map features, transform the features into JViews Maps graphic objects using renderers, and position them correctly onto an existing map.
The IlvMapFeature class
The IlvMapFeature class in the package ilog.views.maps is the base class for map features. This class allows you to read in data for cartographic display from source files. A map feature can be, for example, a segment of road, an aerial image, the summit of a hill, or a digital terrain model. For more information about this class, see Handling map features.
The IlvMapFeatureIterator interface
The IlvMapFeatureIterator interface in the package ilog.views.maps is the common interface for readers. All the classes that implement this interface can be used to read cartographic data, whatever the original format. JViews Maps provides a number of predefined readers, all of which, implement this interface. These readers are described in detail in Readers and writers.
The IlvFeatureRenderer interface
The IlvFeatureRenderer interface in the package ilog.views.maps is the common interface for renderers. All the classes that implement this interface can be used to translate an IlvMapFeature into a graphic object. JViews Maps provides a default class ( IlvDefaultFeatureRenderer) implementing this interface and being able to render most of the IlvMapFeature returned by the JViews Maps predefined readers. A specific renderer can also be provided by a reader (method IlvMapFeatureIterator.getDefaultRenderer() ).
The IlvMapStyle class
The IlvMapStyleclass is a base class for the style used with IlvMapGraphic graphic objects. A single instance of IlvMapStyle can be shared by IlvMapGraphics that can read their graphic (or other) attributes from the style.
The IlvMapStyle class should be used in conjunction with an IlvMapLayer. In this case, the IlvMapLayer applies the style to the objects within that layer. This can be used to change the appearance of a layer dynamically without reloading the map. Some attributes are layer specific, such as, layer visibility, and layer transparency
The IlvMapGraphic interface
Graphic objects requiring that they read their graphic attributes from a IlvMapStyle, must implement the IlvMapGraphic interface. Objects of this class are rendered with IlvMapAreaRenderer, IlvMapPointRenderer, IlvMapCurveRenderer and IlvMapTextRenderer. These renderers are used by the data sources provided by JViews Maps.
The IlvMapDynamicStyle class
The package package-frame contains classes used to change dynamically the style of a layer when the scale changes.
The IlvMapDynamicStyle associates an IlvMapStyle and a scale, and is used with a IlvMapStyleController. If the controller is installed on the view of the map, it listens for changes to the scale of the map and selects the appropriate style to apply to the appropriate layer. This allows a map to have different appearances at different scales.

Copyright © 2018, Rogue Wave Software, Inc. All Rights Reserved.