ホーム へ       サンプルページ  Google Maps28  google_maps28.htm
Webページにホテル検索フォーム付きGoogle Mapを実装する。        Google Maps API、DHTML。      マップサイズなどのカスタマイズはテキストエディターなどで可。    all 対応。     コピー、編集し、簡単にWebで応用できまっ、(^ ^)。
     関連・詳細情報 : Google 
Developers.(サービス) >
Google Maps JavaScript API >
Code Samples >
Place Autocomplete Hotel Search 
デモは、国を選択、都市名(頭文字からでも可)入力で。
 
< ご使用方法 >
 ・ ローカル(=PC)への保存は、google_maps28.htm を右クリック、[対象をファイルに保存] - 【ファイルのダウンロード】、【ファイル名を付けて保存】 - <保存する場所>: ……、などで。    ※:  変わってしまった、ファイル名や、*.html 中のパスは要修正。
 ・ このDHTMLの実装方法は、google_maps28/をクリック開いたホルダーで、google_maps28.htm をテキストエディターで開き、ホームページ作成ソフトなどのHTML挿入/編集メニューなどを使って、新しいページ 1 や hogehoge.html(=任意の挿入先ファイル名) の、 <head> 〜 </head> の任意の行間に (*1)を、さらに 
<body> 〜 </body>の任意の行間に (*2) をペーストします。
 ・ 編集方法は、hogehoge.html を WordPad や SmipleTextなどのテキストエディター、あるいは ”FrontPage Express” などのホームページ制作ソフトのHTMLタグ挿入/編集メニュー で開き編集します。    下記の(例) (*1) と、(*2)、(*3) を参考に太字部分の編集を任意に行います。   
 ※: テキストエディターによる編集は、HP制作ソフトとの互換性の問題を生じません(HP制作ソフト間は少し生じる)。
 ・ 作動テストは、ローカル(PC)に保存し、 Internet Explorer 10.x〜 などで開いて。    
更新の確認は、[F5]キー を押し、最新データ読み込み、で。    あるいは、Internet Explorerを全て閉じ、再起動を行い、閲覧履歴の削除後や、【Internet Explorer】- [ツール] - [インターネット オプション] - 
[閲覧の履歴] - [削除] などでも。
 ・ アップロードや作動テストは、hogehoge.html と同じ階層〔ホルダー/ディレクトリー〕に、使用する画像、*.js、*.css などあれば転送/配置し実施。  ※:別ディレクトリーに配置時は、*.html 中のパスは要修正。   FTPなどで変わってしまったファイル名は要修正。    スクリプト構文中への改行混入は非作動原因。
 ・ 関連情報 : 
色記号5、〃6、スタイルシートリファレンス、ホームページ開設入門。   Web Development、Web開発、IE10 
互換性クックブック、〃開発者向けガイド、IE 
API リファレンス、IE 開発 
> HTMLとCSS、開発ツールでサイトを修正、スクリプト デバッグの概要、HTMLとCSSのサポート、CSSの改良点、XML、〃リファレンス、DHTML。
 
(*1) 
: google_maps28.htm (例)         挿入先の  <head> 〜 </head> の、〜 部分にペーストします。
  
    |  | HTMLの編集方法 | (*1) をテキストエディターで開き、下記↓のHTMLを挿入先ファイルにペースト、太字部分を編集し使用。 | 
  
    |  | 〔この列ペースト不要〕 シフトJIS使用(削除不可) ieなどに表示するアイコンファイル名(削除可) 
	<style type= 〜 
	 </style>は(削除可)(*1)〜(*3)表タイトル背景
 body 文字色 背景色 下線
 ハイパーリンク 〃
 表示済みの〃
 マウスオーバー時の〃
 クリック中の〃
 フォント
 
    リンクを新しいWinで開くを標準(削除可)※:target= いろいろ同じフレーム=_self、ページ全体=_top、親フレーム=_parent
 
 お気に入り、タスクバーに表示するページ名(≠ファイル名)
 表示幅外余白
       フォントサイズ マップ幅 サドバー幅
 高さ
 位置
       ”ホテル検索”幅フォント
     ”都市名(頭文字)を入力”幅高さ
 位置
     国選択幅高さ
 フォント
   | <meta http-equiv="Content-Type" content="text/html; charset=x-sjis"> <link REL="SHORTCUT ICON" href="favicon.ico"> <style type="text/css"><!-- 
    .xxx0 
	{ background: #F9F8F9 url('wttec.gif'); 
	}
 .xxx1 { background-color:#E3E0DC; }
 .xxx2 { background-color:#FFF; }
 body { color:#000000; background: #F9F8F9 
	url('wttec.gif'); text-decoration:none; 
	}
 a:link { color:#3C0055; background-color:#FBFAFE; text-decoration:none; }
 a:visited { color:#270037; background-color:#EDECEF; text-decoration:none; }
 a:hover { color:#1F002E; background-color:#D2F3F4; 
	text-decoration:underline; }
 a:active { color:#1F002E; background-color:#F5FFD2; 
	text-decoration:underline; }
 font {font-size:12px;
	line-height:13px;}
 body,tr,td,form{ font-family:MS PGothic,MS Gothic,Verdana; font-size: 12px}
 --></style>
 <base target="_blank"> <title>サンプルページ  Google Maps28</title> <!-- ☆ ----------- ↓ この間をコピー&ペーストします。 ------------ --><STYLE>
 html, body, #map-canvas {
 height: 1000px;
 margin: 2px;
 padding: 0;
 }
 
 </STYLE>
 
 <STYLE>
 table {
 font-size: 12px;
 }
 #map-canvas {
 width: 940px;
 }
 #listing {
 position: absolute;
 width: 200px;
 height: 470px;
 overflow: auto;
 left: 942px;
 top: 0px;
 cursor: pointer;
 overflow-x: hidden;
 }
 #findhotels {
 position: absolute;
 text-align: right;
 width: 100px;
 font-size: 12px;
 padding: 2px;
 z-index: 5;
 background-color: #fff;
 }
 #locationField {
 position: absolute;
 width: 190px;
 height: 20px;
 left: 108px;
 top: 0px;
 z-index: 5;
 background-color: #fff;
 }
 #controls {
 position: absolute;
 left: 300px;
 width: 140px;
 height: 18px;
 font-family:Lucida Sans Regular;
 font-size: 12px;
 top: 0px;
 z-index: 5;
 background-color: #fff;
 }
 ====  この間、説明を省略。  ====  // The regexp isolates the first part of the 
	URL (domain plus subdomain)// to give a short URL for displaying in the info window.
 if (place.website) {
 var fullUrl = place.website;
 var website = hostnameRegexp.exec(place.website);
 if (website == null) {
 website = 'http://' + place.website + '/';
 fullUrl = website;
 }
 document.getElementById('iw-website-row').style.display = '';
 document.getElementById('iw-website').textContent = website;
 } else {
 document.getElementById('iw-website-row').style.display = 'none';
 }
 }
 
 </SCRIPT>
 <!-- ☆ ----------- ↑ この間をコピー&ペーストします。 ------------ -->
   | 
 
(*2) 
: google_maps28.htm (例)        挿入先の  <body> 〜 
</body> の、〜 
部分にペーストします。
  
    |  | HTMLの編集方法 | (*2)をテキストエディターで開き、下記↓のHTMLを挿入先ファイルにペースト、太字部分を編集し使用。 | 
  
    |  | 〔この列ペースト不要〕 <body>部編集   国名               住所 電話南郷 ☆☆☆☆☆ Website   説明部位置 外余白 フォント 行間 |   <body style="margin: 0px; padding: 0px;" onload="initialize()"><!-- ★ ----------- ↓ この間をコピー&ペーストします。 ------------ -->
 <DIV id="findhotels">ホテル検索 : </DIV>
 <DIV id="locationField"><INPUT id="autocomplete" type="text" placeholder="都市名(頭文字)を入力" 
	value=""></DIV>
 <DIV id="controls"><SELECT id="country"><OPTION value="all">All</OPTION>
 <OPTION value="au">Australia</OPTION> <OPTION
 value="br">Brazil</OPTION> <OPTION value="ca">Canada</OPTION>
 <OPTION value="fr">France</OPTION> <OPTION value="de">Germany</OPTION>
 <OPTION value="mx">Mexico</OPTION> <OPTION value="nz">New
 Zealand</OPTION> <OPTION value="it">Italy</OPTION> <OPTION
 value="za">South Africa</OPTION> <OPTION value="es">Spain</OPTION>
 <OPTION value="pt">Portugal</OPTION> <OPTION value="us" 
	selected="">U.S.A.</OPTION>
 <OPTION value="uk">United Kingdom</OPTION> </SELECT> </DIV>
 <DIV id="map-canvas"></DIV>
 <DIV id="listing">
 <TABLE id="resultsTable">
 <TBODY id="results"></TBODY></TABLE></DIV>
 <DIV id="info-content">
 <TABLE>
 <TBODY>
 <TR class="iw_table_row" id="iw-url-row">
 <TD class="iw_table_icon" id="iw-icon"></TD>
 <TD id="iw-url"></TD></TR>
 <TR class="iw_table_row" id="iw-address-row">
 <TD class="iw_attribute_name">Address:</TD>
 <TD id="iw-address"></TD></TR>
 <TR class="iw_table_row" id="iw-phone-row">
 <TD class="iw_attribute_name">Telephone:</TD>
 <TD id="iw-phone"></TD></TR>
 <TR class="iw_table_row" id="iw-rating-row">
 <TD class="iw_attribute_name">Rating:</TD>
 <TD id="iw-rating"></TD></TR>
 <TR class="iw_table_row" id="iw-website-row">
 <TD class="iw_attribute_name">Website:</TD>
 <TD id="iw-website"></TD></TR></TBODY></TABLE></DIV>
 
 <!-- ★ ----------- ↑ この間をコピー&ペーストします。 ------------ -->
 <div style="position: absolute; top:1200px; margin: 10px; left:0px; 
	font:normal 12px MS PGothic,Lucida Console,Arial; line-height:13px;"> ====  この間、説明を省略。  ==== | 
< 補足 >    適時参照あれ!。
 ・ Wordpad によるHTMLソース(タグ)を見ながらの直接編集方法。