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

The component presents the Microsoft Virtual Earth map in the JSF applications.


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>
...

Table of <rich:virtualEarth> attributes.



You can find all necessary information about style classes redefinition in
Definition of Custom Style Classes section.

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.