<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h"%>
<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f"%>
<%@ taglib uri="http://richfaces.org/a4j" prefix="a4j"%>
<%@ taglib uri="http://richfaces.org/rich" prefix="rich"%>
	<f:subview id="virtualEarth">
	<h:form>
	<h:panelGrid columns="2">
		<rich:virtualEarth style="width:800px;" id="gm" lat="37.97"
			dashboardSize="Normal" zoom="#{virtualEarth.zoom}" mapStyle="Hybrid"
			var="map" />

		<h:panelGroup>
			<f:verbatim>
		Dashboard:<br />
				<a href="javascript:void(0);"
					onclick="map.HideDashboard();return false;">Remove</a>
				<a href="javascript:void(0);"
					onclick="map.ShowDashboard();return false;">Show</a>
				<br />
				<br />
		Type:<br />
				<a href="javascript:void(0);"
					onclick="map.SetMapStyle(VEMapStyle.Road);return false;">Road</a>
				<a href="javascript:void(0);"
					onclick="map.SetMapStyle(VEMapStyle.Aerial);return false;">Aerial</a>
				<a href="javascript:void(0);"
					onclick="map.SetMapStyle(VEMapStyle.Hybrid);return false;">Hybrid</a>
				<a href="javascript:void(0);"
					onclick="map.SetMapStyle(VEMapStyle.Birdseye);return false;">Birdseye</a>
				<br />
				<br />
		Zoom:<br />
				<a href="javascript:void(0);" onclick="map.ZoomIn();return false;">In</a>
				<a href="javascript:void(0);" onclick="map.ZoomOut();return false;">Out</a>
				<br />
				<br />
				<a href="javascript:void(0);" onclick="showExadel();return false;">Show
				Exadel Office</a>
				<br />
				<a href="javascript:void(0);" onclick="showExadelInMinsk();return false;">Show Exadel in
				Belarus</a>
			</f:verbatim>
		</h:panelGroup>
		
	</h:panelGrid>
	<a4j:outputPanel id="zoomer">
		<script>
		  function zoomIt() {
		   map.setZoom(#{virtualEarth.zoom});
		  }
		</script>
	</a4j:outputPanel>
	<a4j:outputPanel>
		<script>
      function createMarker(point,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }
	   function showExadel() {
	    var point = new VELatLong(37.9721046, -122.0424842834);
		map.SetCenterAndZoom(point, 16);
		map.SetMapStyle(VEMapStyle.Birdseye);
	   }
	    function showExadelInMinsk() {
	    var point = new VELatLong(53.92316,27.510737, 53.92316,27.510737);
		map.SetCenterAndZoom(point, 16);
		map.SetMapStyle(VEMapStyle.Birdseye);
	   }
	   </script>
	</a4j:outputPanel>
	</h:form>
	<h:form>
		<h:commandLink value="Back" action="main"></h:commandLink>
	</h:form>
	</f:subview>

