/*
svマーカーを範囲外において押下しても、infoWindowが表示されてしまう



名称	緯度		経度		倍率	ピッチ	ヨー
アジェ	35.009937	135.763205	0		5		60
*/

function getGlobalPath()
{
	var f = function(e)
	{
		var name = e.tagName;
		if( !!name && name.toUpperCase() == "SCRIPT" )
		{
			return e;
		}
		var c = e.lastChild;
		return (!!c)?f(c):null;
	};
	var es = f(document);
	if(!es)
	{
		return window.location;
	}
	return es.getAttribute("src") || window.location;
};


//str
var g_path_GoogleMap_getCoordinates	= getGlobalPath();	//パスを取得
g_path_GoogleMap_getCoordinates = g_path_GoogleMap_getCoordinates.replace("GoogleMap_getCoordinatesVer2.js", "");	//このJSファイル名を削除して、純粋なパスにする


/********************************************************************************/


/********************************************************************************/
/*	メソッド一覧																*/
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*	set_flgLock																	*/
/*	set_flgGcMove																*/
/*	set_flgSmoothness															*/
/*	set_flgControl_GLargeMapControl												*/
/*	set_flgControl_GSmallMapControl												*/
/*	set_flgControl_GSmallZoomControl											*/
/*	set_flgControl_GScaleControl												*/
/*	set_flgControl_GMapTypeControl												*/
/*	set_flgControl_G_PHYSICAL_MAP												*/
/*	set_flgControl_GOverviewMapControl											*/
/*	set_flgControl_WheelZoom													*/
/*	set_flgControlBatch_standard												*/
/*------------------------------------------------------------------------------*/
/*	set_idZoom																	*/
/*	set_idCoordinatesCenter														*/
/*	set_idCoordinatesMarker														*/
/*	set_idGc																	*/
/*	set_idSv_batch																*/
/*------------------------------------------------------------------------------*/
/*	set_marker_preparation														*/
/*	set_marker																	*/
/*	set_marker_originalIcon														*/
/*	set_marker_polyLine															*/
/*	set_marker_sv																*/
/*------------------------------------------------------------------------------*/
/*	set_polygonLineArray														*/
/*	set_noPolygon																*/
/*------------------------------------------------------------------------------*/
/*	set_centerPaint																*/
/*	set_dragMarkerCoordinates													*/
/*	set_modeGcIw																*/
/*	set_svInfoWindowSize														*/
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*	toForm_coordinatesMarker													*/
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*	put_markerBatch																*/
/*	put_markerWhenDisappearing													*/
/*	put_marker																	*/
/*	put_markerOriginal															*/
/*------------------------------------------------------------------------------*/
/*	put_svMarker																*/
/*------------------------------------------------------------------------------*/
/*	put_toForm																	*/
/*	put_toFormMoveend															*/
/*------------------------------------------------------------------------------*/
/*	put_control																	*/
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*	clear_overlays																*/
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*	draw_streetViewLine															*/
/*	draw_streetViewInfoWindow													*/
/*------------------------------------------------------------------------------*/
/*	draw_polygonLine															*/
/*	┣draw_polygonLineSplitArray												*/
/*	┗draw_polygonLineSetClickEvent												*/
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*	geocoder_moveAndMarkerList													*/
/*	└geocoder_moveAndMarker													*/
/*	string2GPoint																*/
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*	switch_marker																*/
/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
/*	display																		*/
/*	display_dragMarker															*/
/********************************************************************************/
/*	080805	1件住所検索をした時に、マーカー(地図中央)座標をフォーム等に代入するように修正	*/
/*	080711	put_markerWhenDisappearing()を追加									*/
/*	080603	住所から座標を求める機能を実装										*/
/*			put_marker()の戻り値を削除											*/
/*	080514	ホイールでの拡大と縮小を扱えるように変更							*/
/*	080513	Googleオフィシャルアイコンの一部を使用可能に						*/
/*	080424	新規作成															*/
/********************************************************************************/
var GoogleMap_getCoordinatesVer2 = function(instanceName, divName, lat, lon, zoom)
{
	//int
	this.zoom			= zoom;				//5:倍率
	//number
	this.lat			= lat;				//3:緯度
	this.lon			= lon;				//4:経度
	//str
	this.instanceName	= instanceName;		//1:自身のインスタンス名
	this.divName		= divName;			//2:googlaMapをマウントするdivのid

	//int
	this.y								= 0;
	this.imgSizeH_h;									//センターカーソル(縦)の画像の縦幅
	this.imgSizeH_w;									//センターカーソル(縦)の画像の横幅
	this.imgSizeW_h;									//センターカーソル(横)の画像の縦幅
	this.imgSizeW_w;									//センターカーソル(横)の画像の横幅
	this.sizeSvInfoWindow_h				= 200;			//street viewのinfoWindowの縦幅
	this.sizeSvInfoWindow_w				= 100;			//street viewのinfoWindowの横幅
	this.noPolygon;										//押下されたポリラインのNoを保持
	this.miniMapW						= 200;			//右下の小さい地図の横幅
	this.miniMapH						= 200;			//右下の小さい地図の縦幅
	this.modeGcIw						= 0;			//住所検索で表示するマーカー押下時のメッセージタイプ
	//number
	this.latMarker						= null;			//ドラッグできるマーカーの緯度
	this.lonMarker						= null;			//ドラッグできるマーカーの経度
	this.latSv							= null;			//svマーカーの現在の緯度を保持
	this.lonSv							= null;			//svマーカーの現在の経度を保持
	//str
	this.idZoom							= null;
	this.idLat							= null;
	this.idLon							= null;
	this.idLatMarker					= null;
	this.idLonMarker					= null;
	this.idSvLat						= null;
	this.idSvLon						= null;
	this.idSvZoom						= null;
	this.idSvPitch						= null;
	this.idSvYaw						= null;
	this.idGc							= null;
	this.strGc							= "";			//住所から求めた座標を入れるテキストエリア等への文字列
	this.imgH;											//センターカーソル画像(縦)へのパスと名前(表示させない場合は空白文字列をセット)
	this.imgW;											//センターカーソル画像(横)へのパスと名前(表示させない場合は空白文字列をセット)
	//array2
	this.arrayMarker					= new Array();	//[n]、[iconName:マーカー名][lat][lon][iwText:infoWindow用文字][noPolyLine:所属ポリラインNo][svLat][svLon][svPitch][svYaw][svZoom]
	this.arrayPolygonLine				= new Array();	//[n]、[no:ポリラインNo(0開始)][la][lon]
	this.arrayPolygonLineDetail			= new Array();	//[n]、[lat][lon][zoom][lineColor:線色][lineThick:線太さ][lineAlpha:線透明度(0〜1)][paintColor:塗り色][paintAlpha:塗り透明度(0〜1)][iwText:情報ウィンドウ用文言]
	//bool
	this.flgSmoothness					= false;		//移動等をスムーズアニメーションするか否か(safari未対応/重いのでF推奨?)
	this.flgLock						= false;		//ロックモードで表示するか否か
	this.flgGcMove						= true;			//住所検索でマーカーの位置に移動するか
	this.flgControl_GLargeMapControl	= false;		//移動用アローと大きい倍率
	this.flgControl_GSmallMapControl	= false;		//移動用アローと小さい倍率
	this.flgControl_GSmallZoomControl	= false;		//小さい倍率のみ
	this.flgControl_GScaleControl		= false;		//距離計
	this.flgControl_GMapTypeControl		= false;		//マップ種別切り替えボタン
	this.flgControl_G_PHYSICAL_MAP		= false;		//地形レイヤー(マップ種別)
	this.flgControl_GOverviewMapControl	= false;		//右下の小さい地図
	this.flgControl_WheelZoom			= false;		//ホイールでの拡大と縮小(やりすぎるとOSやブラウザが落ちるので非推奨)
	this.flgSvLine						= false;		//ストリートビュー範囲を示す青線の表示状況
	this.flgSvPanoramaDisp				= true;			//svパノラマの表示許可フラグ
	//object
	this.map							= new GMap2( document.getElementById(divName) );
	this.icon							= new GIcon();
	this.geocoder						= null;			//住所検索
	this.sv								= null;			//svオブジェクト
	this.svMarker;										//svマーカー
	this.svInfoWindow					= null;			//svインフォウィンドウ
	this.panorama						= null;			//infoWindowに表示されるsv本体


	this.map.setCenter(new GLatLng(this.lat, this.lon), this.zoom);	//初期値の座標と倍率に移動


	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


	/********************************************************************************/
	/* 引 数 1：[bool]地図をロックするか否か										*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	地図をロックして移動、倍率変更等ができないようにする						*/
	/********************************************************************************/
	this.set_flgLock = function(flgLock)//public
	{
		this.flgLock = flgLock;
	}


	this.set_flgGcMove = function(flgGcMove)
	{
		this.flgGcMove = flgGcMove;
	}


	this.set_flgSmoothness = function(flgSmoothness)
	{
		this.flgSmoothness = flgSmoothness;
	}


	/********************************************************************************/
	/* 引 数 1：[bool]移動用アローと大きい倍率を表示するか否か						*/
	/********************************************************************************/
	this.set_flgControl_GLargeMapControl = function(flgControl_GLargeMapControl)//public
	{
		this.flgControl_GLargeMapControl = flgControl_GLargeMapControl;
	}


	/********************************************************************************/
	/* 引 数 1：[bool]移動用アローと小さい倍率を表示するか否か						*/
	/********************************************************************************/
	this.set_flgControl_GSmallMapControl = function(flgControl_GSmallMapControl)//public
	{
		this.flgControl_GSmallMapControl = flgControl_GSmallMapControl;
	}


	/********************************************************************************/
	/* 引 数 1：[bool]小さい倍率のみを表示するか否か								*/
	/********************************************************************************/
	this.set_flgControl_GSmallZoomControl = function(flgControl_GSmallZoomControl)//public
	{
		this.flgControl_GSmallZoomControl = flgControl_GSmallZoomControl;
	}


	/********************************************************************************/
	/* 引 数 1：[bool]距離計を表示するか否か										*/
	/********************************************************************************/
	this.set_flgControl_GScaleControl = function(flgControl_GScaleControl)//public
	{
		this.flgControl_GScaleControl = flgControl_GScaleControl;
	}


	/********************************************************************************/
	/* 引 数 1：[bool]マップ種別切り替えボタンを表示するか否か						*/
	/********************************************************************************/
	this.set_flgControl_GMapTypeControl = function(flgControl_GMapTypeControl)//public
	{
		this.flgControl_GMapTypeControl = flgControl_GMapTypeControl;
	}


	/********************************************************************************/
	/* 引 数 1：[bool]地形レイヤー(マップ種別)を表示するか否か						*/
	/********************************************************************************/
	this.set_flgControl_G_PHYSICAL_MAP = function(flgControl_G_PHYSICAL_MAP)//public
	{
		this.flgControl_G_PHYSICAL_MAP = flgControl_G_PHYSICAL_MAP;
	}


	/********************************************************************************/
	/* 引 数 1：[bool]右下の小さい地図を表示するか否か								*/
	/*       2：[int]右下の小さい地図の縦幅(省略可)									*/
	/*       3：[int]右下の小さい地図の横幅(省略可)									*/
	/********************************************************************************/
	this.set_flgControl_GOverviewMapControl = function(flgControl_GOverviewMapControl, miniMapH, miniMapW)//public
	{
		this.flgControl_GOverviewMapControl = flgControl_GOverviewMapControl;

		if("undefined" != typeof(miniMapH) ) this.miniMapH = miniMapH;
		if("undefined" != typeof(miniMapW) ) this.miniMapW = miniMapW;
	}


	/********************************************************************************/
	/* 引 数 1：[bool]ホイールで拡大と縮小を許可するか否か							*/
	/********************************************************************************/
	this.set_flgControl_WheelZoom = function(flgControl_WheelZoom)//public
	{
		this.flgControl_WheelZoom = flgControl_WheelZoom;
	}


	/********************************************************************************/
	/*	標準的なコントロールを一括設定												*/
	/********************************************************************************/
	this.set_flgControlBatch_standard = function()//public
	{
		this.flgControl_GLargeMapControl= true;
		this.flgControl_GScaleControl	= true;
		this.flgControl_GMapTypeControl	= true;
		this.flgControl_G_PHYSICAL_MAP	= true;
	}


	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


	/********************************************************************************/
	/* 引 数 1：[str]倍率を入れるテキストボックス等のID								*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	this.set_idZoom = function(idZoom)//public
	{
		this.idZoom = idZoom;
	}


	/********************************************************************************/
	/* 引 数 1：[str]中央座標の緯度を入れるテキストボックス等のID					*/
	/*       2：[str]中央座標の経度を入れるテキストボックス等のID					*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	this.set_idCoordinatesCenter = function(idLat, idLon)//public
	{
		this.idLat = idLat;
		this.idLon = idLon;
	}


	/********************************************************************************/
	/* 引 数 1：[str]ドラッグできるマーカーの緯度を入れるテキストボックス等のID		*/
	/*       2：[str]ドラッグできるマーカーの経度	〃								*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	this.set_idCoordinatesMarker = function(idLatMarker, idLonMarker)//public
	{
		this.idLatMarker = idLatMarker;
		this.idLonMarker = idLonMarker;
	}


	/********************************************************************************/
	/* 引 数 1：[str]住所検索で得た座標を格納するテキストエリア等のid				*
	/********************************************************************************/
	this.set_idGc = function(idGc)//public
	{
		this.idGc = idGc;
	}


	/********************************************************************************/
	/* 引 数 1：[str]svの緯度		を入れるテキストボックス等のID					*/
	/*       2：[str]svの緯度			〃											*/
	/*       3：[str]svの倍率			〃											*/
	/*       4：[str]svのピッチ角		〃											*/
	/*       5：[str]svのヨー角			〃											*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	svの緯度、経度、倍率、ピッチ角、ヨー角を保持するテキストボックス等のidを設定*/
	/********************************************************************************/
	this.set_idSv_batch = function(lat, lon, zoom, pitch, yaw)
	{
		this.idSvLat	= lat;
		this.idSvLon	= lon;
		this.idSvZoom	= zoom;
		this.idSvPitch	= pitch;
		this.idSvYaw	= yaw;
	}


	/*------------------------------------------------------------------------------*/


	/********************************************************************************/
	/* 引 数 1：なし																*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	マーカー連想配列に初期値を設定												*/
	/********************************************************************************/
	this.set_marker_preparation = function()//private
	{
		this.arrayMarker[this.y]				= new Array();
		this.arrayMarker[this.y]["iconName"]	= null;			//nullならデフォルトのマーカー
		this.arrayMarker[this.y]["lat"]			= null;
		this.arrayMarker[this.y]["lon"]			= null;
		this.arrayMarker[this.y]["iwText"]		= null;			//null又は空白文字列以外なら、マーカー押下字にinfoWindowに表示
		this.arrayMarker[this.y]["noPolyLine"]	= null;			//nullなら常に表示
		this.arrayMarker[this.y]["svLat"]		= null;
		this.arrayMarker[this.y]["svLon"]		= null;
		this.arrayMarker[this.y]["svZoom"]		= null;
		this.arrayMarker[this.y]["svPitch"]		= null;
		this.arrayMarker[this.y]["svYaw"]		= null;
	}


	/********************************************************************************/
	/* 引 数 1：[int]緯度															*/
	/*       2：[int]経度															*/
	/*       3：[str]infoWindowに表示する文字列(タグ可/省略可)						*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	スタンダードなマーカーを設定												*/
	/********************************************************************************/
	this.set_marker = function(lat, lon, iwText)//public
	{
		this.set_marker_preparation();


		this.arrayMarker[this.y]["lat"]	= lat;
		this.arrayMarker[this.y]["lon"]	= lon;

		if("undefined" != typeof(iwText) && null != iwText && "" != iwText)
		{
			this.arrayMarker[this.y]["iwText"] = iwText;
		}

		this.y++;
	}


	/********************************************************************************/
	/* 引 数 1：[str]マーカー画像名													*/
	/*       2：[int]緯度															*/
	/*       3：[int]経度															*/
	/*       4：[str]infoWindowに表示する文字列(タグ可/省略可)						*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	スタンダードなマーカーを設定												*/
	/********************************************************************************/
	this.set_marker_originalIcon = function(iconName, lat, lon, iwText)//public
	{
		this.set_marker_preparation();


		this.arrayMarker[this.y]["iconName"]= iconName;
		this.arrayMarker[this.y]["lat"]		= lat;
		this.arrayMarker[this.y]["lon"]		= lon;

		if("undefined" != typeof(iwText) && null != iwText && "" != iwText)
		{
			this.arrayMarker[this.y]["iwText"] = iwText;
		}

		this.y++;
	}


	/********************************************************************************/
	/* 引 数 1：[int]所属No															*/
	/*       2：[int]緯度															*/
	/*       3：[int]経度															*/
	/*       4：[str]infoWindowに表示する文字列(タグ可/省略可)						*/
	/*       5：[str]マーカー画像名(省略可)											*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	スタンダードなマーカーを設定												*/
	/********************************************************************************/
	this.set_marker_polyLine = function(noPolyLine, lat, lon, iwText, iconName)
	{
		this.set_marker_preparation();


		this.arrayMarker[this.y]["noPolyLine"]	= noPolyLine;
		this.arrayMarker[this.y]["lat"]			= lat;
		this.arrayMarker[this.y]["lon"]			= lon;

		if("undefined" != typeof(iwText) && null != iwText && "" != iwText)
		{
			this.arrayMarker[this.y]["iwText"] = iwText;
		}

		if("undefined" != typeof(iconName) && null != iconName && "" != iconName)
		{
			this.arrayMarker[this.y]["iconName"]= iconName;
		}

		this.y++;
	}


	/********************************************************************************/
	/* 引 数 1：[int]マーカーの緯度													*/
	/*       2：[int]マーカーの経度													*/
	/*       3：[int]svパノラマの緯度												*/
	/*       4：[int]svパノラマの経度												*/
	/*       5：[int]svパノラマの倍率												*/
	/*       6：[int]svパノラマのピッチ角											*/
	/*       7：[int]svパノラマのヨー角												*/
	/*       8：[str]infoWindowに表示する文字列(タグ可/省略可)						*/
	/*       9：[str]マーカー画像名(省略可)											*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	スタンダードなマーカーを設定												*/
	/********************************************************************************/
	this.set_marker_sv = function(lat, lon, svLat, svLon, svZoom, svPitch, svYaw, iwText, iconName)
	{
		this.set_marker_preparation();


		this.arrayMarker[this.y]["lat"]			= lat;
		this.arrayMarker[this.y]["lon"]			= lon;
		this.arrayMarker[this.y]["svLat"]			= svLat;
		this.arrayMarker[this.y]["svLon"]			= svLon;
		this.arrayMarker[this.y]["svZoom"]			= svZoom;
		this.arrayMarker[this.y]["svPitch"]			= svPitch;
		this.arrayMarker[this.y]["svYaw"]			= svYaw;


		if("undefined" != typeof(iwText) && null != iwText && "" != iwText)
		{
			this.arrayMarker[this.y]["iwText"] = iwText;
		}

		if("undefined" != typeof(iconName) && null != iconName && "" != iconName)
		{
			this.arrayMarker[this.y]["iconName"]= iconName;
		}

		this.y++;
	}


	/*------------------------------------------------------------------------------*/


	/********************************************************************************/
	/* 引 数 1：[array2]	[n]、[0:ポリラインNo(0開始)][1:経度][2:緯度]			*/
	/*       2：[array2]	[n]、[0:緯度][1:経度][2:倍率][3:線色][4:線太さ][5:線透明度(0〜1)][6:塗り色][7:塗り透明度(0〜1)]	*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	ポリライン配列である引数1と2をそれぞれ連想配列に格納する					*/
	/********************************************************************************/
	this.set_polygonLineArray = function(array, array2)//public
	{
		//int
		var cnt;


		cnt = array.length;
		this.arrayPolygonLine = new Array();
		for(var y = 0; y < cnt; y++)
		{
			this.arrayPolygonLine[y]		= new Array();
			this.arrayPolygonLine[y]["no"]	= array[y][0];
			this.arrayPolygonLine[y]["lat"]	= array[y][1];
			this.arrayPolygonLine[y]["lon"]	= array[y][2];
		}


		cnt = array2.length;
		this.arrayPolygonLineDetail = new Array();
		for(var y = 0; y < cnt; y++)
		{
			this.arrayPolygonLineDetail[y]				= new Array();
			this.arrayPolygonLineDetail[y]["lat"]		= array2[y][0];
			this.arrayPolygonLineDetail[y]["lon"]		= array2[y][1];
			this.arrayPolygonLineDetail[y]["zoom"]		= array2[y][2];
			this.arrayPolygonLineDetail[y]["lineColor"]	= array2[y][3];
			this.arrayPolygonLineDetail[y]["lineThick"]	= array2[y][4];
			this.arrayPolygonLineDetail[y]["lineAlpha"]	= array2[y][5];
			this.arrayPolygonLineDetail[y]["paintColor"]= array2[y][6];
			this.arrayPolygonLineDetail[y]["paintAlpha"]= array2[y][7];
			this.arrayPolygonLineDetail[y]["iwText"]	= array2[y][8];
		}
	}


	/********************************************************************************/
	/* 引 数 1：[int]押下されたポリラインNo											*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	ポリラインが押下された場合にそのNoをメンバ変数に保持する					*/
	/********************************************************************************/
	this.set_noPolygon = function(noPolygon)//private
	{
		this.noPolygon = noPolygon;
	}


	/*------------------------------------------------------------------------------*/


	/********************************************************************************/
	/* 引 数 1：[int]十字の長さ(ピクセル/省略可)									*/
	/*       2：[int]十字の太さ(ピクセル/省略可)									*/
	/*       2：[str]十字の色(スタイルシートと同様の書式/省略可)					*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	中心を示す十字マーカーを塗りで設定する										*/
	/********************************************************************************/
	this.set_centerPaint = function(cross_px, cross_td, cross_cr)//public
	{
		if("undefined" == typeof(cross_px) ) cross_px = 30;
		if("undefined" == typeof(cross_td) ) cross_td = 2;
		if("undefined" == typeof(cross_cr) ) cross_cr = "red";


		//十字の縦線のエレメントを設定
		var cross_v_emt						= document.createElement("div");
		cross_v_emt.style.margin			= "0px";
		cross_v_emt.style.padding			= "0px";
		cross_v_emt.style.width				= cross_td+"px";
		cross_v_emt.style.height			= cross_px + "px";
		cross_v_emt.style.backgroundColor	= cross_cr;


		//十字の横線のエレメントを設定
		var cross_h_emt				= document.createElement("div");
		cross_h_emt.style.fontSize	= "1px";									//IE用にfontSizeを最小値
		cross_h_emt.style.margin	= "0px";
		cross_h_emt.style.padding	= "0px";
		cross_h_emt.style.width		= cross_px + "px";
		cross_h_emt.style.height	= cross_td + "px";
		cross_h_emt.style.borderTop	= cross_cr + " solid " + cross_td + "px";	//横はbackgroundColorだとIE6でバグが出るので


		//十字(縦・横線)の位置を計算
		var MapPX		= this.map.getSize();
		var mycenterHX	= MapPX.width	/ 2 - cross_px / 2;
		var mycenterHY	= MapPX.height	/ 2 - cross_td / 2;
		var mycenterVX	= MapPX.width	/ 2 - cross_td / 2;
		var mycenterVY	= MapPX.height	/ 2 - cross_px / 2;

		var mycenter_H	= new GSize(mycenterHX,mycenterHY);
		var myposH		= new GControlPosition(G_ANCHOR_TOP_LEFT, mycenter_H);
		myposH.apply(cross_h_emt);
		this.map.getContainer().appendChild(cross_h_emt);

		var mycenter_V	= new GSize(mycenterVX, mycenterVY);
		var myposV		= new GControlPosition(G_ANCHOR_TOP_LEFT, mycenter_V);
		myposV.apply(cross_v_emt);
		this.map.getContainer().appendChild(cross_v_emt);
	}


	/********************************************************************************/
	/* 引 数 1：[int]ドラッグできるマーカーの緯度									*/
	/*       2：[int]ドラッグできるマーカーの経度									*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	ドラッグできるマーカーの初期座標を設定										*/
	/********************************************************************************/
	this.set_dragMarkerCoordinates = function(latMarker, lonMarker)//public
	{
		this.latMarker = latMarker;
		this.lonMarker = lonMarker;
	}


	this.set_modeGcIw = function(modeGcIw)
	{
		this.modeGcIw = modeGcIw;
	}


	this.set_svInfoWindowSize = function(h, w)
	{
		this.sizeSvInfoWindow_h = h;
		this.sizeSvInfoWindow_w = w;
	}


	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


	/********************************************************************************/
	/* 引 数 1：[int]マーカーの緯度													*/
	/*       2：[int]マーカーの緯度													*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	マーカーの緯度経度を、テキストボックスなどに入れる。						*/
	/*	ドラッグ可能なマーカーのドラッグ時にコールされることがほとんどなので、		*/
	/*	コールは以下のようにevalが主。												*/
	/*	eval( instanceName + ".toForm_coordinatesMarker(" + LatLngObj.y + ", " +  LatLngObj.x + ")" );	*/
	/********************************************************************************/
	this.toForm_coordinatesMarker = function(lat, lon)//private
	{
		if
		(
			null	!= this.idLatMarker &&
			""		!= this.idLatMarker &&
			null	!= this.idLonMarker &&
			""		!= this.idLonMarker
		)
		{
			document.getElementById(this.idLatMarker).value = lat;
			document.getElementById(this.idLonMarker).value = lon;
		}
	}


	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


	/********************************************************************************/
	/* 引 数 1：[int]押下されたポリラインのNo(省略可)								*
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	this.set_marker()等で指定されたマーカーを地図に配置							*/
	/********************************************************************************/
	this.put_markerBatch = function(noPolygon)//private
	{
		if( "undefined" == typeof(noPolygon) ) noPolygon = null;

		//int
		var cnt					= this.arrayMarker.length;
		//str
		var iconName;
		//bool
		var flgOriginalIcon;

		for(var y = 0; y < cnt; y++)
		{
			var point = new GPoint(this.arrayMarker[y]["lon"], this.arrayMarker[y]["lat"]);

			//常時表示か押下されたポリラインに属するマーカーなら表示
			if(null == this.arrayMarker[y]["noPolyLine"] || noPolygon == this.arrayMarker[y]["noPolyLine"])
			{
				if(null != this.arrayMarker[y]["iconName"]) iconName = this.arrayMarker[y]["iconName"].replace(/^g-/, "");

				//googleオフィシャルアイコン
				if( null != this.arrayMarker[y]["iconName"] && this.arrayMarker[y]["iconName"].match(/^g-/) )
				{
					//ドットマーカー
					if( iconName.match(/-dot$/) )
					{
						this.icon.image				= "http://maps.google.co.jp/mapfiles/ms/icons/" + iconName + ".png";
						this.icon.shadow			= "http://maps.google.co.jp/mapfiles/ms/icons/msmarker.shadow.png";
						this.icon.iconSize			= new GSize(32, 32);
						this.icon.shadowSize		= new GSize(59, 32);
						this.icon.iconAnchor		= new GPoint(16, 32);
						this.icon.infoWindowAnchor	= new GPoint(16, 0);
					}
					//ピン
					else if( iconName.match(/-pushpin$/) )
					{
						this.icon.image				= "http://maps.google.co.jp/mapfiles/ms/icons/" + iconName + ".png";
						this.icon.shadow			= "http://maps.google.co.jp/mapfiles/ms/icons/pushpin_shadow.png";
						this.icon.iconSize			= new GSize(32, 32);
						this.icon.shadowSize		= new GSize(59, 32);
						this.icon.iconAnchor		= new GPoint(10, 32);
						this.icon.infoWindowAnchor	= new GPoint(16, 0);
					}
					//ミニマーカー
					else if( iconName.match(/^mm_20_/) )
					{
						this.icon.image				= "http://labs.google.com/ridefinder/images/" + iconName + ".png";
						this.icon.shadow			= "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
						this.icon.iconSize			= new GSize(12, 20);
						this.icon.shadowSize		= new GSize(22, 20);
						this.icon.iconAnchor		= new GPoint(6, 20);
						this.icon.infoWindowAnchor	= new GPoint(6, 1);
						this.icon.infoShadowAnchor	= new GPoint(13,13);
					}
					//アルファベットマーカー
					else if( iconName.match(/^marker/) )
					{
						this.icon.image				= "http://www.google.com/mapfiles/gadget/letters/" + iconName + ".png";
						this.icon.shadow			= "http://www.google.com/mapfiles/gadget/shadow50Small80.png";
						this.icon.iconSize			= new GSize(16, 27);
						this.icon.shadowSize		= new GSize(30, 28);
						this.icon.iconAnchor		= new GPoint(8, 27);
						this.icon.infoWindowAnchor	= new GPoint(5, 1);
					}
					//緑色矢印
					else if( iconName.match(/^arrowSmall80/) )
					{
						this.icon.image				= "http://www.google.com/mapfiles/gadget/arrowSmall80.png";
						this.icon.shadow			= "http://www.google.com/mapfiles/gadget/arrowshadowSmall80.png";
						this.icon.iconSize			= new GSize(31, 27);
						this.icon.shadowSize		= new GSize(31, 27);
						this.icon.iconAnchor		= new GPoint(9, 27);
						this.icon.infoWindowAnchor	= new GPoint(5, 1);
					}
					//ドットなしマーカー
					else
					{
						this.icon.image				= "http://maps.google.co.jp/mapfiles/ms/icons/" + iconName + ".png";
						this.icon.shadow			= "http://maps.google.co.jp/mapfiles/ms/icons/msmarker.shadow.png";
						this.icon.iconSize			= new GSize(32, 32);
						this.icon.shadowSize		= new GSize(59, 32);
						this.icon.iconAnchor		= new GPoint(16, 32);
						this.icon.infoWindowAnchor	= new GPoint(16, 0);
					}
					this.put_markerOriginal( new GPoint(this.arrayMarker[y]["lon"], this.arrayMarker[y]["lat"]), this.arrayMarker[y]["iwText"] );
				}
				else
				{
					switch(iconName)
					{
						//googleオフィシャルアイコンのレストラン等なら
						case "restaurant"				:
						case "coffeehouse"				:
						case "bar"						:
						case "snack_bar"				:
						case "drinking_water"			:
						case "lodging"					:
						case "wheel_chair_accessible"	:
						case "shopping"					:
						case "movies"					:
						case "grocerystore"				:
						case "convienancestore"			:
						case "arts"						:
						case "homegardenbusiness"		:
						case "electronics"				:
						case "mechanic"					:
						case "pharmacy-us"				:
						case "realestate"				:
						case "salon"					:
						case "dollar"					:
						case "parkinglot"				:
						case "gas"						:
						case "cabs"						:
						case "bus"						:
						case "truck"					:
						case "rail"						:
						case "plane"					:
						case "ferry"					:
						case "helicopter"				:
						case "question"					:
						case "info"						:
						case "flag"						:
						case "earthquake"				:
						case "webcam"					:
						case "postoffice-us"			:
						case "police"					:
						case "firedept"					:
						case "hospitals"				:
						case "landmarks-jp"				:
						case "phone"					:
						case "caution"					:
						case "postoffice-jp"			:
						case "hotsprings"				:
						case "tree"						:
						case "campfire"					:
						case "picnic"					:
						case "campground"				:
						case "rangerstation"			:
						case "toilets"					:
						case "POI"						:
						case "hiker"					:
						case "cycling"					:
						case "motorcycling"				:
						case "horsebackriding"			:
						case "sportvenue"				:
						case "golfer"					:
						case "trail"					:
						case "water"					:
						case "snowflake_simple"			:
						case "marina"					:
						case "fishing"					:
						case "sailing"					:
						case "swimming"					:
						case "waterfalls"				:
							this.icon.image				= "http://maps.google.co.jp/mapfiles/ms/icons/" + iconName + ".png";
							this.icon.shadow			= "http://maps.google.co.jp/mapfiles/ms/icons/" + iconName + ".shadow.png";
							this.icon.iconSize			= new GSize(32, 32);
							this.icon.shadowSize		= new GSize(59, 32);
							this.icon.iconAnchor		= new GPoint(16, 32);
							this.icon.infoWindowAnchor	= new GPoint(16, 0);
							this.put_markerOriginal( new GPoint(this.arrayMarker[y]["lon"], this.arrayMarker[y]["lat"]), this.arrayMarker[y]["iwText"] );
							break;
						//オリジナル又はデフォルトアイコン
						default							:
							if(null != this.arrayMarker[y]["iconName"])
							{
								this.icon.image		= g_path_GoogleMap_getCoordinates + "img/marker/" + this.arrayMarker[y]["iconName"] + ".png";
								this.icon.shadow	= g_path_GoogleMap_getCoordinates + "img/marker/" + this.arrayMarker[y]["iconName"] + "_shadow.png";
								flgOriginalIcon		= true;
							}
							else
							{
								flgOriginalIcon = false;
							}

							switch(this.arrayMarker[y]["iconName"])
							{
								//矢印
								case "arrow":
									this.icon.iconSize			= new GSize(32, 32);
									this.icon.shadowSize		= new GSize(32, 32);
									this.icon.iconAnchor		= new GPoint(14, 26);
									this.icon.infoWindowAnchor	= new GPoint(20, 5);
									break;
								//歯医者
								case "dental":
									this.icon.iconSize			= new GSize(44, 45);
									this.icon.shadowSize		= new GSize(44, 45);
									this.icon.iconAnchor		= new GPoint(13, 37);
									this.icon.infoWindowAnchor	= new GPoint(20, 5);
									break;
								//ポスト
								case "post":
									this.icon.iconSize			= new GSize(32, 32);
									this.icon.shadowSize		= new GSize(32, 32);
									this.icon.iconAnchor		= new GPoint(15, 25);
									this.icon.infoWindowAnchor	= new GPoint(20, 5);
									break;
								//ショップ
								case "shop":
									this.icon.iconSize			= new GSize(32, 32);
									this.icon.shadowSize		= new GSize(32, 32);
									this.icon.iconAnchor		= new GPoint(16, 24);
									this.icon.infoWindowAnchor	= new GPoint(20, 5);
									break;
								//四角アイコン
								case "beauty"	:
								case "gourmet"	:
								case "play"		:
								case "shopping2":
								case "study"	:
								case "travel"	:
									this.icon.iconSize			= new GSize(45, 34);
									this.icon.shadowSize		= new GSize(45, 34);
									this.icon.iconAnchor		= new GPoint(17, 33);
									this.icon.infoWindowAnchor	= new GPoint(20, 5);
									break;
								//該当無しならデフォルトマーカー
								default :
									flgOriginalIcon	= false;
									var marker		= this.put_marker(point, this.arrayMarker[y]["iwText"]);
							}

							if(true == flgOriginalIcon)
							{
								this.put_markerOriginal( new GPoint(this.arrayMarker[y]["lon"], this.arrayMarker[y]["lat"]), this.arrayMarker[y]["iwText"] );
							}
					}
				}
			}
		}
	}


	/********************************************************************************/
	/* 引 数 1：なし																*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	住所検索でヒットせずにマーカーが消えてしまった場合にコール。				*/
	/*	現在の中心座標にドラッグできるマーカーを設置								*/
	/********************************************************************************/
	this.put_markerWhenDisappearing = function()//public
	{
		this.clear_overlays();
		this.put_marker( this.map.getCenter(), '', true );
	}


	/********************************************************************************/
	/* 引 数 1：[object]new GPoint(経度, 緯度)の値									*/
	/*       2：[str]infoWindowに表示する文字列(空白で表示しない/省略可)			*/
	/*       3：[bool]ドラッグできるか否か(省略可)									*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	マーカーを設置。															*/
	/*	説明文があればクリック時にinfoWindowを開くようにする。						*/
	/*	主にthis.put_markerBatch()からのコール										*/
	/********************************************************************************/
	this.put_marker = function(point, text, flg)//private
	{
		//str
		var instanceName	= this.instanceName;
		var map				= this.map;
		var idLat			= this.idLat;
		var idLon			= this.idLon;
		var idZoom			= this.idZoom;


		if( "undefined" == typeof(text)	) text	= null;
		if( "undefined" == typeof(flg)	) flg	= false;

		if( "string" == typeof(point) )
		{
			point = this.string2GPoint(point);
		}

		if(false == flg)
		{
			var marker = new GMarker(point);
		}
		else
		{
			var marker = new GMarker(point, {draggable: true} );
		}


		if(null != text && '' != text)
		{
			GEvent.addListener
			(
				marker,
				"click",
				function()
				{
					marker.openInfoWindowHtml(text);
				}
			);
		}
		this.map.addOverlay(marker);


		//マーカーがドラックされれば
		GEvent.addListener
		(
			marker,
			"dragend",
			function()
			{
				//マーカーの座標を取得して代入
				var LatLngObj = marker.getPoint();
				eval( instanceName + ".toForm_coordinatesMarker(" + LatLngObj.y + ", " +  LatLngObj.x + ")" );

				//マーカーが元々の画面より外にドラッグされるとマップ中心座標が更新されない件の対策
				var LatLngObj = map.getCenter();

				if(null != idZoom && "" != idZoom)
				{
					document.getElementById(idZoom).value = map.getZoom();
				}

				if(null != idLon && "" != idLon && null != idLat && "" != idLat)
				{
					document.getElementById(idLat).value = LatLngObj.y;
					document.getElementById(idLon).value = LatLngObj.x;
				}
			}
		);
	}


	/********************************************************************************/
	/* 引 数 1：[object]new GPoint(経度, 緯度)の値									*/
	/*       2：[str]infoWindowに表示する文言										*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	オリジナルマーカーを設置。													*/
	/*	説明文があればクリック時にinfoWindowを開くようにする。						*/
	/*	主にthis.put_markerBatch()からのコール										*/
	/********************************************************************************/
	this.put_markerOriginal = function(point, text)//private
	{
		var marker = new GMarker(point, this.icon);

		if(null != text)
		{
			GEvent.addListener
			(
				marker,
				"click",
				function()
				{
					marker.openInfoWindowHtml(text);
				}
			);
		}
		this.map.addOverlay(marker);
	}


	/*------------------------------------------------------------------------------*/


	/********************************************************************************/
	/* 引 数 1：[int]svマーカーの初期位緯度											*/
	/*       2：[int]svマーカーの初期位経度											*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	svマーカーをマップ上に設置													*/
	/********************************************************************************/
	this.put_svMarker = function(lat, lon)//public
	{
		//str
		var instanceName	= this.instanceName;
		//object
		var latlng			= new GLatLng(lat, lon);
		var svIcon			= new GIcon(G_DEFAULT_ICON);
		var client			= new GStreetviewClient();
		var svPoint;


		this.sv = new GStreetviewOverlay();

		this.latSv = lat;
		this.lonSv = lon;


		svIcon.image			= "http://maps.google.com/intl/en_us/mapfiles/cb/man_arrow-0.png";
		svIcon.shadow			= null;
		svIcon.imageMap			= [26,13, 30,14, 32,28, 27,28, 28,36, 18,35, 18,27, 16,26, 16,20, 16,14, 19,13, 22,8];	//svマーカーのドラッグ可能範囲指定
		svIcon.iconSize			= new GSize(49, 52);
		svIcon.iconAnchor		= new GPoint(25, 35);
		svIcon.infoWindowAnchor	= new GPoint(25, 5);
		this.svMarker			= new GMarker( latlng, {icon: svIcon, draggable: true} );
		this.map.addOverlay(this.svMarker);


		//svマーカー押下でsvインフォウィンドウ表示
		GEvent.addListener
		(
			eval(instanceName + ".svMarker"),
			"click",
			function()
			{
				eval( "if(true === " + instanceName + ".flgSvPanoramaDisp) " + instanceName + ".draw_streetViewInfoWindow(" + instanceName + ".latSv, " + instanceName + ".lonSv);" );
			}
		);


		//svマーカードラッグで、svインフォウィンドウ表示位置を変えておく
		GEvent.addListener
		(
			eval(instanceName + ".svMarker"),
			"dragend",
			function()
			{
				//最寄のsv表示エリアに移動
				var LatLngObj = eval( instanceName + ".svMarker.getPoint();" );
				svPoint = new GLatLng(LatLngObj.y, LatLngObj.x);
				client.getNearestPanorama
				(
					svPoint,
					function(data)
					{
						//近くにsvがあれば
						if(data.code == 200)
						{
							this.flgSvPanoramaDisp = true;
							var gpObj = new GLatLng(data.location.latlng.y, data.location.latlng.x);
							eval( instanceName + ".svMarker.setPoint(gpObj);" );
							eval( instanceName + ".latSv = data.location.latlng.y;" );
							eval( instanceName + ".lonSv = data.location.latlng.x;" );
						}
						else
						{
							this.flgSvPanoramaDisp = false;
							return;
						}
					}
				);
			}
		);
	}


	/*------------------------------------------------------------------------------*/


	/********************************************************************************/
	/* 引 数 1：なし																*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	idが設定されていれば、そのテキストボックス等に初期の座標や倍率をセットする。*/
	/*	ドラッグできるマーカーの経度緯度はここでは扱わない							*/
	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
	/*	・マップ倍率																*/
	/*	・中心の経度と緯度															*/
	/********************************************************************************/
	this.put_toForm = function()//private
	{
		var LatLngObj = this.map.getCenter();


		//倍率
		if(null != this.idZoom && "" != this.idZoom)
		{
			document.getElementById(this.idZoom).value = this.map.getZoom();
		}

		//マップ中央の経度と緯度
		if(null != this.idLon && "" != this.idLon && null != this.idLat && "" != this.idLat)
		{
			document.getElementById(this.idLat).value = LatLngObj.y;
			document.getElementById(this.idLon).value = LatLngObj.x;
		}
	}


	/********************************************************************************/
	/* 引 数 1：[object]this.map													*/
	/*       2：[str]緯度															*/
	/*       3：[str]経度															*/
	/*       4：[int]倍率															*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	idが設定されていれば、そのテキストボックス等に初期の座標や倍率をセットする。*/
	/*	ドラッグできるマーカーの経度緯度はここでは扱わない							*/
	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/
	/*	・マップ倍率																*/
	/*	・中心の経度と緯度															*/
	/********************************************************************************/
	this.put_toFormMoveend = function(map, idLat, idLon, idZoom)//private
	{
		//地図がドラッグされ終わったのをトリガにして起動し、座標を取得する
		GEvent.addListener
		(
			map,
			"moveend",
			function()
			{
				var LatLngObj = map.getCenter();

				if(null != idZoom && "" != idZoom)
				{
					document.getElementById(idZoom).value = map.getZoom();
				}

				if(null != idLon && "" != idLon && null != idLat && "" != idLat)
				{
					document.getElementById(idLat).value = LatLngObj.y;
					document.getElementById(idLon).value = LatLngObj.x;
				}
			}
		);
	}


	/*------------------------------------------------------------------------------*/


	/********************************************************************************/
	/* 引 数 1：なし																*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	各種コントローラを表示														*/
	/********************************************************************************/
	this.put_control = function()//private
	{
		if(true == this.flgLock)
		{
			this.map.disableDragging();			//ドラッグ不可
			this.map.disableInfoWindow();		//infoWindowを削除
			this.map.disableDoubleClickZoom();	//右ダブルクリックでのズームアウト禁止
		}
		else
		{
			if(true == this.flgControl_GLargeMapControl)	this.map.addControl( new GLargeMapControl()		);	//移動用アローと大きい倍率
			if(true == this.flgControl_GSmallMapControl)	this.map.addControl( new GSmallMapControl()		);	//移動用アローと小さい倍率
			if(true == this.flgControl_GSmallZoomControl)	this.map.addControl( new GSmallZoomControl()	);	//小さい倍率のみ
			if(true == this.flgControl_GScaleControl)		this.map.addControl( new GScaleControl()		);	//距離計
			if(true == this.flgControl_WheelZoom)			this.map.enableScrollWheelZoom();					//ホイールでの拡大と縮小


			//マップ種別切り替えボタン
			if(true == this.flgControl_GMapTypeControl)
			{
															this.map.addControl( new GMapTypeControl(1) );	//デフォルト3種類
				if(true == this.flgControl_G_PHYSICAL_MAP)	this.map.addMapType(G_PHYSICAL_MAP);			//地形レイヤー
			}

			//右下の小さい地図
			if(true == this.flgControl_GOverviewMapControl)
			{
				var miniMap = new GOverviewMapControl( new GSize(this.miniMapW, this.miniMapH) );
				this.map.addControl(miniMap);
			}
		}
	}


	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


	/********************************************************************************/
	/*	全てのオーバーレイを削除													*/
	/********************************************************************************/
	this.clear_overlays = function()//public
	{
		this.map.clearOverlays();
	}


	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


	/********************************************************************************/
	/* 引 数 1：なし																*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	ストリートビューが使用可能な青線の表示・非表示を切り替える					*/
	/********************************************************************************/
	this.draw_streetViewLine = function()//public
	{
		//非表示→表示
		if(false == this.flgSvLine)
		{
			this.map.addOverlay(this.sv);
		}
		//表示→非表示
		else
		{
			this.map.removeOverlay(this.sv);
		}
		this.flgSvLine = !this.flgSvLine;
	}


	/********************************************************************************/
	/* 引 数 1：[int]緯度															*/
	/*       2：[int]経度															*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	vsマーカーにinfoWindowを表示して、更にその中にsvを表示する					*/
	/********************************************************************************/
	this.draw_streetViewInfoWindow = function(lat, lon)//private
	{
		//str
		var instanceName	= this.instanceName;


		this.map.openInfoWindow( new GLatLng(lat, lon), "<div id='pano' style='width:" + this.sizeSvInfoWindow_w + "px;height:" + this.sizeSvInfoWindow_h + "px;'></div>" );	//divエレメント生成
		this.svInfoWindow = this.map.getInfoWindow();

		this.panorama = new GStreetviewPanorama( document.getElementById("pano") );	//svオブジェクト生成
		this.panorama.setLocationAndPOV( this.svMarker.getLatLng(), null );			//sv表示


		if(null != this.idSvLat) document.getElementById(this.idSvLat).value = lat;
		if(null != this.idSvLon) document.getElementById(this.idSvLon).value = lon;


		//道を押下で移動
		GEvent.addListener
		(
			eval(instanceName + ".panorama"),
			"initialized",
			function(location)
			{
				//svマーカーを移動
				eval( instanceName + ".svMarker.setPoint( new GLatLng(location.latlng.y, location.latlng.x) );" );
				//sv情報ウィンドウを引数の内容で再描画
				eval( instanceName + ".svInfoWindow.reset( new GLatLng(location.latlng.y, location.latlng.x), " + instanceName + ".svInfoWindow.tabs, new GSize(" + instanceName + ".sizeSvInfoWindow_w, " + instanceName + ".sizeSvInfoWindow_h) );" );
				//テキストボックス等に経緯度を代入
				eval( "if(null != " + instanceName + ".idSvLat) document.getElementById(" + instanceName + ".idSvLat).value = location.latlng.y;" );
				eval( "if(null != " + instanceName + ".idSvLon) document.getElementById(" + instanceName + ".idSvLon).value = location.latlng.x;" );
			}
		);


		//倍率変更
		if(null != this.idSvZoom)
		{
			GEvent.addListener
			(
				eval(instanceName + ".panorama"),
				"zoomchanged",
				function(zoom)
				{
					eval( "document.getElementById(" + instanceName + ".idSvZoom).value = zoom;" );
				}
			);
		}


		//ピッチ角変更
		if(null != this.idSvPitch)
		{
			GEvent.addListener
			(
				eval(instanceName + ".panorama"),
				"pitchchanged",
				function(pitch)
				{
					eval( "document.getElementById(" + instanceName + ".idSvPitch).value = pitch;" );
				}
			);
		}


		//ヨー角変更
		if(null != this.idSvYaw)
		{
			GEvent.addListener
			(
				eval(instanceName + ".panorama"),
				"yawchanged",
				function(yaw)
				{
					eval( "document.getElementById(" + instanceName + ".idSvYaw).value = yaw;" );
				}
			);
		}
	}


	/*------------------------------------------------------------------------------*/


	/********************************************************************************/
	/* 引 数 1：なし																*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	ポリライン描画																*/
	/********************************************************************************/
	this.draw_polygonLine = function()//private
	{
		//int
		var y;
		var y2;
		var lat;										//緯度
		var lon;										//経度
		var cnt			= this.arrayPolygonLine.length;
		//array
		var arrayNo		= new Array();
		var arraySplit	= new Array();
		var arrayPoints	= new Array();


		if(1 > cnt) return;


		arrayNo = this.draw_polygonLineSplitArray(this.arrayPolygonLine, "no");


		//ポリラインNoをループ
		for(y = 0; y < arrayNo.length; y++)
		{
			arrayPoints	= new Array();
			lat			= 0;
			lon			= 0;

			for(y2 = 0; y2 < cnt; y2++)
			{
				if(arrayNo[y] == this.arrayPolygonLine[y2]['no'])
				{
					arrayPoints.push( new GPoint(this.arrayPolygonLine[y2]['lon'], this.arrayPolygonLine[y2]['lat']) );

					//始点なら、終点から結ぶ為に保持
					if(0 == lat)
					{
						lat = this.arrayPolygonLine[y2]['lat'];
						lon = this.arrayPolygonLine[y2]['lon'];
					}
				}
			}
			arrayPoints.push( new GPoint(lon, lat) );	//終点と始点を結ぶ

			var polygon =	new GPolygon
							(
								arrayPoints,
								this.arrayPolygonLineDetail[y]["lineColor"],
								this.arrayPolygonLineDetail[y]["lineThick"],
								this.arrayPolygonLineDetail[y]["lineAlpha"],
								this.arrayPolygonLineDetail[y]["paintColor"],
								this.arrayPolygonLineDetail[y]["paintAlpha"]
							);
			this.map.addOverlay(polygon);

			this.draw_polygonLineSetClickEvent
			(
				this.map,
				polygon,
				this.arrayPolygonLineDetail[y]["lat"],
				this.arrayPolygonLineDetail[y]["lon"],
				this.arrayPolygonLineDetail[y]["zoom"],
				y,
				this.arrayPolygonLineDetail[y]["iwText"]
			);
		}
	}


	/********************************************************************************/
	/* 引 数 1：[array2]二次元配列													*/
	/*       2：[int or str]重複をチェックするキー名								*/
	/********************************************************************************/
	/* 戻り値 ：[array1]	重複しない二次元配列[n][指定キー]を格納					*/
	/********************************************************************************/
	/*	二次元配列[n][指定キー]が重複しないように抜粋して返す						*/
	/********************************************************************************/
	this.draw_polygonLineSplitArray = function(array, key)//private
	{
		//int
		var cnt			= array.length;
		//array
		var arrayRst	= new Array();


		for(var y = 0; y < cnt; y++)
		{
			arrayRst[ array[y][key] ] = array[y][key];
		}
		return arrayRst;
	}


	/********************************************************************************/
	/* 引 数 1：[object]this.map													*/
	/*       2：[object]イベントを設定するポリライン								*/
	/*       3：[int]緯度															*/
	/*       4：[int]経度															*/
	/*       5：[int]倍率															*/
	/*       6：[int]ポリラインNo													*/
	/*       7：[str]情報ウィンドウに表示する文言(省略可)							*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	ポリラインがクリックされた場合に引数3〜5に移動するようにイベントを登録する	*/
	/********************************************************************************/
	this.draw_polygonLineSetClickEvent = function(map, polygon, lat, lon, zoom, noPolygon, textWindow)//private
	{
		//str
		var instanceName	= this.instanceName;
		//bool
		var flgSmoothness	= this.flgSmoothness;


		if("undefined" != typeof(textWindow) && null != textWindow && "" != textWindow && noPolygon != this.noPolygon)
		{
			//マウスオンでinfoWindow表示
			GEvent.addListener
			(
				polygon,
				"mouseover",
				function()
				{
					map.openInfoWindowHtml(new GLatLng(lat, lon), textWindow);
				}
			);

			//マウスアウトでinfoWindow消去
			GEvent.addListener
			(
				polygon,
				"mouseout",
				function()
				{
					map.closeInfoWindow();
				}
			);
		}


		//ポリライン押下時のイベント
		if(noPolygon != this.noPolygon)
		{
			GEvent.addListener
			(
				polygon,
				"click",
				function()
				{
					if(true == flgSmoothness)
					{
						map.setZoom(zoom);					//倍率を変更してから
						map.panTo( new GLatLng(lat, lon) );	//スムーズに移動
					}
					else
					{
						map.setCenter(new GLatLng(lat, lon), zoom);
					}
					eval( instanceName + ".set_noPolygon(" + noPolygon + ")" );	//選択されたポリラインはオンマウスでinfoWindowが表示されないようにする
					eval( instanceName + ".switch_marker(" + noPolygon + ")" );
				}
			);
		}
	}


	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


	/********************************************************************************/
	/* 引 数 1：[str]住所(textareaからの入力で、1行1住所)							*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	テキストエリアからの住所を分解し、1行ずつ住所検索に掛ける					*/
	/********************************************************************************/
	this.geocoder_moveAndMarkerList = function(str)//public
	{
		//array
		var arrayAddress	= new Array();


		this.clear_overlays();
		this.flgGcMove = false;	//複数の住所に対してマーカー位置に移動すれば重いので強制的に変更


		arrayAddress = str.split("\n");
		for(var y = 0; y < arrayAddress.length; y++)
		{
			arrayAddress[y] = arrayAddress[y].replace(/[\n\r]/g, "");	//正規表現で末尾の改行とリターンを削除
			this.geocoder_moveAndMarker(arrayAddress[y]);
		}
	}


	/********************************************************************************/
	/* 引 数 1：[str]住所															*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	住所を受け取り、その座標に移動してマーカーを置く							*/
	/********************************************************************************/
	this.geocoder_moveAndMarker = function(address)//public
	{
		//int
		var zoom			= this.map.getZoom();
		var modeGcIw		= this.modeGcIw;
		//str
		var instanceName	= this.instanceName;
		var pointStr;
		var infoWindow		= "";
		var idGc			= this.idGc;
		//array
		var arrayPoint		= new Array();
		var arrayResult		= new Array();
		//bool
		var flgGcMove		= this.flgGcMove;
		//object
		var map				= this.map;


		if(null == this.geocoder)	this.geocoder	= new GClientGeocoder();
		if(null != this.idGc)		this.strGc		= "";


		this.geocoder.getLatLng
		(
			address,
			function(point)
			{
				//文字列型の座標を配列に分解して格納	[0:経度][1:緯度]
				pointStr	= String(point);
				pointStr	= pointStr.replace("(", "");
				pointStr	= pointStr.replace(")", "");
				arrayPoint	= pointStr.split(", ");

				//住所が見つかれば
				if(point)
				{
					//マーカーのinfoWindowの文言
					switch(modeGcIw)
					{
						case 1:	infoWindow=	"<br /><br />"											+
											"緯度："		+ arrayPoint[0]							+ "<br />"			+
											"緯度："		+ arrayPoint[1]							+ "<br /><br />"	+
											"緯度/経度："	+ arrayPoint[0] + "/" + arrayPoint[1];
								break;
					}

					eval( instanceName + ".put_marker('" + point + "', '" + address + infoWindow + "', true)" );
					arrayResult[0] = arrayPoint[0];
					arrayResult[1] = arrayPoint[1];


					//マーカー位置への移動
					if(true == flgGcMove)
					{
						map.setCenter(point, zoom);
					}
					eval( instanceName + ".toForm_coordinatesMarker(" + point.y + ", " +  point.x + ")" );	//マーカー座標をフォーム等に代入


					arrayResult[0] = "○,";
					arrayResult[1] = arrayPoint[0] + "," + arrayPoint[1];
				}
				//見つからなければ
				else
				{
					arrayResult[0] = "×,";
					arrayResult[1] = "見つかりませんでした。";
				}

				if(null != idGc)
				{
					eval( instanceName + ".strGc+= '" + arrayResult[0] + address + "," + arrayResult[1] + "\\r\\n'" );
					eval( "document.getElementById(" + instanceName + ".idGc).value = " + instanceName + ".strGc" );
				}
			}
		);
	}


	/********************************************************************************/
	/* 引 数 1：[str]座標	(例："12,345678, 123,456789")							*/
	/********************************************************************************/
	/* 戻り値 ：0	[object]引数1を座標objectにしたもの								*/
	/*			1	[array1]	[0:緯度][1:経度]									*/
	/********************************************************************************/
	/*	オブジェクト型の座標データはevalを通すと文字列型に強制変換されるので、		*/
	/*	それを座標オブジェクトに戻す												*/
	/********************************************************************************/
	this.string2GPoint = function(pointStr)//private
	{
		//array
		var arrayPoint	= new Array();


		pointStr	= pointStr.replace("(", "");
		pointStr	= pointStr.replace(")", "");
		arrayPoint	= pointStr.split(", ");

		return new GPoint(arrayPoint[1], arrayPoint[0]);
	}


	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


	/********************************************************************************/
	/* 引 数 1：[int]押下されたポリラインNo											*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	ポリラインが押下された場合に、それに属するマーカーだけを表示させる手配をする*/
	/********************************************************************************/
	this.switch_marker = function(noPolygon)//public
	{
		this.map.clearOverlays();			//一旦マーカー等を全部消去
		this.draw_polygonLine();			//ポリライン再描画
		this.put_markerBatch(noPolygon);	//押下されたポリラインに属するマーカーを表示
	}


	/*++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*/


	/********************************************************************************/
	/* 引 数 1：なし																*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	googleMapを表示する															*/
	/********************************************************************************/
	this.display = function()//public
	{
		this.put_control();
		this.put_toForm();
		this.put_markerBatch();
		this.draw_polygonLine();
		this.put_toFormMoveend(this.map, this.idLat, this.idLon, this.idZoom);

		if(true == this.flgSmoothness) this.map.enableContinuousZoom();
	}


	/********************************************************************************/
	/* 引 数 1：なし																*/
	/********************************************************************************/
	/* 戻り値 ：なし																*/
	/********************************************************************************/
	/*	ドラッグできるマーカーのgoogleMapを表示する									*/
	/********************************************************************************/
	this.display_dragMarker = function()//public
	{
		//object
		var map		= this.map;
		var point	= new GPoint();


		this.put_control();
		this.put_toForm();
		this.put_toFormMoveend(this.map, this.idLat, this.idLon, this.idZoom);

		if(true == this.flgSmoothness) this.map.enableContinuousZoom();


		//マップ中央
		if(null == this.latMarker)
		{
			var LatLngObj = this.map.getCenter();
			this.put_marker(LatLngObj, '', true);
		}
		//初期位置設定済み
		else
		{
			this.put_marker( new GPoint(this.lonMarker, this.latMarker), '', true );
			this.toForm_coordinatesMarker(this.latMarker, this.lonMarker);
		}
	}
}