Create new RichFaces Documentation Jira issue

This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.orgCommunity Documentation

6.14.4.  < rich:virtualEarth > available since 3.1.0

Table 6.579. rich : virtualEarth attributes

Attribute Name Description
binding JSF: The attribute takes a value-binding expression for a component property of a backing bean
dashboardSizeInitial map type. The possible values are "Normal", "Small", "Tiny". Default value is "Normal".
id JSF: Every component may have a unique id that is automatically created if omitted
latInitial latitude coordinate in degrees, as a number between -90 and +90. Default value is "37.9721046".
lngInitial longitude coordinate in degrees, as a number between -180 and +180. Default value is "-122.04248428346".
mapStyleNavigation control size. Possible values are "Road", "Aerial", "Hybrid", "Birdseye". Default value is "Road"
onclick DHTML: The client-side script method to be called when the element is clicked
ondblclick DHTML: The client-side script method to be called when the element is double-clicked
onkeydown DHTML: The client-side script method to be called when a key is pressed down over the element
onkeypress DHTML: The client-side script method to be called when a key is pressed over the element and released
onkeyup DHTML: The client-side script method to be called when a key is released
onLoadMapThe client-side script method to be called when the Virtual Earth object is initiated
onmousedown DHTML: The client-side script method to be called when a mouse button is pressed down over the element
onmousemove DHTML: The client-side script method to be called when a pointer is moved within the element
onmouseout DHTML: The client-side script method to be called when a pointer is moved away from the element
onmouseover DHTML: The client-side script method to be called when a pointer is moved onto the element
onmouseup DHTML: The client-side script method to be called when a mouse button is released
rendered JSF: If "false", this component is not rendered
styleHTML: CSS style rules to be applied to the component
styleClass JSF: Assigns one or more CSS class names to the component. Corresponds to the HTML "class" attribute.
varThe JavaScript variable that is used to access the Virtual Earth API. If you have more than one Virtual Earth components on the same page, use individual key for each of them. Default value name is "map".
versionVirtual earth version, Default value is "6.1".
zoomInitial zoom level as a number between 1 and 18. Default value is "17".


Here are the main settings of initial rendering performed with a component map that are accessible with the following attributes:

For example, the city of Paris is shown after rendering with the following initial settings: lat = "48.833" , lng = "2.40" and zoom = "11" .


Code for this example is placed below:

Example:


...
<rich:virtualEarth  style="width:800px;" id="vm" lat="48.833" lng="2.40" 
                                     dashboardSize="Normal"  zoom="11" mapStyle="Hybrid" var="map" />
...

To set all these parameters and perform some activity (Zoom In/Out etc.) is possible with your JavaScript, i.e. declare a name of an object on a map in the "var" attribute and then call the object directly with API Microsoft Virtual Earth map .

For example, to approximate a map for var = "map" declared inside the component, call map.ZoomIn() on an event.

Moreover, to add e.g. some JavaScript effects, events defined on it are used.

  • "onmouseover"

  • "onclick"

  • "onmouseout"

  • etc.

Note

Virtual Earth does not support XHTML format of the page. Thus, if you use Facelets and JSF 1.2, do not forget to put the following tags somewhere on the page:


...
<f:view contentType="text/html">...</f:view>
...

Here you can found additional information about Microsoft Virtual Earth map.

Some additional information about usage of component can be found on its LiveDemo page.