6.14.4. < rich:virtualEarth > available since 3.1.0

### Create new RichFaces Documentation Jira issue

Summary
255 characters left
Description
Environment
This will launch the RichFaces Jira page - to complete your feedback please login if needed, and submit the Jira.

JBoss.org Community Documentation

- Prev
- Next

### 6.14.4. < rich:virtualEarth > available since 3.1.0

expand all

#### 6.14.4.1. Description

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

Figure 6.182. <rich:virtualEarth> component

#### 6.14.4.2. Key Features

- Presents the Microsoft Virtual Earth map functionality

- Highly customizable via attributes

- No developers JavaScript writing is needed to use it on a pages

#### 6.14.4.3. Details of Usage

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

- "zoom" defines an approximation size (boundary values 1-18)

- "lat" specifies an initial latitude coordinate in degrees, as a number between -90 and +90

- "lng" specifies an initial longitude coordinate in degrees, as a number between -180 and +180

- "dashboardSize" specifies a type of a rendered map (`Normal`, `Small`, `Tiny`)

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

Figure 6.183. <rich:virtualEarth> initial rendering

Code for this example is placed below:

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

#### 6.14.4.4. Reference Data

Table of <rich:virtualEarth> attributes.

Table 6.249. Component Identification Parameters

Name | Value
--- | ---
component-type | org.richfaces.VirtualEarth
component-class | org.richfaces.component.html.HtmlVirtualEarth
component-family | org.richfaces.VirtualEarth
renderer-type | org.richfaces.VirtualEarthRenderer
tag-class | org.richfaces.taglib.VirtualEarthTag

Table 6.250. Classes names that define a component appearance

Class name | Description | Skin parameter | CSS property
--- | --- | --- | ---
rich-virtualEarth | Defines styles for a wrapper <div> element of a component | no | height, width

#### 6.14.4.5. Relevant Resources Links

Visit the VirtualEarth page at RichFaces LiveDemo for examples of component usage and their sources.

Useful articles:

- Bing Map Control SDK 6.2 at MSDN portal provides invormation about Microsoft interactive Earth map.

- Prev6.14.3. < rich:gmap > ...
- Top of page
- Front page
- Next6.14.5. < rich:hotKey > avai...