Developing with the SDK > Using and Adding Renderers > Predefined Renderers > The Map Renderer

The Map renderer displays a background map behind the graph and automatically places geo-referenced objects on top of this map. You need to have the product JViews Maps installed with a valid license to be able to use this renderer.

The map is specified as the URL of an IVL file that will be loaded into the diagram. This IVL file can contain any cartographic information supported by ILOG JViews Maps, such as vectorial or raster maps read from various cartographic formats, load-on-demand readers, and so on. The IVL file should also contain the definition of a projection. This projection information will be used to place the objects on the map according to their latitude and longitude.

Table 4.21 lists the properties of the Map renderer.

Table 4.21 Global Properties of the Map Renderer
Property 
Type 
Default 
Description 
autoRegionOfInterest 
boolean 
false 
If true, the region of interest is computed automatically from the positions of the nodes contained in the data model. 
map 
String 
null 
The URL of the IVL file containing the map and the projection. 
regionOfInterest  
IlvRect 
null 
The "region of interest" on the map. This is useful to center on or zoom to a particular region of a larger map. The rectangle is in latitude and longitude coordinates (radians). 
regionOfInterestMargin 
float 
The margin remaining around the objects when the region of interest is computed automatically. The margin is expressed as a percentage of the width of the bounding box of the objects. 

Table 4.22 lists the per-object rendering properties of the Map renderer.

Table 4.22 Per-Object Properties of the Map Renderer
Property 
Type 
Default 
Description 
latitude  
double 

 
The latitude of the object. 
longitude  
double 

 
The longitude of the object. 
fitToContentsAllowed 
boolean 
true 
Performs a fit-to-contents each time the diagram is reloaded. 

The latitude and longitude can be specified in several formats:

Note
The latitude and longitude of the objects are usually stored in the data model. If the style sheet does not specify any values for the latitude and longitude properties, these properties will be read directly from the data model. Most of the time, the style sheet will be used only to translate the names of the data object properties holding the latitude and longitude, if needed. For example, if your data model has properties named LAT and LONG, you will write a rule like this in the style sheet:
node {
   latitude  : "@LAT";
   longitude : "@LONG";
}

See the class ilog.views.sdm.renderer.maps.IlvMapRenderer for more details.