Google StreetView

<?xml version="1.0" encoding="UTF-8"?>

<config	xmlns="urn:com.cohga.server.config#1.0"
	xmlns:client="urn:com.cohga.html.client#1.0" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema">

	<client:config id="streetview">
		<!-- Must include the google script with your API key -->
		<script>
			<![CDATA[http://www.google.com/jsapi?key=<GoogleApiKeyMustBeCopiedHere>]]>
		</script>
		<debug>true</debug>
		<title>Weave StreetView Client</title>
		<description>A Google StreetView client for Weave</description>
		<perspective>
			<text>Main</text>
			<view id="com.cohga.html.client.map.mapView">
				<location>center</location>
				<label>Map</label>

				<toolbar>
					<item action="com.cohga.html.client.map.previousExtentAction" />
					<item action="com.cohga.html.client.map.nextExtentAction" />
					<item action="com.cohga.html.client.map.initialExtentAction" />
					<item action="com.cohga.html.client.map.zoominAction" isDefault="true" />
					<item action="com.cohga.html.client.map.zoomoutAction" />
					<item action="com.cohga.html.client.map.panAction" />
					<item action="com.cohga.html.client.map.refreshMapAction" />
					<item>-></item>
					<item component="com.cohga.html.client.components.scaleSelector" />
				</toolbar>

				<statusbar>
					<item component="com.cohga.html.client.components.loadingComponent" />
				</statusbar>

				<control id='com.cohga.client.mapctrl.mousePosition'/>
				<control id='com.cohga.client.mapctrl.keyboard' />
				<control id='com.cohga.client.mapctrl.panZoomBar'/>

				<mapEngine id="mapengine.vector">
					<options>
						<transitionEffect>force</transitionEffect>
						<ratio>1.2</ratio>
					</options>
				</mapEngine>

				<toc ref="toc.vector" />

				<crs>EPSG:20255</crs>
				<scales>
					<scale>100</scale>
					<scale>250</scale>
					<scale>500</scale>
					<scale>1000</scale>
					<scale>2000</scale>
					<scale>3000</scale>
					<scale>4000</scale>
					<scale>8000</scale>
					<scale>16000</scale>
					<scale>32000</scale>
					<scale>64000</scale>
					<scale>125000</scale>
					<scale>250000</scale>
				</scales>
				<extents>
					<initial crs="EPSG:20255" minx="326022" miny="5810769" maxx="352871" maxy="5828285"/>
					<full crs="EPSG:20255" minx="327098" miny="5811358" maxx="351971" maxy="5827675"/>
					<limit crs="EPSG:20255" minx="320000" miny="5810000" maxx="360000" maxy="5840000"/>
				</extents>
			</view>

			<!-- Now add the street view panel -->
			<view id="weave.streetview">
				<location>center</location>
				<updateMap>false</updateMap> <!-- turn off updating of main map when street view is changed -->
			</view>
		</perspective>
	</client:config>

</config>

Updated functionality available at version 2.10.24 of the com.cohga.client.weave.google bundle.

You can specify additional options to alter the display of the street view panel by adding an options section and adding various options as described at Google Street View Options.

<view id="weave.streetview">
	<options>
		<addressControl>false</addressControl>
		<imageDateControl>false</imageDateControl>
		<zoomControlOptions>
			<position>LEFT_BOTTOM</position>
		</zoomControlOptions>
		<panControlOptions>
			<position>LEFT_BOTTOM</position>
		</panControlOptions>
	</options>
</view>

Additionally, you can specify that an overview map is displayed, by setting showOverview to true, and its size and location. The size is set with overviewWidth and overviewHeight, the horizontal location with overviewLeft or overviewRight and the vertical location with overviewTop or overviewBottom. All size and location values are in pixels and the left, right, top and bottom values specify how far from that side the overview should be placed.

Note that showOverview, overviewWidth and overviewHeight were available prior to version 2.10.24.

<view id="weave.streetview">
	<showOverview>true</showOverview>
	<overviewRight>10</overviewRight>
	<overviewTop>10</overviewTop>
	<overviewWidth>300</overviewWidth>
	<overviewHeight>300</overviewHeight>
	<options>
		<addressControl>false</addressControl>
		<imageDateControl>false</imageDateControl>
		<zoomControlOptions>
			<position>LEFT_BOTTOM</position>
		</zoomControlOptions>
		<panControlOptions>
			<position>LEFT_BOTTOM</position>
		</panControlOptions>
	</options>
</view>

Motion Tracking

Some users have reported issues with motion tracking when using mobile devices, this can be disabled by setting the appropriate options for the street view panel as outlined on the Google Street View Options link above, e.g.

<view id="weave.streetview">
	<options>
		<motionTracking>false</motionTracking>
		<motionTrackingControl>false</motionTrackingControl>
	</options>
</view>