<?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; googlemaps</title>
	<atom:link href="http://parpue.net/tag/googlemaps/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>マッシュアップ地図アルバムを作ってみる[Flickr+GoogleMaps+Flash]</title>
		<link>http://parpue.net/web/1070</link>
		<comments>http://parpue.net/web/1070#comments</comments>
		<pubDate>Sun, 19 Jul 2009 20:53:13 +0000</pubDate>
		<dc:creator>okm</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[WEB]]></category>
		<category><![CDATA[actionscript3]]></category>
		<category><![CDATA[as3flickrlib]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[googlemaps]]></category>

		<guid isPermaLink="false">http://parpue.net/?p=1070</guid>
		<description><![CDATA[				
				ちょっと前にas3flickrlibを使ってFlickrの緯度経度情報の取り方を調べた。
				緯度経度情報が取れたのなら、やることはひとつ、
				GoogleMaps上に表示だ。
				さっそくGoogleMaps Flash API のリファレンスを見ながらしこしこ作ってみた。
				
				以前の記事の下北GPSログの情報を流用した。
				
				マーカーをクリックで該当箇所の画像が見られる。
				地図上のラインは、KMLから緯度経度ルート情報を作成した、
				外部ファイルから取得している。
				リストはこんな感じ。
				突貫で作ったので、今度余裕があったらコレをオサレ化してみようと思う。
				Google API Key、 Flickr API Keyは伏せたソース一覧↓
				＊以下のファイル他、as3flickrlibにちょっと手をいれてます。
				GPSPhoto.as(メイン)
				&#62;&#62;text
				ACTIONSCRIPT:
				
				
				
				package &#123;
				import com.adobe.webapis.flickr.PhotoSet;
				import com.google.maps.LatLng;
				import flash.display.Sprite;
				import flash.events.Event;
				import flash.events.IOErrorEvent;
				import flash.net.URLLoader;
				import flash.net.URLRequest;
				&#160;
				public class GPSPhoto extends Sprite
				&#123;
				private var csvURL:String = "shimokita.csv";
				private var setid:String = "72157620666800332";
				&#160;
				private var gpsLoader:URLLoader;
				private var map:Gmap;
				private var flcon:FlickerConnector;
				private var flickrImageList:Array;
				private var photoSet:PhotoSet;
				&#160;
				public function GPSPhoto&#40;&#41;
				&#123;
				// パラメータでGPSリストとPhotoSetのID取得
				if&#40;loaderInfo.parameters.propertyIsEnumerable&#40;"csvURL"&#41;&#41; this.csvURL = loaderInfo.parameters&#91;"csvURL"&#93;;
				if&#40;loaderInfo.parameters.propertyIsEnumerable&#40;"setid"&#41;&#41; this.csvURL = loaderInfo.parameters&#91;"setid"&#93;;
				&#160;
				stage.align = "TL";
				stage.scaleMode = "noScale";
				map = new Gmap&#40;750,600,this.mapReadyHandler&#41;;
				map.onMarkerClick  [...]]]></description>
			<content:encoded><![CDATA[				<div style="text-align:center"><img class="alignnone size-full wp-image-1086" style="border:solid 1px #333" title="title" src="http://parpue.net/wp-content/uploads/2009/07/title.jpg" alt="title" width="525" height="198" /></div>
				<p><a href="http://parpue.net/web/996">ちょっと前</a>にas3flickrlibを使ってFlickrの緯度経度情報の取り方を調べた。</p>
				<p>緯度経度情報が取れたのなら、やることはひとつ、<br />
				GoogleMaps上に表示だ。<br />
				さっそくGoogleMaps Flash API のリファレンスを見ながらしこしこ作ってみた。</p>
				<p><span id="more-1070"></span></p>
				<p><a href="http://parpue.net/diary/722">以前の記事</a>の下北GPSログの情報を流用した。<br />
				<object id="degrafabezier" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="750" height="600" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="FlashVars" value="csvURL=http://parpue.net/wp-content/uploads/2009/07/shimokita.csv" /><param name="wmode" value="transparent" /><param name="bgcolor" value="#ffffff" /><param name="allowScriptAccess" value="sameDomain" /><param name="src" value="http://parpue.net/wp-content/uploads/2009/07/GPSPhoto.swf" /><embed id="degrafabezier" type="application/x-shockwave-flash" width="750" height="600" src="http://parpue.net/wp-content/uploads/2009/07/GPSPhoto.swf" allowscriptaccess="sameDomain" bgcolor="#ffffff" wmode="transparent" flashvars="csvURL=http://parpue.net/wp-content/uploads/2009/07/shimokita.csv" quality="high"></embed></object><br />
				マーカーをクリックで該当箇所の画像が見られる。<br />
				地図上のラインは、KMLから緯度経度ルート情報を作成した、<br />
				外部ファイルから取得している。<br />
				<a href="http://parpue.net/wp-content/uploads/2009/07/shimokita.csv">リストはこんな感じ。</a><br />
				突貫で作ったので、今度余裕があったらコレをオサレ化してみようと思う。</p>
				<p>Google API Key、 Flickr API Keyは伏せたソース一覧↓<br />
				＊以下のファイル他、as3flickrlibにちょっと手をいれてます。</p>
				<p>GPSPhoto.as(メイン)</p>
				<div class="igBar"><span id="lactionscript-5"><a href="#" onclick="javascript:showPlainTxt('actionscript-5'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
				<div id="actionscript-5">
				<div class="actionscript">
				<ol style="margin:0px; padding:0px" >
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">package <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">webapis</span>.<span style="color: #006600;">flickr</span>.<span style="color: #006600;">PhotoSet</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">LatLng</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">IOErrorEvent</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> GPSPhoto <span style="color: #0066CC;">extends</span> Sprite</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> csvURL:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">"shimokita.csv"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> setid:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">"72157620666800332"</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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> gpsLoader:URLLoader;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> map:Gmap;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> flcon:FlickerConnector;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> flickrImageList:<span style="color: #0066CC;">Array</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> photoSet:PhotoSet;</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GPSPhoto<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></li>
				<li style="color:#26536A;"><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;"><span style="color: #808080; font-style: italic;">// パラメータでGPSリストとPhotoSetのID取得</span></li>
				<li style="color:#26536A;"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>loaderInfo.<span style="color: #006600;">parameters</span>.<span style="color: #006600;">propertyIsEnumerable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"csvURL"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">csvURL</span> = loaderInfo.<span style="color: #006600;">parameters</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">"csvURL"</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;"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>loaderInfo.<span style="color: #006600;">parameters</span>.<span style="color: #006600;">propertyIsEnumerable</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"setid"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">csvURL</span> = loaderInfo.<span style="color: #006600;">parameters</span><span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">"setid"</span><span style="color: #66cc66;">&#93;</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: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span> = <span style="color: #ff0000;">"TL"</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span> = <span style="color: #ff0000;">"noScale"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">map = <span style="color: #000000; font-weight: bold;">new</span> Gmap<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">750</span>,<span style="color: #cc66cc;color:#800000;">600</span>,<span style="color: #0066CC;">this</span>.<span style="color: #006600;">mapReadyHandler</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">map.<span style="color: #006600;">onMarkerClick</span> = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onMarkerClickHandler</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>map<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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> mapReadyHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">url</span>:<span style="color: #0066CC;">String</span> = csvURL;</li>
				<li style="color:#26536A;"><span style="color: #000000; font-weight: bold;">var</span> request:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</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;">gpsLoader = <span style="color: #000000; font-weight: bold;">new</span> URLLoader<span style="color: #66cc66;">&#40;</span>request<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">gpsLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, loadCompleteHandler<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;">gpsLoader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>IOErrorEvent.<span style="color: #006600;">IO_ERROR</span>, ioErrorHandler<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;">flcon = <span style="color: #000000; font-weight: bold;">new</span> FlickerConnector;</li>
				<li style="color:#26536A;">flcon.<span style="color: #006600;">onFail</span> = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onFlickrFailHandler</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">flcon.<span style="color: #006600;">onGetInfo</span> = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onGetInfoHandler</span>;</li>
				<li style="color:#26536A;">flcon.<span style="color: #006600;">onGetPhotos</span> = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onGetPhotosHandler</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;">flcon.<span style="color: #006600;">getInfo</span><span style="color: #66cc66;">&#40;</span>setid<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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onMarkerClickHandler<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;color:#800000;">0</span>; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">flickrImageList</span>.<span style="color: #0066CC;">length</span>; i++<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;"><span style="color: #000000; font-weight: bold;">var</span> image:FlickrImage = flickrImageList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;</li>
				<li style="color:#26536A;"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>image.<span style="color: #006600;">id</span> == id<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;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">map</span>.<span style="color: #006600;">showPhoto</span><span style="color: #66cc66;">&#40;</span>image.<span style="color: #006600;">width_m</span>, image.<span style="color: #006600;">height_m</span>, <span style="color: #000000; font-weight: bold;">new</span> LatLng<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">parseFloat</span><span style="color: #66cc66;">&#40;</span>image.<span style="color: #006600;">latitude</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #0066CC;">parseFloat</span><span style="color: #66cc66;">&#40;</span>image.<span style="color: #006600;">longitude</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>, image.<span style="color: #006600;">title</span>, image.<span style="color: #006600;">url_m</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;"><span style="color: #b1b100;">break</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;"><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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loadCompleteHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #000000; font-weight: bold;">var</span> lineGeoCSV:<span style="color: #0066CC;">String</span> = <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#40;</span>gpsLoader.<span style="color: #0066CC;">data</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: #000000; font-weight: bold;">var</span> geoList:<span style="color: #0066CC;">Array</span> = lineGeoCSV.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">" "</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;"><span style="color: #000000; font-weight: bold;">var</span> pointList:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span>=<span style="color: #cc66cc;color:#800000;">0</span>; i</li>
				<li style="color:#26536A;"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#40;</span>geoList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>==<span style="color: #ff0000;">""</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">continue</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #000000; font-weight: bold;">var</span> infos:<span style="color: #0066CC;">Array</span> = <span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#40;</span>geoList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">split</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">","</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">pointList.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> LatLng<span style="color: #66cc66;">&#40;</span>infos<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">1</span><span style="color: #66cc66;">&#93;</span>, infos<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</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;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">map.<span style="color: #006600;">drawPolyline</span><span style="color: #66cc66;">&#40;</span>pointList<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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGetInfoHandler<span style="color: #66cc66;">&#40;</span>photoset:PhotoSet<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">photoSet</span> = photoSet;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">flcon</span>.<span style="color: #006600;">getPhotos</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">setid</span><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: #808080; 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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGetPhotosHandler<span style="color: #66cc66;">&#40;</span>flickrImageList:<span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">flickrImageList</span> = flickrImageList;</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: #808080; 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: #808080; font-style: italic;">for (var i:Number = 0; i &amp;lt;flickrImageList.length; i++) {</span></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">var image:FlickrImage = flickrImageList[i];</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #808080; font-style: italic;">this.addChild(image.image);</span></li>
				<li style="color:#26536A;"><span style="color: #808080; 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;">map.<span style="color: #006600;">drawMarkers</span><span style="color: #66cc66;">&#40;</span>flickrImageList<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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onFlickrFailHandler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #808080; 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: #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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> ioErrorHandler<span style="color: #66cc66;">&#40;</span>event:IOErrorEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #808080; 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: #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;"><span style="color: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
				<p>Gmap.as 地図管理用</p>
				<div class="igBar"><span id="lactionscript-6"><a href="#" onclick="javascript:showPlainTxt('actionscript-6'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
				<div id="actionscript-6">
				<div class="actionscript">
				<ol style="margin:0px; padding:0px" >
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">package</li>
				<li style="color:#26536A;"><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;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">InfoWindowOptions</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</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;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">Map</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">MapEvent</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">MapMouseEvent</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">controls</span>.<span style="color: #006600;">MapTypeControl</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">controls</span>.<span style="color: #006600;">ZoomControl</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">overlays</span>.<span style="color: #006600;">Marker</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">overlays</span>.<span style="color: #006600;">MarkerOptions</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">overlays</span>.<span style="color: #006600;">Polyline</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">overlays</span>.<span style="color: #006600;">PolylineOptions</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">styles</span>.<span style="color: #006600;">FillStyle</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">styles</span>.<span style="color: #006600;">StrokeStyle</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: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Point</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">StyleSheet</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: #808080; font-style: italic;">/**</span></li>
				<li style="color:#26536A;"><span style="color: #808080; 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: #808080; font-style: italic;">* @author okm</span></li>
				<li style="color:#26536A;"><span style="color: #808080; 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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Gmap <span style="color: #0066CC;">extends</span> Sprite</li>
				<li style="color:#26536A;"><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;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> map:Map;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> markerList:<span style="color: #0066CC;">Array</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> onReady:<span style="color: #000000; font-weight: bold;">Function</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> onMarkerClick:<span style="color: #000000; font-weight: bold;">Function</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Gmap<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>:<span style="color: #0066CC;">Number</span>,<span style="color: #0066CC;">height</span>:<span style="color: #0066CC;">Number</span>, onReady:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span></li>
				<li style="color:#26536A;"><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;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">onReady</span> = onReady;</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;">markerList = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</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;">map = <span style="color: #000000; font-weight: bold;">new</span> Map;</li>
				<li style="color:#26536A;">map.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MapEvent.<span style="color: #006600;">MAP_READY</span>, onReady<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;">map.<span style="color: #0066CC;">key</span> = <span style="color: #ff0000;">"Google Maps APIキー"</span>;</li>
				<li style="color:#26536A;">map.<span style="color: #006600;">addControl</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> MapTypeControl<span style="color: #66cc66;">&#40;</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;">map.<span style="color: #006600;">addControl</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> ZoomControl<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">map.<span style="color: #006600;">setSize</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>, <span style="color: #0066CC;">height</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;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>map<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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> drawPolyline<span style="color: #66cc66;">&#40;</span>pointList:<span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #000000; font-weight: bold;">var</span> polyline:Polyline = <span style="color: #000000; font-weight: bold;">new</span> Polyline<span style="color: #66cc66;">&#40;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">pointList,</li>
				<li style="color:#26536A;"><span style="color: #000000; font-weight: bold;">new</span> PolylineOptions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span> strokeStyle: <span style="color: #000000; font-weight: bold;">new</span> StrokeStyle<span style="color: #66cc66;">&#40;</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;"><span style="color: #0066CC;">color</span>: 0x6481F5,</li>
				<li style="color:#26536A;">thickness: <span style="color: #cc66cc;color:#800000;">4</span>,</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">alpha: <span style="color: #cc66cc;color:#800000;">0</span>.<span style="color: #cc66cc;color:#800000;">7</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span></li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</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;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">map</span>.<span style="color: #006600;">addOverlay</span><span style="color: #66cc66;">&#40;</span>polyline<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">map</span>.<span style="color: #006600;">setCenter</span><span style="color: #66cc66;">&#40;</span>pointList<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;color:#800000;">0</span><span style="color: #66cc66;">&#93;</span>,<span style="color: #cc66cc;color:#800000;">17</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> drawMarkers<span style="color: #66cc66;">&#40;</span>flickrImageList:<span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;color:#800000;">0</span>; i &amp;lt;flickrImageList.<span style="color: #0066CC;">length</span>; i++<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;"><span style="color: #000000; font-weight: bold;">var</span> image:FlickrImage = flickrImageList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>;</li>
				<li style="color:#26536A;"><span style="color: #000000; font-weight: bold;">var</span> marker:Marker = <span style="color: #000000; font-weight: bold;">new</span> Marker<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> LatLng<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">parseFloat</span><span style="color: #66cc66;">&#40;</span>image.<span style="color: #006600;">latitude</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #0066CC;">parseFloat</span><span style="color: #66cc66;">&#40;</span>image.<span style="color: #006600;">longitude</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;"><span style="color: #000000; font-weight: bold;">new</span> MarkerOptions<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">strokeStyle: <span style="color: #000000; font-weight: bold;">new</span> StrokeStyle<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">color</span>: 0x666666<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;">fillStyle: <span style="color: #000000; font-weight: bold;">new</span> FillStyle<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span><span style="color: #0066CC;">color</span>: 0x6481F5, alpha: <span style="color: #cc66cc;color:#800000;">0</span>.<span style="color: #cc66cc;color:#800000;">8</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>,</li>
				<li style="color:#26536A;">radius: <span style="color: #cc66cc;color:#800000;">12</span>,</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">hasShadow: <span style="color: #000000; font-weight: bold;">true</span></li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</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;">marker.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MapMouseEvent.<span style="color: #006600;">CLICK</span>, onMarkerClickHandler, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;color:#800000;">1</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">markerList</span>.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>id:image.<span style="color: #006600;">id</span>, marker:marker<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: #0066CC;">this</span>.<span style="color: #006600;">map</span>.<span style="color: #006600;">addOverlay</span><span style="color: #66cc66;">&#40;</span>marker<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;"><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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onMarkerClickHandler<span style="color: #66cc66;">&#40;</span>event:MapMouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;color:#800000;">0</span>; i &amp;lt;markerList.<span style="color: #0066CC;">length</span>; i++<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;"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>markerList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">marker</span> == event.<span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">onMarkerClick</span> != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onMarkerClick</span><span style="color: #66cc66;">&#40;</span>markerList<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">id</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: #b1b100;">continue</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;"><span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">//map.panTo(event.target.getLatLng()); //マーカー座標へ移動</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> showPhoto<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>:<span style="color: #0066CC;">Number</span>, <span style="color: #0066CC;">height</span>:<span style="color: #0066CC;">Number</span>, latlng:LatLng, title:<span style="color: #0066CC;">String</span>, imageUrl:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #000000; font-weight: bold;">var</span> style:StyleSheet = <span style="color: #000000; font-weight: bold;">new</span> StyleSheet<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;</li>
				<li style="color:#26536A;"><span style="color: #000000; font-weight: bold;">var</span> heading:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</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;">heading.<span style="color: #006600;">fontWeight</span> = <span style="color: #ff0000;">"bold"</span>;</li>
				<li style="color:#26536A;">heading.<span style="color: #0066CC;">color</span> = <span style="color: #ff0000;">"#FF0000"</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: #000000; font-weight: bold;">var</span> body:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Object</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;">body.<span style="color: #006600;">fontStyle</span> = <span style="color: #ff0000;">"italic"</span>;</li>
				<li style="color:#26536A;">body.<span style="color: #006600;">textAlign</span> = <span style="color: #ff0000;">"center"</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;">style.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">".heading"</span>, heading<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;">style.<span style="color: #0066CC;">setStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"body"</span>, body<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: #808080; font-style: italic;">// インフォウィンドウ　オープン</span></li>
				<li style="color:#26536A;">map.<span style="color: #006600;">openInfoWindow</span><span style="color: #66cc66;">&#40;</span>latlng, <span style="color: #000000; font-weight: bold;">new</span> InfoWindowOptions<span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#123;</span> <span style="color: #0066CC;">width</span>:<span style="color: #0066CC;">width</span>+<span style="color: #cc66cc;color:#800000;">20</span>, <span style="color: #0066CC;">height</span>:<span style="color: #0066CC;">height</span>+<span style="color: #cc66cc;color:#800000;">35</span>,hasCloseButton: <span style="color: #000000; font-weight: bold;">true</span>, contentHTML:<span style="color: #ff0000;">"&lt;span class="</span>heading<span style="color: #ff0000;">"&gt;"</span>+title+<span style="color: #ff0000;">"&lt;/span&gt;</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #ff0000;">&lt;img src="</span>&amp;quot;+imageUrl+&amp;quot;<span style="color: #ff0000;">" alt="</span><span style="color: #ff0000;">" /&gt;"</span>, contentStyleSheet:style, hasTail:<span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span><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: #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>
				</ol>
				</div>
				</div>
				</div>
				<p>FlickerConnector.as Flickr管理用</p>
				<div class="igBar"><span id="lactionscript-7"><a href="#" onclick="javascript:showPlainTxt('actionscript-7'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
				<div id="actionscript-7">
				<div class="actionscript">
				<ol style="margin:0px; padding:0px" >
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">package</li>
				<li style="color:#26536A;"><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;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">webapis</span>.<span style="color: #006600;">flickr</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">FlickrResultEvent</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">webapis</span>.<span style="color: #006600;">flickr</span>.<span style="color: #006600;">FlickrService</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">webapis</span>.<span style="color: #006600;">flickr</span>.<span style="color: #006600;">methodgroups</span>.<span style="color: #006600;">Photos</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">webapis</span>.<span style="color: #006600;">flickr</span>.<span style="color: #006600;">methodgroups</span>.<span style="color: #006600;">PhotoSets</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">webapis</span>.<span style="color: #006600;">flickr</span>.<span style="color: #006600;">Photo</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Loader</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">LoaderInfo</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">IOErrorEvent</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</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: #808080; font-style: italic;">/**</span></li>
				<li style="color:#26536A;"><span style="color: #808080; 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: #808080; font-style: italic;">* @author okm</span></li>
				<li style="color:#26536A;"><span style="color: #808080; 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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FlickerConnector</li>
				<li style="color:#26536A;"><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;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> fls:FlickrService;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> photos:Photos;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> photoSets:PhotoSets;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> photoIndex:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;color:#800000;">0</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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _imageList:<span style="color: #0066CC;">Array</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _thumnailList:<span style="color: #0066CC;">Object</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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> imageLoader:Loader; <span style="color: #808080; font-style: italic;">// 画像ローダ</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> onGetPhotos:<span style="color: #000000; font-weight: bold;">Function</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> onGetInfo:<span style="color: #000000; font-weight: bold;">Function</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> onFail:<span style="color: #000000; font-weight: bold;">Function</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> FlickerConnector<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span></li>
				<li style="color:#26536A;"><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;"><span style="color: #0066CC;">this</span>._imageList = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</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;">fls = <span style="color: #000000; font-weight: bold;">new</span> FlickrService<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Flickr API キー"</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;">photoSets = <span style="color: #000000; font-weight: bold;">new</span> PhotoSets<span style="color: #66cc66;">&#40;</span>fls<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;">fls.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FlickrResultEvent.<span style="color: #006600;">PHOTOSETS_GET_PHOTOS</span>, GetPhptosComplete<span style="color: #66cc66;">&#41;</span></li>
				<li style="color:#26536A;">fls.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FlickrResultEvent.<span style="color: #006600;">PHOTOSETS_GET_INFO</span>, GetInfoComplete<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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getPhotos<span style="color: #66cc66;">&#40;</span>setid:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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;">photoSets.<span style="color: #006600;">getPhotosExtras</span><span style="color: #66cc66;">&#40;</span>setid<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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> getInfo<span style="color: #66cc66;">&#40;</span>setid:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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;">photoSets.<span style="color: #006600;">getInfo</span><span style="color: #66cc66;">&#40;</span>setid<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: #808080; 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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> GetPhptosComplete<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:FlickrResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<span style="color: #0066CC;">e</span>.<span style="color: #006600;">success</span> &amp;amp;&amp;amp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onFail</span> != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> onFail<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;</li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">//photoSetの写真のタイトルとURLを配列に格納</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:uint; i &amp;lt;e.<span style="color: #0066CC;">data</span>.<span style="color: #006600;">photoSet</span>.<span style="color: #006600;">photos</span>.<span style="color: #0066CC;">length</span> ; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #000000; font-weight: bold;">var</span> flickrImage:FlickrImage = <span style="color: #000000; font-weight: bold;">new</span> FlickrImage<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">data</span>.<span style="color: #006600;">photoSet</span>.<span style="color: #006600;">photos</span><span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</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: #0066CC;">this</span>._imageList.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>flickrImage<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: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">onGetPhotos</span> != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onGetPhotos</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>._imageList<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: #808080; font-style: italic;">//getNextPhoto();</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: #808080; 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: #808080; font-style: italic;">private function getNextPhoto():void {</span></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">if (this.photoIndex&amp;gt;= this._imageList.length) {</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #808080; font-style: italic;">// ロード完了</span></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">if (this.onGetPhotos != null) this.onGetPhotos(this._imageList);</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #808080; font-style: italic;">return;</span></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">}</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">var image:FlickrImage = this._imageList[photoIndex];</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">imageLoader = new Loader();</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">var imageURLreq:URLRequest = new URLRequest(image.url_t);</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #808080; font-style: italic;">var imgInfo:LoaderInfo = imageLoader.contentLoaderInfo;</span></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">imgInfo.addEventListener(Event.INIT, onImageInit);</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #808080; font-style: italic;">imgInfo.addEventListener(IOErrorEvent.IO_ERROR, onImageIOError);</span></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">imageLoader.load(imageURLreq);</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #808080; font-style: italic;">}</span></li>
				<li style="color:#26536A;"><span style="color: #808080; 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;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onImageInit<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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;"><span style="color: #000000; font-weight: bold;">var</span> image:FlickrImage = <span style="color: #0066CC;">this</span>._imageList<span style="color: #66cc66;">&#91;</span>photoIndex<span style="color: #66cc66;">&#93;</span>;</li>
				<li style="color:#26536A;">image.<span style="color: #006600;">image</span> = <span style="color: #0066CC;">this</span>.<span style="color: #006600;">imageLoader</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">photoIndex</span>++;</li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">//getNextPhoto();</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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onImageIOError<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">onFail</span> != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> onFail<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;"><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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> GetInfoComplete<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:FlickrResultEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!<span style="color: #0066CC;">e</span>.<span style="color: #006600;">success</span> &amp;amp;&amp;amp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onFail</span> != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> onFail<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;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>.<span style="color: #006600;">onGetInfo</span> != <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">this</span>.<span style="color: #006600;">onGetInfo</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">data</span>.<span style="color: #006600;">PhotoSet</span><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: #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: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
				<p>FlickrImage.as　画像情報オブジェクト</p>
				<div class="igBar"><span id="lactionscript-8"><a href="#" onclick="javascript:showPlainTxt('actionscript-8'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
				<div id="actionscript-8">
				<div class="actionscript">
				<ol style="margin:0px; padding:0px" >
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">package</li>
				<li style="color:#26536A;"><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;"><span style="color: #0066CC;">import</span> com.<span style="color: #006600;">adobe</span>.<span style="color: #006600;">webapis</span>.<span style="color: #006600;">flickr</span>.<span style="color: #006600;">Photo</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObject</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: #808080; 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: #808080; font-style: italic;">* ...</span></li>
				<li style="color:#26536A;"><span style="color: #808080; font-style: italic;">* @author okm</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #808080; font-style: italic;">*/</span></li>
				<li style="color:#26536A;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> FlickrImage</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> id:<span style="color: #0066CC;">String</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> title:<span style="color: #0066CC;">String</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> latitude:<span style="color: #0066CC;">String</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> longitude:<span style="color: #0066CC;">String</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> url_m:<span style="color: #0066CC;">String</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> url_t:<span style="color: #0066CC;">String</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> width_t:<span style="color: #0066CC;">Number</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> height_t:<span style="color: #0066CC;">Number</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> width_m:<span style="color: #0066CC;">Number</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> height_m:<span style="color: #0066CC;">Number</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> image:DisplayObject;</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> FlickrImage<span style="color: #66cc66;">&#40;</span>photo:Photo<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;">&#123;</span></li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">id</span> = photo.<span style="color: #006600;">id</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">title</span> = photo.<span style="color: #006600;">title</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">longitude</span> = photo.<span style="color: #006600;">longitude</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">latitude</span> = photo.<span style="color: #006600;">latitude</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">longitude</span> = photo.<span style="color: #006600;">longitude</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">url_m</span> = photo.<span style="color: #006600;">url_m</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">url_t</span> = photo.<span style="color: #006600;">url_t</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">width_m</span> = photo.<span style="color: #006600;">width_m</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">height_m</span> = photo.<span style="color: #006600;">height_m</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">width_t</span> = photo.<span style="color: #006600;">width_t</span>;</li>
				<li style="color:#26536A;"><span style="color: #0066CC;">this</span>.<span style="color: #006600;">height_t</span> = photo.<span style="color: #006600;">height_t</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;"><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: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
]]></content:encoded>
			<wfw:commentRss>http://parpue.net/web/1070/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<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-10"><a href="#" onclick="javascript:showPlainTxt('javascript-10'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-10">
				<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>ストリートビューと地図の連携</title>
		<link>http://parpue.net/web/249</link>
		<comments>http://parpue.net/web/249#comments</comments>
		<pubDate>Wed, 13 Aug 2008 11:24:12 +0000</pubDate>
		<dc:creator>okm</dc:creator>
				<category><![CDATA[WEB]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[googlemaps]]></category>
		<category><![CDATA[ストリートビュー]]></category>

		<guid isPermaLink="false">http://parpue.net/?p=249</guid>
		<description><![CDATA[				前回は、自動で下北をぐるぐる歩き回らせるのを作りましたが、
				今回はストリートビューを自分でマウスで移動させて、地図のほうの位置を変更させるという、
				まさに、本家でやれ！なものを作って見ました。
	 [...]]]></description>
			<content:encoded><![CDATA[				<p>前回は、自動で下北をぐるぐる歩き回らせるのを作りましたが、<br />
				今回はストリートビューを自分でマウスで移動させて、地図のほうの位置を変更させるという、<br />
				まさに、本家でやれ！なものを作って見ました。<br />
				自動でウロウロに比べたら簡単。<br />
				動きは本家と変わらないですが、しいて言うならキャラクタが向き変えるところでしょうか。</p>
				<p>前回の自動でウロウロと、今回の自分でウロウロ組み合わせると、<br />
				ストリートビュー鬼ごっこゲームができそうですね。</p>
				<p><span id="more-249"></span><br />
				↓今回はストリートビューのほうをマウスで操作</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>ストリートビューの角度の変更イベントが <strong>yawchanged</strong>、<br />
				位置の変更イベントが <strong>initialized</strong> で得られます。<br />
				それに応じて、キャラクターの向きと、地図の位置を変更してやっています。</p>
				<p>ソースコード全部</p>
				<div class="igBar"><span id="ljavascript-12"><a href="#" onclick="javascript:showPlainTxt('javascript-12'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-12">
				<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: #009900; font-style: italic;">// GoogleMapsの初期化</span></li>
				<li style="color:#26536A;"><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="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&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="color:#26536A;">&nbsp; &nbsp;map.<span style="color: #006600;">disableDragging</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;<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="color:#26536A;">&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="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&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="color:#26536A;">&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="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> initPanorama<span style="color: #66cc66;">&#40;</span>lat, lng<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; streetViewClient = <span style="color: #003366; font-weight: bold;">new</span> GStreetviewClient;</li>
				<li style="color:#26536A;">&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="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&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="color:#26536A;">&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="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&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="color:#26536A;">&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="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: #000066; font-weight: bold;">return</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; nowLatLng = latlng;</li>
				<li style="color:#26536A;">&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="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; GEvent.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span>streetPanorama, </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: #3366CC;">"yawchanged"</span>, </li>
				<li style="color:#26536A;">&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="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;changeYaw<span style="color: #66cc66;">&#40;</span>yaw<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;<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; &nbsp; &nbsp; GEvent.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span>streetPanorama, </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: #3366CC;">"initialized"</span>, </li>
				<li style="color:#26536A;">&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="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;panoramaInitialized<span style="color: #66cc66;">&#40;</span>location<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;<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;</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><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> 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: #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="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&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="color:#26536A;"><span style="color: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
				<p>そういえば、私事ですが、結婚パーティーではここでも書いた、<br />
				ビンゴの景品のクジ用のAirアプリを無事プロジェクターで動作させることができました。</p>
				<p>ものを作って人に喜んでもらうのは、本当にうれしいですね。</p>
				<p>ライブのほうも無事(?)成功しました。<br />
				レポートは<a href="http://chocolataste-planner.jp/">バンドのホームページ</a>のほうに、書こうかなと思います。</p>
				<p>ところで、前から開発合宿みたいなものを一度してみたかったんですが、<br />
				今度それが叶いそうです。</p>
				<p>2泊3日で、どんなものができるのか、このBlogでもレポートしていきたいと思います。8/22~24 の予定。</p>
]]></content:encoded>
			<wfw:commentRss>http://parpue.net/web/249/feed</wfw:commentRss>
		<slash:comments>0</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-15"><a href="#" onclick="javascript:showPlainTxt('javascript-15'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-15">
				<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-16"><a href="#" onclick="javascript:showPlainTxt('javascript-16'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-16">
				<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>
		<item>
		<title>Googleストリートビューで勝手に下北沢周辺を散歩するやつ作ってみた</title>
		<link>http://parpue.net/web/196</link>
		<comments>http://parpue.net/web/196#comments</comments>
		<pubDate>Wed, 06 Aug 2008 09:59:44 +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=196</guid>
		<description><![CDATA[				
				Googleストリートビュー、日本地域も対応して、にぎやかな事になってますね。
				自分の住んでるところとか、なつかしのあの場所とか見ると本当におもしろい！
				周囲を360度パノラマで見ること [...]]]></description>
			<content:encoded><![CDATA[				<p><img src="http://parpue.net/wp-content/uploads/street.png" alt="" title="street" width="453" height="170" class="alignnone size-full wp-image-197" /></p>
				<p>Googleストリートビュー、日本地域も対応して、にぎやかな事になってますね。<br />
				自分の住んでるところとか、なつかしのあの場所とか見ると本当におもしろい！</p>
				<p>周囲を360度パノラマで見ることができることにもびっくりです。</p>
				<p>というわけで、さっそくGoogleMapsと、このストリートビューを使って、<br />
				下北界隈を勝手に散歩するようなものを作ってみた。</p>
				<p>↓以下続き<br />
				<span id="more-196"></span></p>
				<div style="padding-left:20px">
				<table>
				<tr>
				<td>
				<div id="pano" style="width:360px;height:300px;border:solid 1px">
				<input type="button" onClick="initMap(35.66188145562874,139.6673360466957);" value="ここをクリックでスタート"/></div>
				</td>
				<td>
				<div style="position:relative">
				<div id="map" style="width:360px;height:300px;border:solid 1px;position:relative"></div>
				<div id="girl" style="width:40px;height:60px;position:absolute;top:120px;left:160px"><img src="/common/image/shita.gif"/></div>
				</div>
				<div style="clear:both"></div>
				</td>
				</tr>
				</table>
				</div>
				<p>画像は、<b>マウスドラッグやアイコンクリックで回転</b>することができます。<br />
				<b>キャラクタが向いている方向が、表示されている画像の方向</b>です。<br />
				<b>移動については制御不能です。勝手に散歩し続けます。</b></p>
				<p>まだリファレンスの日本語化ができていないようなので、<br />
				→<a href="http://code.google.com/intl/en/apis/maps/documentation/reference.html" target="_blank">http://code.google.com/intl/en/apis/maps/documentation/reference.html</a>　<br />
				を読みながら作ってみました。</p>
				<p>独特な関数が多かったですが、作ってて面白かったです。</p>
				<p>今回目をつけたのが、GStreetviewDataクラスのlinkパラメータ。<br />
				「Array of GStreetviewLink」<br />
				Links to neighbouring panoramas, if any. (Since 2.104)</p>
				<p>とあり、<strong>お隣のパノラマ画像がある位置の情報</strong>が取れるようです。</p>
				<p>あとは迷路プログラムのような感じで作り上げました。</p>
				<p>現在位置から移動できる隣接のポイントを取得<br />
				　↓<br />
				取得したもののうち、前いたポイントではないものを選択して移動</p>
				<p>コレを繰り返すことによって、<br />
				直線を進み、交差点ではランダムに曲がります。</p>
				<p>以下ソースコード全文です。initMap(緯度、経度)でお散歩スタートです。</p>
				<div class="igBar"><span id="ljavascript-18"><a href="#" onclick="javascript:showPlainTxt('javascript-18'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-18">
				<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> moveInterval;</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> initMap<span style="color: #66cc66;">&#40;</span>lat, lng<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;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="color:#26536A;">&nbsp; &nbsp;map.<span style="color: #006600;">disableDragging</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;<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="color:#26536A;">&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="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&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="color:#26536A;">&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="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> initPanorama<span style="color: #66cc66;">&#40;</span>lat, lng<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;streetViewClient = <span style="color: #003366; font-weight: bold;">new</span> GStreetviewClient;</li>
				<li style="color:#26536A;">&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="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&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="color:#26536A;">&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="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&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="color:#26536A;">&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="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: #000066; font-weight: bold;">return</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;nowLatLng = latlng;</li>
				<li style="color:#26536A;">&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="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;GEvent.<span style="color: #006600;">addListener</span><span style="color: #66cc66;">&#40;</span>streetPanorama,</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; <span style="color: #3366CC;">"yawchanged"</span>,</li>
				<li style="color:#26536A;">&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="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; changeYaw<span style="color: #66cc66;">&#40;</span>yaw<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&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="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: #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;">3000</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;"><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;">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; &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="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; <span style="color: #003366; font-weight: bold;">var</span> nextYaw; <span style="color: #009900; font-style: italic;">// 次に向かう方向</span></li>
				<li style="color:#26536A;">&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="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&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="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; &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: #009900; font-style: italic;">// 目的地へGO！</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: #009900; font-style: italic;">//streetPanorama.setLocationAndPOV( nowLatLng, {yaw:nextYaw, pitch:0, zoom:-1});</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; streetPanorama.<span style="color: #006600;">followLink</span><span style="color: #66cc66;">&#40;</span>nextYaw<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; 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; &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: #009900; font-style: italic;">//streetPanorama.setPOV({yaw:nextYaw, pitch:0, zoom:-1});</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; moveInterval = setInterval<span style="color: #66cc66;">&#40;</span>toNextPanorama, <span style="color: #CC0000;color:#800000;">3000</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; <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;<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: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&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;"><span style="color: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
				<p>ちなみにコレを応用したものを <a href="http://millon.jp/map/shimokita" target="_blank">millon</a> でも利用してみました。</p>
]]></content:encoded>
			<wfw:commentRss>http://parpue.net/web/196/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>FlashDevelop で GoogleMaps API for Flash</title>
		<link>http://parpue.net/web/94</link>
		<comments>http://parpue.net/web/94#comments</comments>
		<pubDate>Wed, 23 Jul 2008 07:27:33 +0000</pubDate>
		<dc:creator>okm</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[WEB]]></category>
		<category><![CDATA[actionscript3]]></category>
		<category><![CDATA[googlemaps]]></category>

		<guid isPermaLink="false">http://parpue.net/?p=94</guid>
		<description><![CDATA[				Google Maps API for FlashがGoogleから出てた。(結構前にｗ）
				Google Maps API が Flash からも使用できるようになりました
				リファレンスも整ってい [...]]]></description>
			<content:encoded><![CDATA[				<p>Google Maps API for FlashがGoogleから出てた。(結構前にｗ）</p>
				<p><a href="http://googlejapan.blogspot.com/2008/05/google-maps-api-flash.html" target="_blank">Google Maps API が Flash からも使用できるようになりました</a></p>
				<p>リファレンスも整っています。<br />
				<a href="http://code.google.com/intl/ja/apis/maps/documentation/flash/reference.html" target="_blank">http://code.google.com/intl/ja/apis/maps/documentation/flash/reference.html</a><br />
				というわけで早速（？）、ただ、表示してみた。</p>
				<p><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0  " width="400px"  height="300px"><param name="movie" value="/wp-content/uploads/gmaptest_n.swf"><param name="quality" value="high"><param name="flashVars" value="key=ABQIAAAAUkh7HCJhaHZwB8NdUIOf9BRWrZCxqh63GA9XgvJsztwOFcB46RQ6NhTBhC6unVWxe7tvM7TOSTlx9w"><embed width="400px" height="300px" src="/wp-content/uploads/gmaptest_n.swf" quality="high"        flashVars="key=ABQIAAAAUkh7HCJhaHZwB8NdUIOf9BRWrZCxqh63GA9XgvJsztwOFcB46RQ6NhTBhC6unVWxe7tvM7TOSTlx9w" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object><br />
				↑Flashです。</p>
				<p>とりあえずただ、表示してみただけだと、JavaScript版と何も変わらないので、<br />
				Flashらしく（？）まわしてみた。<br />
				<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0  " width="400px"  height="300px"><param name="movie" value="/wp-content/uploads/gmaptest.swf"><param name="quality" value="high"><param name="flashVars" value="key=ABQIAAAAUkh7HCJhaHZwB8NdUIOf9BRWrZCxqh63GA9XgvJsztwOFcB46RQ6NhTBhC6unVWxe7tvM7TOSTlx9w"><embed width="400px" height="300px" src="/wp-content/uploads/gmaptest.swf" quality="high"        flashVars="key=ABQIAAAAUkh7HCJhaHZwB8NdUIOf9BRWrZCxqh63GA9XgvJsztwOFcB46RQ6NhTBhC6unVWxe7tvM7TOSTlx9w" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed></object><br />
				いらっとしますねーコレｗ<br />
				回りながらも地図操作受け付けます。すげー。</p>
				<p>とりあえずFlashDevelopで使うに当たって↓<br />
				<span id="more-94"></span></p>
				<p><a href="http://code.google.com/intl/ja/apis/maps/documentation/flash/index.html" target="blank">http://code.google.com/intl/ja/apis/maps/documentation/flash/index.html<br />
				</a><br />
				ここから「the Google Maps API for Flash SDK」をダウンロードします。</p>
				<p>sdk.zip内のlibフォルダをFLashDevelopで作ったAS3プロジェクトのフォルダ内にコピーします。</p>
				<p><a href="http://parpue.net/wp-content/uploads/gmaptest.png" rel="shadowbox[post-94];player=img;"><img src="http://parpue.net/wp-content/uploads/gmaptest-300x261.png" alt="" title="gmaptest" width="300" height="261" class="alignnone size-medium wp-image-102" /></a></p>
				<p>次に、libフォルダ内の「map_flex_1_5.swc」をプロジェクトのプロパティから、<br />
				<strong>SWC Include Liblaries</strong>に<strong>lib/map_flex_1_5.swc</strong>を追加します。</p>
				<p><img src="http://parpue.net/wp-content/uploads/swc.png" alt="swc" title="swc" width="372" height="376" class="size-full wp-image-103" /></p>
				<p>これでGoogleMaps関連のライブラリが読み込まれ、コード補完もされるようになります。</p>
				<p>GoogleMapsを表示できるFlashを生成できますしたが、動かすためには、<br />
				Flash配置タグ内に　動かすサーバのドメインに対応するAPIKeyを記述しなければなりません。<br />
				&gt;FlashVars key=API Key(ランダム文字列）/&lt;こんなの。<br />
				しかも、API取得時に指定したドメイン上に配置しないと、、、動かせない。</p>
				<p>これが非常にめんどくさい！パブリッシュしてすぐ確認できないなんて！！<br />
				仕方ないので、パブリッシュ→アップロード→確認。めんどー・・・。<br />
				GoogleMaps For Flash の最大の壁な気がする。<br />
				（だからしばらくさわらなそー・・・）</p>
				<p>以下、GoogleMapsを読み込んでぐるぐる回すののソース</p>
				<p>GMapTest.as</p>
				<div class="igBar"><span id="lactionscript-21"><a href="#" onclick="javascript:showPlainTxt('actionscript-21'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
				<div id="actionscript-21">
				<div class="actionscript">
				<ol style="margin:0px; padding:0px" >
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">package src <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</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: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Point</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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> GmapTest <span style="color: #0066CC;">extends</span> Sprite <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; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> mymap:MyMap;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GmapTest<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; &nbsp; &nbsp; &nbsp; mymap = <span style="color: #000000; font-weight: bold;">new</span> MyMap;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mymap.<span style="color: #006600;">setSize</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">400</span>, <span style="color: #cc66cc;color:#800000;">300</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; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>mymap<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; mymap.<span style="color: #006600;">x</span> = -<span style="color: #cc66cc;color:#800000;">200</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; mymap.<span style="color: #006600;">y</span> = -<span style="color: #cc66cc;color:#800000;">150</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;color:#800000;">200</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: #0066CC;">this</span>.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;color:#800000;">150</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, gmapOnEnter<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; <span style="color: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; </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: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> gmapOnEnter<span style="color: #66cc66;">&#40;</span>evnet:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">this</span>.<span style="color: #006600;">rotation</span> += <span style="color: #cc66cc;color:#800000;">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; <span style="color: #66cc66;">&#125;</span>&nbsp; &nbsp;</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;"><span style="color: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
				<p>MyMap.as</p>
				<div class="igBar"><span id="lactionscript-22"><a href="#" onclick="javascript:showPlainTxt('actionscript-22'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
				<div id="actionscript-22">
				<div class="actionscript">
				<ol style="margin:0px; padding:0px" >
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">package src <span style="color: #66cc66;">&#123;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">controls</span>.<span style="color: #006600;">MapTypeControl</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: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">controls</span>.<span style="color: #006600;">PositionControl</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">controls</span>.<span style="color: #006600;">ZoomControl</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: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">LatLng</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">Map</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: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">MapEvent</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">google</span>.<span style="color: #006600;">maps</span>.<span style="color: #006600;">MapType</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; </li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> MyMap <span style="color: #0066CC;">extends</span> Map <span style="color: #66cc66;">&#123;</span>&nbsp; &nbsp; </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: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> MyMap<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; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">super</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; addEventListener<span style="color: #66cc66;">&#40;</span>MapEvent.<span style="color: #006600;">MAP_READY</span>, onMapReady<span style="color: #66cc66;">&#41;</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; </li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onMapReady<span style="color: #66cc66;">&#40;</span>event:MapEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</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; addControl<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> MapTypeControl<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addControl<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> ZoomControl<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; addControl<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> PositionControl<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; setCenter<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> LatLng<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;color:#800000;">35</span>.<span style="color: #cc66cc;color:#800000;">67431</span>, <span style="color: #cc66cc;color:#800000;">139</span>.<span style="color: #cc66cc;color:#800000;">69082</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #cc66cc;color:#800000;">14</span>, MapType.<span style="color: #006600;">NORMAL_MAP_TYPE</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; <span style="color: #66cc66;">&#125;</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;"><span style="color: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
]]></content:encoded>
			<wfw:commentRss>http://parpue.net/web/94/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>GoogleMaps にカスタムウィンドウを表示する。</title>
		<link>http://parpue.net/web/71</link>
		<comments>http://parpue.net/web/71#comments</comments>
		<pubDate>Wed, 23 Jul 2008 07:26:47 +0000</pubDate>
		<dc:creator>okm</dc:creator>
				<category><![CDATA[WEB]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[millon]]></category>
		<category><![CDATA[googlemaps]]></category>

		<guid isPermaLink="false">http://parpue.net/?p=71</guid>
		<description><![CDATA[				ここで書いた記事の転載と、補足
				Google Maps API には、InfoWindowという、
				地図上にウィンドウを表示するための機能が備わっています。
				このウィンドウは地図上に情報を [...]]]></description>
			<content:encoded><![CDATA[				<p><a href="http://www.opensource.co.jp/techdept.php/item/322">ここ</a>で書いた記事の転載と、補足</p>
				<p>Google Maps API には、InfoWindowという、<br />
				地図上にウィンドウを表示するための機能が備わっています。</p>
				<p>このウィンドウは地図上に情報を表示する分には、<br />
				十分な機能を持っています。</p>
				<p>しかし<a href="http://millon.jp/map/">millon.jp</a>で使用するにあたって、サイトのイメージと<br />
				表示されるウィンドウのイメージが若干合わなかったため、<br />
				自分でデザインしたウィンドウを表示しました。<br />
				<img src="http://parpue.net/wp-content/uploads/g1.png" alt="g1" title="g1" width="287" height="284" class="size-full wp-image-86" /><br />
				google maps のinfowindow<br />
				<img src="http://parpue.net/wp-content/uploads/g2.png" alt="自分でつくったウィンドウ" title="g2" width="261" height="185" class="size-full wp-image-87" /><br />
				自分で作ったウィンドウを表示</p>
				<p>GoogleMaps は画像やHTML要素を、オーバーレイ要素として<br />
				地図上に貼り付けることができます。</p>
				<p>その機能を用いて、DIV要素を独自のウィンドウとしてGoogleMaps上に貼り付けます。</p>
				<p><span id="more-71"></span></p>
				<p>実行テスト</p>
				<div style="position:relative">
				<div id="map" style="width:400px;height:400px;border:solid 1px">
				</div>
				<div id="ci_div" style="position:absolute;width:100px;height:100px;border:solid 1px;background-color:#FFF;display:none">カスタムウィンドウです！</div>
				</div>
				<div id="first_click"><a href="javascript:;" onClick="showMap();">■最初にここをクリックして地図を表示■</a></div>
				<div id="second_click" style="display:none">
				<a href="javascript:;" onClick="openWindowLatLng('渋谷です',35.67431,139.69082)">■渋谷駅の緯度経度に表示■</a><br />
				<a href="javascript:;" onClick="closeWindow()">■ウィンドウ非表示■</a>
				</div>
				<p>カスタムウィンドウの表示のための手順ですが、<br />
				まずは<strong>地図や、カスタムウィンドウとして表示するDIV</strong>を準備しておきます。</p>
				<div class="igBar"><span id="lhtml-26"><a href="#" onclick="javascript:showPlainTxt('html-26'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">HTML:</span>
				<div id="html-26">
				<div class="html">
				<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;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"position:relative"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></li>
				<li style="color:#26536A;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"map"</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"width:400px;height:400px;"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></li>
				<li style="color:#26536A;"><span style="color: #009900;"><a href="http://december.com/html/4/element/div.html"><span style="color: #000000; font-weight: bold;">&lt;div</span></a> <span style="color: #000066;">id</span>=<span style="color: #ff0000;">"ci_div"</span> <span style="color: #000066;">style</span>=<span style="color: #ff0000;">"position:absolute;width:100px;height:100px;border:solid 1px;background-color:#FFF;"</span><span style="color: #000000; font-weight: bold;">&gt;</span></a></span>カスタムウィンドウです！<span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;"><span style="color: #009900;"><span style="color: #000000; font-weight: bold;">&lt;/div&gt;</span></span> </li>
				</ol>
				</div>
				</div>
				</div>
				<p>
				* ピクセル位置でカスタムウィンドウの位置を指定する必要があるため、<br />
				一番外側を position="relative"を指定したDIVで囲む必要があります。</p>
				<p>GoogleMaps APIで定義されている<strong>GOverLayインターフェースを実装したクラス</strong>を作成します。<br />
				このクラスのインスタンスをaddOverlayすることで、<br />
				GoogleMap上にオーバーレイとして貼り付けることができます。</p>
				<div class="igBar"><span id="ljavascript-27"><a href="#" onclick="javascript:showPlainTxt('javascript-27'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-27">
				<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;">// 地図の表示</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;">setCenter</span><span style="color: #66cc66;">&#40;</span><span style="color: #003366; font-weight: bold;">new</span> GLatLng<span style="color: #66cc66;">&#40;</span><span style="color: #CC0000;color:#800000;">35</span>.<span style="color: #CC0000;color:#800000;">67431</span>, <span style="color: #CC0000;color:#800000;">139</span>.<span style="color: #CC0000;color:#800000;">69082</span><span style="color: #66cc66;">&#41;</span>,<span style="color: #CC0000;color:#800000;">13</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; <span style="color: #009900; font-style: italic;">// オーバーレイ用のDIV</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> customInfoDIV = document.<span style="color: #006600;">getElementById</span><span style="color: #66cc66;">&#40;</span><span style="color: #3366CC;">"ci_div"</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: #009900; font-style: italic;">// GOverlayインターフェースを実装するcustomBoxクラスを作成</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">function</span> customBox<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</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; customBox.<span style="color: #006600;">prototype</span> = <span style="color: #003366; font-weight: bold;">new</span> GOverlay<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; customBox.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">initialize</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>map<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; <span style="color: #009900; font-style: italic;">// GoogleMap上に定義されているPaneのうち、マーカーと同じ高さに</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #009900; font-style: italic;">// カスタムウィンドウ用のDIVを追加。</span></li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp; &nbsp; &nbsp; map.<span style="color: #006600;">getPane</span><span style="color: #66cc66;">&#40;</span>G_MAP_MARKER_PANE<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">appendChild</span><span style="color: #66cc66;">&#40;</span>customInfoDIV<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; &nbsp; &nbsp; customInfoDIV.<span style="color: #006600;">style</span>.<span style="color: #006600;">zIndex</span> = <span style="color: #CC0000;color:#800000;">300000</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; customBox.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">remove</span> = <span style="color: #003366; font-weight: bold;">function</span><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; &nbsp; map.<span style="color: #006600;">getPane</span><span style="color: #66cc66;">&#40;</span>G_MAP_MARKER_PANE<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span>customInfoDIV<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; customBox.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">copy</span> = <span style="color: #003366; font-weight: bold;">function</span><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; &nbsp; <span style="color: #000066; font-weight: bold;">return</span> <span style="color: #003366; font-weight: bold;">new</span> customBox<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: #66cc66;">&#125;</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; customBox.<span style="color: #006600;">prototype</span>.<span style="color: #006600;">redraw</span> = <span style="color: #003366; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span>force<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</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; <span style="color: #009900; font-style: italic;">// customBoxをオーバーレイとして貼り付ける</span></li>
				<li style="color:#26536A;">&nbsp; &nbsp; customInfoWindow = <span style="color: #003366; font-weight: bold;">new</span> customBox<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; map.<span style="color: #006600;">addOverlay</span><span style="color: #66cc66;">&#40;</span>customInfoWindow<span style="color: #66cc66;">&#41;</span>; </li>
				</ol>
				</div>
				</div>
				</div>
				<p>GMap2.getPaneでGoogleMaps上で定義されているレイアにアクセスすることができますので、<br />
				今回は、マーカーが表示されるレイアと同じ高さにウィンドウが表示されるようにしています。<br />
				では、この貼り付けたオーバーレイを操作できる関数を用意して、<br />
				InfoWindowのような動きをさせれば完成です。</p>
				<div class="igBar"><span id="ljavascript-28"><a href="#" onclick="javascript:showPlainTxt('javascript-28'); return false;">&gt;&gt;text</a></span></div>
				<div class="syntax_hilite"><span class="langName">JAVASCRIPT:</span>
				<div id="javascript-28">
				<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;">// 指定位置の緯度経度にウィンドウ表示</span></li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">function</span> openWindowLatLng<span style="color: #66cc66;">&#40;</span>msg, lat, lng<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> marker_pixls = map.<span style="color: #006600;">fromLatLngToDivPixel</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: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; <span style="color: #003366; font-weight: bold;">var</span> x = marker_pixls.<span style="color: #006600;">x</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> y = marker_pixls.<span style="color: #006600;">y</span> ;</li>
				<li style="color:#26536A;">&nbsp; &nbsp; openWindowXY<span style="color: #66cc66;">&#40;</span>msg, marker_pixls.<span style="color: #006600;">x</span>, marker_pixls.<span style="color: #006600;">y</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: #009900; font-style: italic;">// 指定のピクセル位置にウィンドウ表示</span></li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">function</span> openWindowXY<span style="color: #66cc66;">&#40;</span>msg, x, y<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;map.<span style="color: #006600;">removeOverlay</span><span style="color: #66cc66;">&#40;</span>customInfoWindow<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;customInfoDIV.<span style="color: #006600;">style</span>.<span style="color: #006600;">display</span> = <span style="color: #3366CC;">"block"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;customInfoDIV.<span style="color: #006600;">style</span>.<span style="color: #006600;">zIndex</span> = <span style="color: #CC0000;color:#800000;">4000000</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;customInfoDIV.<span style="color: #006600;">style</span>.<span style="color: #006600;">postion</span> = <span style="color: #3366CC;">"absolute"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;customInfoDIV.<span style="color: #006600;">style</span>.<span style="color: #006600;">top</span> = y + <span style="color: #3366CC;">"px"</span>;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;customInfoDIV.<span style="color: #006600;">style</span>.<span style="color: #006600;">left</span> = x + <span style="color: #3366CC;">"px"</span>;</li>
				<li style="font-family: 'Courier New', Courier, monospace; color: black; font-weight: normal; font-style: normal;color:#3A6A8B;">&nbsp; &nbsp;customInfoDIV.<span style="color: #006600;">innerHTML</span> = msg;</li>
				<li style="color:#26536A;">&nbsp; &nbsp;map.<span style="color: #006600;">addOverlay</span><span style="color: #66cc66;">&#40;</span>customInfoWindow<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: #009900; font-style: italic;">// ウィンドウ閉じる</span></li>
				<li style="color:#26536A;"><span style="color: #003366; font-weight: bold;">function</span> closeWindow<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;map.<span style="color: #006600;">removeOverlay</span><span style="color: #66cc66;">&#40;</span>customInfoWindow<span style="color: #66cc66;">&#41;</span>;</li>
				<li style="color:#26536A;"><span style="color: #66cc66;">&#125;</span> </li>
				</ol>
				</div>
				</div>
				</div>
				<p>DIVを装飾してウィンドウとし、好きな位置に表示することができるようになります。</p>
				<p>＊ただし、このウィンドウは地図のスクロールには追従しますが、<br />
				拡大率が変わった場合には、ピクセル位置の指定が緯度経度とずれてしまいます。<br />
				そのため、ズームのイベント時に再表示する必要があります。</p>
]]></content:encoded>
			<wfw:commentRss>http://parpue.net/web/71/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
