| Programming with JViews Maps > Creating a Map Application Using the API > Manipulating Renderers > Renderers and Style |
Renderers and Style |
INDEX
PREVIOUS
NEXT
|
Some predefined renderers produce IlvGraphic objects, which are instances of the IlvMapGraphic class. These renderers include IlvMapAreaRenderer, IlvMapPointRenderer, IlvMapCurveRenderer, and IlvMapTextRenderer. The graphic objects produced by these renders can be styled by means of an IlvMapStyle object. The predefined data sources provided by JViews Maps use these renderers and make it possible to change the style of a layer without reloading the entire map.
The following code creates an IlvShapeDataSource and sets an IlvMapAreaRenderer to render the feature read by the data source. The fill color is set to red. A button is created whose action sets the color of the map to blue simply by changing the Paint attribute of the layer.
| Copyright © 1987-2007 ILOG S.A. All rights reserved. Documentation homepage. Legal terms. | PREVIOUS NEXT |