<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>parpue.net &#187; ストリードビュー</title>
	<atom:link href="http://parpue.net/tag/streetview/feed" rel="self" type="application/rss+xml" />
	<link>http://parpue.net</link>
	<description>Flash, Flex, デザイン等自分の好きなことを好きなようにやってます</description>
	<lastBuildDate>Wed, 12 Aug 2009 17:46:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Google ストリートビューで鬼ごっこ</title>
		<link>http://parpue.net/web/259</link>
		<comments>http://parpue.net/web/259#comments</comments>
		<pubDate>Mon, 25 Aug 2008 11:07:00 +0000</pubDate>
		<dc:creator>okm</dc:creator>
				<category><![CDATA[WEB]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[googlemaps]]></category>
		<category><![CDATA[ストリードビュー]]></category>
		<category><![CDATA[鬼ごっこ]]></category>

		<guid isPermaLink="false">http://parpue.net/?p=259</guid>
		<description><![CDATA[				北海道までライジングサンを見に遊びにいってきました。ただいま！
				今回は、現在までのストリートビューのプログラムを組み合わせて、
				地図上を複数のキャラクターが動き回るサンプルを作ってみました。
				クリックで新しいウィンドウにサンプル表示
				一応IEでも確認しましたが、FireFox３環境を激しく推奨。
				（IE謎のエラーがたまにでる・・・）
				基本は、以前のサンプルの自動で動き回るキャラクターを複数にしただけです。
				当たり判定とかも加えてゲームらしくしようかと思ったんですが、そこは挫折しましたｗ
				↓以下ソース全部
				
				&#62;&#62;text
				JAVASCRIPT:
				
				
				
				var lastPanoId = null;&#160; &#160; &#160; &#160; &#160;// 最後にいた場所のPanoID
				var nowLatLng;
				var map;
				var streetViewClient;
				var streetPanorama;
				&#160;
				var enemyList = &#91;&#93;;
				var enemyMarker;
				&#160;
				var zakoIcon;
				&#160;
				// GoogleMapsの初期化
				function initMap&#40;lat, lng&#41;&#123;
				&#160; &#160; map = new GMap2&#40;document.getElementById&#40;"map"&#41;&#41;;
				&#160; &#160; map.disableDragging&#40;&#41;;
				&#160; &#160; var ctrlObj = new GMapTypeControl&#40;&#41;;
				&#160; &#160; var pos = new GControlPosition&#40;G_ANCHOR_BOTTOM_RIGHT, new GSize&#40;5, 15&#41;&#41;;
				&#160; &#160; map.addControl&#40;ctrlObj, pos&#41;;
				&#160; &#160; map.setCenter&#40;new GLatLng&#40;lat, lng&#41;, 18&#41;;
				&#160; &#160; initMarker&#40;&#41;;
				&#160; &#160; initPanorama&#40;lat,  [...]]]></description>
			<content:encoded><![CDATA[				<p>北海道までライジングサンを見に遊びにいってきました。ただいま！</p>
				<p>今回は、現在までのストリートビューのプログラムを組み合わせて、<br />
				地図上を複数のキャラクターが動き回るサンプルを作ってみました。</p>
				<p><a href="http://parpue.net/samples/street/" target="_blank">クリックで新しいウィンドウにサンプル表示</a></p>
				<p>一応IEでも確認しましたが、FireFox３環境を激しく推奨。<br />
				（IE謎のエラーがたまにでる・・・）</p>
				<p>基本は、以前のサンプルの自動で動き回るキャラクターを複数にしただけです。<br />
				当たり判定とかも加えてゲームらしくしようかと思ったんですが、そこは挫折しましたｗ</p>
				<p>↓以下ソース全部<br />
				<span id="more-259"></span></p>
				<div class="igBar"><span id="ljavascript-2"><a href="#" onclick="javascript:showPlainTxt('javascript-2'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-2">
				<div class="javascript">
				<ol style="margin:0px; padding:0px" >
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">var</span> lastPanoId = <span style="color: #003366; font-weight: bold;">null</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900; font-style: italic;">// 最後にいた場所のPanoID</span></li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">var</span> nowLatLng;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">var</span> map;</li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">var</span> streetViewClient;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">var</span> streetPanorama;</li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">var</span> enemyList = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;</li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">var</span> enemyMarker;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">var</span> zakoIcon;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">// GoogleMapsの初期化</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> initMap<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; map = <span style="color: #003366; font-weight: bold;">new</span> GMap2<span style="color: #66cc66;">&#40;</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"map"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; map.<span style="color: #006600;">disableDragging</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> ctrlObj = <span style="color: #003366; font-weight: bold;">new</span> GMapTypeControl<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> pos = <span style="color: #003366; font-weight: bold;">new</span> GControlPosition<span style="color: #66cc66;">&#40;</span>G_ANCHOR_BOTTOM_RIGHT, <span style="color: #003366; font-weight: bold;">new</span> GSize<span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;color:#800000;">5</span>, <span style="color: #CC0000;color:#800000;">15</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; map.<span style="color: #006600;">addControl</span><span style="color: #66cc66;">&#40;</span>ctrlObj, pos<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; map.<span style="color: #006600;">setCenter</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span>, <span style="color: #CC0000;color:#800000;">18</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; initMarker<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; initPanorama<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">function</span> initMarker<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; zakoIcon = <span style="color: #003366; font-weight: bold;">new</span> GIcon<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; zakoIcon.<span style="color: #006600;">image</span> = <span style="color: #3366CC;">"./zako_front.gif"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; zakoIcon.<span style="color: #006600;">iconSize</span> = <span style="color: #003366; font-weight: bold;">new</span> GSize<span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;color:#800000;">30</span>, <span style="color: #CC0000;color:#800000;">57</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; zakoIcon.<span style="color: #006600;">iconAnchor</span> = <span style="color: #003366; font-weight: bold;">new</span> GPoint<span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;color:#800000;">15</span>, <span style="color: #CC0000;color:#800000;">57</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> initPanorama<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; streetViewClient = <span style="color: #003366; font-weight: bold;">new</span> GStreetviewClient;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; streetPanorama = <span style="color: #003366; font-weight: bold;">new</span> GStreetviewPanorama<span style="color: #66cc66;">&#40;</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"pano"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; nowLatLng = <span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; streetViewClient.<span style="color: #006600;">getNearestPanoramaLatLng</span><span style="color: #66cc66;">&#40;</span>nowLatLng, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>latlng<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>latlng == <span style="color: #003366; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"pano"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">display</span> = <span style="color: #3366CC;">"none"</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; nowLatLng = latlng;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; streetPanorama.<span style="color: #006600;">setLocationAndPOV</span><span style="color: #66cc66;">&#40;</span>nowLatLng, <span style="color: #66cc66;">&#123;</span>yaw: <span style="color: #CC0000;color:#800000;">180</span>, pitch: <span style="color: #CC0000;color:#800000;">0</span>, zoom: -<span style="color: #CC0000;color:#800000;">1</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; GEvent.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span>streetPanorama, </li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #3366CC;">"yawchanged"</span>, </li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>yaw<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;changeYaw<span style="color: #66cc66;">&#40;</span>yaw<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; GEvent.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span>streetPanorama, </li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #3366CC;">"initialized"</span>, </li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>location<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;panoramaInitialized<span style="color: #66cc66;">&#40;</span>location<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// キャラクタを配置</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; enemyOptions = <span style="color: #66cc66;">&#91;</span> <span style="color: #66cc66;">&#123;</span> lat:<span style="color: #CC0000;color:#800000;">35</span>.<span style="color: #CC0000;color:#800000;">661821</span>, lng:<span style="color: #CC0000;color:#800000;">139</span>.<span style="color: #CC0000;color:#800000;">666685</span><span style="color: #66cc66;">&#125;</span>,</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span> lat:<span style="color: #CC0000;color:#800000;">35</span>.<span style="color: #CC0000;color:#800000;">662404</span>, lng:<span style="color: #CC0000;color:#800000;">139</span>.<span style="color: #CC0000;color:#800000;">665810</span><span style="color: #66cc66;">&#125;</span>,</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#123;</span> lat:<span style="color: #CC0000;color:#800000;">35</span>.<span style="color: #CC0000;color:#800000;">66215</span>,&nbsp; lng:<span style="color: #CC0000;color:#800000;">139</span>.<span style="color: #CC0000;color:#800000;">665270</span><span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; </li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#93;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">for</span><span style="color: #66cc66;">&#40;</span>i = <span style="color: #CC0000;color:#800000;">0</span>; i &lt;enemyOptions.<span style="color: #006600;">length</span>; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> enemy = <span style="color: #003366; font-weight: bold;">new</span> Object;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; enemy.<span style="color: #006600;">lat</span> = enemyOptions<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">"lat"</span><span style="color: #66cc66;">&#93;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; enemy.<span style="color: #006600;">lng</span> = enemyOptions<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#91;</span><span style="color: #3366CC;">"lng"</span><span style="color: #66cc66;">&#93;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; enemy.<span style="color: #006600;">marker</span> = <span style="color: #003366; font-weight: bold;">new</span> GMarker<span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">lat</span>, enemy.<span style="color: #006600;">lng</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #66cc66;">&#123;</span>draggable:<span style="color: #003366; font-weight: bold;">false</span>, icon:zakoIcon<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; map.<span style="color: #006600;">addOverlay</span><span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">marker</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; enemy.<span style="color: #006600;">moveInterval</span> = setInterval<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"toNextPanorama("</span>+i+<span style="color: #3366CC;">")"</span>, <span style="color: #CC0000;color:#800000;">2000</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; enemyList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = enemy;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">// 次の位置へ移動</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> toNextPanorama<span style="color: #66cc66;">&#40;</span>enemy_num<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> enemy = enemyList<span style="color: #66cc66;">&#91;</span>enemy_num<span style="color: #66cc66;">&#93;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; clearInterval<span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">moveInterval</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; enemy.<span style="color: #006600;">pt</span> = map.<span style="color: #006600;">fromLatLngToContainerPixel</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">lat</span>, enemy.<span style="color: #006600;">lng</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">/*</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; if(enemy.pt.x&gt; 210 &amp;&amp; enemy.pt.x &lt;230 &amp;&amp; enemy.pt.y&gt; 192 &amp;&amp; enemy.pt.y &lt;270){</span></li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; //alert(&quot;hit&quot;);</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; }</span></li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">*/</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// 現在の表示位置の緯度経度を取得</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; streetViewClient.<span style="color: #006600;">getNearestPanorama</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">lat</span>, enemy.<span style="color: #006600;">lng</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>streetData<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> neighbourCount = streetData.<span style="color: #006600;">links</span>.<span style="color: #006600;">length</span>; <span style="color: #009900; font-style: italic;">// 隣接するパノラマの数</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> nextPanoId; <span style="color: #009900; font-style: italic;">// 次に向かうパノラマのID</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>neighbourCount == <span style="color: #CC0000;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// 隣接するパノラマが１つだった場合はそこへ移動</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; enemy.<span style="color: #006600;">nextYaw</span> = streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">yaw</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nextPanoId = streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">panoId</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">while</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i = Math.<span style="color: #006600;">floor</span><span style="color: #66cc66;">&#40;</span> Math.<span style="color: #006600;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> * neighbourCount <span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">lastPanoId</span> != streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">panoId</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nextPanoId = streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">panoId</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enemy.<span style="color: #006600;">nextYaw</span> = streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">yaw</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">break</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; enemy.<span style="color: #006600;">lastPanoId</span> = streetData.<span style="color: #006600;">location</span>.<span style="color: #006600;">panoId</span>;&nbsp; &nbsp; &nbsp;<span style="color: #009900; font-style: italic;">// 今いた場所を覚えておく</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; streetViewClient.<span style="color: #006600;">getPanoramaById</span><span style="color: #66cc66;">&#40;</span> nextPanoId,</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>nextStreetData<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enemy.<span style="color: #006600;">nowLatLng</span> = nextStreetData.<span style="color: #006600;">location</span>.<span style="color: #006600;">latlng</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> pov = streetPanorama.<span style="color: #006600;">getPOV</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nowYaw = pov.<span style="color: #006600;">yaw</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>nowYaw&gt; <span style="color: #CC0000;color:#800000;">360</span><span style="color: #66cc66;">&#41;</span> nowYaw -= <span style="color: #CC0000;color:#800000;">360</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>Math.<span style="color: #006600;">abs</span><span style="color: #66cc66;">&#40;</span>nowYaw - enemy.<span style="color: #006600;">nextYaw</span><span style="color: #66cc66;">&#41;</span>&gt; <span style="color: #CC0000;color:#800000;">180</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>nowYaw&gt; enemy.<span style="color: #006600;">nextYaw</span><span style="color: #66cc66;">&#41;</span> enemy.<span style="color: #006600;">nextYaw</span> += <span style="color: #CC0000;color:#800000;">360</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.<span style="color: #006600;">removeOverlay</span><span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">marker</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;zakoIcon.<span style="color: #006600;">image</span> = getIconFromYaw<span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">nextYaw</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enemy.<span style="color: #006600;">marker</span> = <span style="color: #003366; font-weight: bold;">new</span> GMarker<span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">nowLatLng</span>.<span style="color: #006600;">lat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, enemy.<span style="color: #006600;">nowLatLng</span>.<span style="color: #006600;">lng</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #66cc66;">&#123;</span>draggable:<span style="color: #003366; font-weight: bold;">false</span>, icon:zakoIcon<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;map.<span style="color: #006600;">addOverlay</span><span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">marker</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enemy.<span style="color: #006600;">lat</span> = enemy.<span style="color: #006600;">nowLatLng</span>.<span style="color: #006600;">lat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enemy.<span style="color: #006600;">lng</span> = enemy.<span style="color: #006600;">nowLatLng</span>.<span style="color: #006600;">lng</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enemy.<span style="color: #006600;">pt</span> = map.<span style="color: #006600;">fromLatLngToContainerPixel</span><span style="color: #66cc66;">&#40;</span>enemy.<span style="color: #006600;">nowLatLng</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">/*</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;if(enemy.pt.x&gt; 210 &amp;&amp; enemy.pt.x &lt;230 &amp;&amp; enemy.pt.y&gt; 192 &amp;&amp; enemy.pt.y &lt;270){</span></li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;//alert(&quot;hit&quot;);</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}</span></li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">*/</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enemy.<span style="color: #006600;">moveInterval</span> = setInterval<span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"toNextPanorama("</span>+enemy_num+<span style="color: #3366CC;">")"</span>, <span style="color: #CC0000;color:#800000;">2000</span><span style="color: #66cc66;">&#41;</span>; </li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;enemyList<span style="color: #66cc66;">&#91;</span>enemy_num<span style="color: #66cc66;">&#93;</span> = enemy;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> getIconFromYaw<span style="color: #66cc66;">&#40;</span>yaw<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; gifFile = <span style="color: #3366CC;">"./zako_f.gif"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt; <span style="color: #CC0000;color:#800000;">360</span> <span style="color: #66cc66;">&#41;</span> yaw -= <span style="color: #CC0000;color:#800000;">360</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">315</span> || yaw &lt;<span style="color: #CC0000;color:#800000;">45</span>&nbsp; <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"./zako_back.gif"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">45</span> &amp;&amp; yaw &lt; <span style="color: #CC0000;color:#800000;">135</span> <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"./zako_right.gif"</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">135</span> &amp;&amp; yaw &lt; <span style="color: #CC0000;color:#800000;">225</span> <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"./zako_front.gif"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">225</span> || yaw &lt;<span style="color: #CC0000;color:#800000;">315</span> <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"./zako_left.gif"</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> gifFile;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> changeYaw<span style="color: #66cc66;">&#40;</span>yaw<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> gifFile;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt; <span style="color: #CC0000;color:#800000;">360</span> <span style="color: #66cc66;">&#41;</span> yaw -= <span style="color: #CC0000;color:#800000;">360</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">315</span> || yaw &lt;<span style="color: #CC0000;color:#800000;">45</span>&nbsp; <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"ue.gif"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">45</span> &amp;&amp; yaw &lt; <span style="color: #CC0000;color:#800000;">135</span> <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"migi.gif"</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">135</span> &amp;&amp; yaw &lt; <span style="color: #CC0000;color:#800000;">225</span> <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"shita.gif"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">225</span> || yaw &lt;<span style="color: #CC0000;color:#800000;">315</span> <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"hidari.gif"</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"girl"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">innerHTML</span> = <span style="color: #3366CC;">'&lt;img src=&quot;'</span>+ gifFile +<span style="color: #3366CC;">'&quot; alt=&quot;gial&quot;/&gt;'</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> panoramaInitialized<span style="color: #66cc66;">&#40;</span>location<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; map.<span style="color: #006600;">panTo</span><span style="color: #66cc66;">&#40;</span>location.<span style="color: #006600;">latlng</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
]]></content:encoded>
			<wfw:commentRss>http://parpue.net/web/259/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Googleストリートビューでもっと下北をウロウロさせる！</title>
		<link>http://parpue.net/web/241</link>
		<comments>http://parpue.net/web/241#comments</comments>
		<pubDate>Thu, 07 Aug 2008 08:59:34 +0000</pubDate>
		<dc:creator>okm</dc:creator>
				<category><![CDATA[WEB]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[デザイン]]></category>
		<category><![CDATA[googlemaps]]></category>
		<category><![CDATA[ストリードビュー]]></category>

		<guid isPermaLink="false">http://parpue.net/?p=241</guid>
		<description><![CDATA[				前作ったやつを、もうちょっと作りこみ。
				曲がるときもっとスムーズに曲がってくれるようにして、歩くスピードをアップ。
				ちょっとコレで、ゲームなぞ作ってみようかなーとか。
				FlashPlayer9必須みたいです。
				環境によってはすごい重いかもしれません。
				↓実行サンプルとソース
				
				
				
				
				
				
				
				
				曲がるときのイージングをJavaScriptのタイマーで強引にやって、
				もっとさくさく歩くようにしました。
				setInterval で角度をちょっとずつ動かしています。
				&#62;&#62;text
				JAVASCRIPT:
				
				
				
				// onEnterFrame的になめらかに曲がる
				function yawPan&#40;&#41;&#123;
				&#160; &#160; &#160;var pov = streetPanorama.getPOV&#40;&#41;;
				&#160; &#160; &#160;if&#40;Math.abs&#40; nowYaw - nextYaw &#41; &#60;5 &#41;&#123;
				&#160; &#160; &#160; &#160; &#160;clearInterval&#40;yawInterval&#41;;
				&#160; &#160; &#160; &#160; &#160;moveNextPanorama&#40;&#41;;
				&#160; &#160; &#160;&#125;else&#123;
				&#160; &#160; &#160; &#160; &#160;nowYaw += &#40;nextYaw - nowYaw&#41; * 0.2;
				&#160; &#160; &#160; &#160; &#160;pov.yaw = nowYaw;
				&#160; &#160; &#160; &#160; &#160;streetPanorama.setPOV&#40;pov&#41;;
				&#160; &#160; &#160;&#125;
				&#125; 
				
				
				
				
				たまに隣のポジションの緯度経度の取得に失敗することがあるようですが、
				基本的には、ほっとくとどこまでも歩いていきます。
				緯度経度取得に頼らないで、panoIDで隣を取得していくように変えようかしら。
				↓以下ソース全部
				&#62;&#62;text
				JAVASCRIPT:
				
				
				
				var lastPanoId = null;&#160; &#160; &#160;  [...]]]></description>
			<content:encoded><![CDATA[				<p><a href="http://parpue.net/?p=196">前作ったやつ</a>を、もうちょっと作りこみ。<br />
				曲がるときもっとスムーズに曲がってくれるようにして、歩くスピードをアップ。</p>
				<p>ちょっとコレで、ゲームなぞ作ってみようかなーとか。</p>
				<p>FlashPlayer9必須みたいです。<br />
				環境によってはすごい重いかもしれません。</p>
				<p>↓実行サンプルとソース<br />
				<span id="more-241"></span></p>
				<div id="pano" style="width:400px;height:300px;border:solid 1px">
				<input type="button" onClick="initMap(35.66188145562874,139.6673360466957);" value="ここをクリックでスタート"/></div>
				<div style="position:relative">
				<div id="map" style="width:400px;height:300px;border:solid 1px;position:relative"></div>
				<div id="girl" style="width:40px;height:60px;position:absolute;top:92px;left:180px"><img src="/common/image/shita.gif"/></div>
				</div>
				<div style="clear:both"></div>
				<p>曲がるときのイージングをJavaScriptのタイマーで強引にやって、<br />
				もっとさくさく歩くようにしました。</p>
				<p>setInterval で角度をちょっとずつ動かしています。</p>
				<div class="igBar"><span id="ljavascript-5"><a href="#" onclick="javascript:showPlainTxt('javascript-5'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-5">
				<div class="javascript">
				<ol style="margin:0px; padding:0px" >
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900; font-style: italic;">// onEnterFrame的になめらかに曲がる</span></li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">function</span> yawPan<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> pov = streetPanorama.<span style="color: #006600;">getPOV</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>Math.<span style="color: #006600;">abs</span><span style="color: #66cc66;">&#40;</span> nowYaw - nextYaw <span style="color: #66cc66;">&#41;</span> &lt;<span style="color: #CC0000;color:#800000;">5</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;clearInterval<span style="color: #66cc66;">&#40;</span>yawInterval<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;moveNextPanorama<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nowYaw += <span style="color: #66cc66;">&#40;</span>nextYaw - nowYaw<span style="color: #66cc66;">&#41;</span> * <span style="color: #CC0000;color:#800000;">0</span>.<span style="color: #CC0000;color:#800000;">2</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pov.<span style="color: #006600;">yaw</span> = nowYaw;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;streetPanorama.<span style="color: #006600;">setPOV</span><span style="color: #66cc66;">&#40;</span>pov<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
				<p>たまに隣のポジションの緯度経度の取得に失敗することがあるようですが、<br />
				基本的には、ほっとくとどこまでも歩いていきます。</p>
				<p>緯度経度取得に頼らないで、panoIDで隣を取得していくように変えようかしら。</p>
				<p>↓以下ソース全部</p>
				<div class="igBar"><span id="ljavascript-6"><a href="#" onclick="javascript:showPlainTxt('javascript-6'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-6">
				<div class="javascript">
				<ol style="margin:0px; padding:0px" >
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">var</span> lastPanoId = <span style="color: #003366; font-weight: bold;">null</span>;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900; font-style: italic;">// 最後にいた場所のPanoID</span></li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">var</span> nowLatLng;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">var</span> map;</li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">var</span> streetViewClient;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">var</span> streetPanorama;</li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">var</span> nextYaw;&nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// 次に向かう方向</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">var</span> nowYaw;</li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">var</span> moveInterval; <span style="color: #009900; font-style: italic;">// 移動のインターバル用</span></li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">var</span> yawInterval;&nbsp; <span style="color: #009900; font-style: italic;">// 向きを変えてから移動するため</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> initMap<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp;map = <span style="color: #003366; font-weight: bold;">new</span> GMap2<span style="color: #66cc66;">&#40;</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"map"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;map.<span style="color: #006600;">disableDragging</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> ctrlObj = <span style="color: #003366; font-weight: bold;">new</span> GMapTypeControl<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> pos = <span style="color: #003366; font-weight: bold;">new</span> GControlPosition<span style="color: #66cc66;">&#40;</span>G_ANCHOR_BOTTOM_RIGHT, <span style="color: #003366; font-weight: bold;">new</span> GSize<span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;color:#800000;">5</span>, <span style="color: #CC0000;color:#800000;">15</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;map.<span style="color: #006600;">addControl</span><span style="color: #66cc66;">&#40;</span>ctrlObj, pos<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;map.<span style="color: #006600;">setCenter</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span>, <span style="color: #CC0000;color:#800000;">18</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;initPanorama<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> initPanorama<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp;streetViewClient = <span style="color: #003366; font-weight: bold;">new</span> GStreetviewClient;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;streetPanorama = <span style="color: #003366; font-weight: bold;">new</span> GStreetviewPanorama<span style="color: #66cc66;">&#40;</span>document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"pano"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;nowLatLng = <span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #66cc66;">&#40;</span>lat, lng<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;streetViewClient.<span style="color: #006600;">getNearestPanoramaLatLng</span><span style="color: #66cc66;">&#40;</span>nowLatLng, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>latlng<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>latlng == <span style="color: #003366; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"pano"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">style</span>.<span style="color: #006600;">display</span> = <span style="color: #3366CC;">"none"</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">return</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; nowLatLng = latlng;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; streetPanorama.<span style="color: #006600;">setLocationAndPOV</span><span style="color: #66cc66;">&#40;</span>nowLatLng, <span style="color: #66cc66;">&#123;</span>yaw: <span style="color: #CC0000;color:#800000;">180</span>, pitch: <span style="color: #CC0000;color:#800000;">0</span>, zoom: -<span style="color: #CC0000;color:#800000;">1</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>; </li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900; font-style: italic;">/* 移動時に手動で変更</span></li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; GEvent.addListener(streetPanorama, </span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &quot;yawchanged&quot;, </span></li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; function(yaw){</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; changeYaw(yaw);</span></li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; });&nbsp; &nbsp; &nbsp; &nbsp;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900; font-style: italic;">*/</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// 3秒後に移動</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; moveInterval = setInterval<span style="color: #66cc66;">&#40;</span>toNextPanorama, <span style="color: #CC0000;color:#800000;">2000</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">function</span> changeYaw<span style="color: #66cc66;">&#40;</span>yaw<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> gifFile;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt; <span style="color: #CC0000;color:#800000;">360</span> <span style="color: #66cc66;">&#41;</span> yaw -= <span style="color: #CC0000;color:#800000;">360</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">315</span> || yaw &lt;<span style="color: #CC0000;color:#800000;">45</span>&nbsp; <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"/common/image/ue.gif"</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">45</span> &amp;&amp; yaw &lt; <span style="color: #CC0000;color:#800000;">135</span> <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"/common/image/migi.gif"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">135</span> &amp;&amp; yaw &lt; <span style="color: #CC0000;color:#800000;">225</span> <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"/common/image/shita.gif"</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span> yaw&gt;= <span style="color: #CC0000;color:#800000;">225</span> || yaw &lt;<span style="color: #CC0000;color:#800000;">315</span> <span style="color: #66cc66;">&#41;</span> gifFile = <span style="color: #3366CC;">"/common/image/hidari.gif"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"girl"</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">innerHTML</span> = <span style="color: #3366CC;">'&lt;img src=&quot;'</span>+ gifFile +<span style="color: #3366CC;">'&quot; alt=&quot;gial&quot;/&gt;'</span>;</li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">// 現在の表示位置から一番近いStreetViewDataを取得し、そこから隣接するパノラマに移動する</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> toNextPanorama<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp;clearInterval<span style="color: #66cc66;">&#40;</span>moveInterval<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;<span style="color: #009900; font-style: italic;">// 現在の表示位置の緯度経度を取得</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp;streetViewClient.<span style="color: #006600;">getNearestPanorama</span><span style="color: #66cc66;">&#40;</span>nowLatLng, <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>streetData<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> neighbourCount = streetData.<span style="color: #006600;">links</span>.<span style="color: #006600;">length</span>; <span style="color: #009900; font-style: italic;">// 隣接するパノラマの数</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> nextPanoId; <span style="color: #009900; font-style: italic;">// 次に向かうパノラマのID</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>neighbourCount == <span style="color: #CC0000;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// 隣接するパノラマが１つだった場合はそこへ移動</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nextYaw = streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">yaw</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;&nbsp; &nbsp; &nbsp;nextPanoId = streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span><span style="color: #CC0000;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">panoId</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">while</span><span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;color:#800000;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i = Math.<span style="color: #006600;">floor</span><span style="color: #66cc66;">&#40;</span> Math.<span style="color: #006600;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> * neighbourCount <span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>lastPanoId != streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">panoId</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nextPanoId = streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">panoId</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nextYaw = streetData.<span style="color: #006600;">links</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">yaw</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">break</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; lastPanoId = streetData.<span style="color: #006600;">location</span>.<span style="color: #006600;">panoId</span>;&nbsp; &nbsp; &nbsp;<span style="color: #009900; font-style: italic;">// 今いた場所を覚えておく</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; streetViewClient.<span style="color: #006600;">getPanoramaById</span><span style="color: #66cc66;">&#40;</span> nextPanoId,</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>nextStreetData<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nowLatLng = nextStreetData.<span style="color: #006600;">location</span>.<span style="color: #006600;">latlng</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> pov = streetPanorama.<span style="color: #006600;">getPOV</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; nowYaw = pov.<span style="color: #006600;">yaw</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>nowYaw&gt; <span style="color: #CC0000;color:#800000;">360</span><span style="color: #66cc66;">&#41;</span> nowYaw -= <span style="color: #CC0000;color:#800000;">360</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>Math.<span style="color: #006600;">abs</span><span style="color: #66cc66;">&#40;</span>nowYaw - nextYaw<span style="color: #66cc66;">&#41;</span>&gt; <span style="color: #CC0000;color:#800000;">180</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>nowYaw&gt; nextYaw<span style="color: #66cc66;">&#41;</span> nextYaw += <span style="color: #CC0000;color:#800000;">360</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000066; font-weight: bold;">else</span> nowYaw += <span style="color: #CC0000;color:#800000;">360</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; yawInterval = setInterval<span style="color: #66cc66;">&#40;</span>yawPan, <span style="color: #CC0000;color:#800000;">100</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;"><span style="color: #009900; font-style: italic;">// onEnterFrame的になめらかに曲がる</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> yawPan<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp;<span style="color: #003366; font-weight: bold;">var</span> pov = streetPanorama.<span style="color: #006600;">getPOV</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp;<span style="color: #000066; font-weight: bold;">if</span><span style="color: #66cc66;">&#40;</span>Math.<span style="color: #006600;">abs</span><span style="color: #66cc66;">&#40;</span> nowYaw - nextYaw <span style="color: #66cc66;">&#41;</span> &lt;<span style="color: #CC0000;color:#800000;">5</span> <span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;clearInterval<span style="color: #66cc66;">&#40;</span>yawInterval<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;moveNextPanorama<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span><span style="color: #000066; font-weight: bold;">else</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;nowYaw += <span style="color: #66cc66;">&#40;</span>nextYaw - nowYaw<span style="color: #66cc66;">&#41;</span> * <span style="color: #CC0000;color:#800000;">0</span>.<span style="color: #CC0000;color:#800000;">2</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;pov.<span style="color: #006600;">yaw</span> = nowYaw;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;streetPanorama.<span style="color: #006600;">setPOV</span><span style="color: #66cc66;">&#40;</span>pov<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp;<span style="color: #66cc66;">&#125;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #003366; font-weight: bold;">function</span> moveNextPanorama<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; clearInterval<span style="color: #66cc66;">&#40;</span>yawInterval<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// さらに次のポイントへ移動へ</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; map.<span style="color: #006600;">panTo</span><span style="color: #66cc66;">&#40;</span>nowLatLng<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// 移動</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">　　changeYaw<span style="color: #66cc66;">&#40;</span>nextYaw<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; streetPanorama.<span style="color: #006600;">followLink</span><span style="color: #66cc66;">&#40;</span>nextYaw<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; moveInterval = setInterval<span style="color: #66cc66;">&#40;</span>toNextPanorama, <span style="color: #CC0000;color:#800000;">1500</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
]]></content:encoded>
			<wfw:commentRss>http://parpue.net/web/241/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

