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 Rogue Wave
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.
The following table lists the properties of the
Map
renderer.
Global properties of the Map renderer
Property
|
Type
|
Default
|
Description
|
---|---|---|---|
hideInvalidNodesAndLinks
|
boolean
|
true
|
If
true
, the nodes that are not within the limits tolerated by the map
projection will be hidden. The links that go to or come from
these nodes will also be hidden.
|
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
|
5
|
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.
|
The following table lists the per-object rendering properties of
the
Map
renderer.
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:
- As a floating-point value, in which case the value is the latitude or longitude expressed in radians.
- In degrees/minutes/seconds, as a string of the form xx
D
xx’
xx"
L, where L is one ofN
(north),S
(south),W
(west) orE
(east). The string will be converted to radians. - As a string matching one of the formats registered in the Maps package.
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 IlvMapRenderer for more details.