/g, ">");
map_icon_id = "";
// 検索結果部分の表示設定
var search_result = document.getElementById("search_result");
search_result.style.display ='';
search_result.style.position ='absolute';
search_result.style.height = '500px';
search_result.style.width = '300px';
search_result.style.marginLeft = '65px';
search_result.style.backgroundColor = '#fff';
search_result.style.borderWidth = '1px';
search_result.style.borderStyle = 'solid';
search_result.style.borderColor = '#000';
search_result.style.filter='Alpha(Opacity=90)';
search_result.style._khtmlOpacity='0.9';
search_result.style._mozOpacity='0.9';
search_result.style.opacity='0.9';
search_result.style.zIndex=1;
search_result.style.overflow="auto";
var str = "";
str +="
";
str +="";
str +="検索中・・・";
str +="
";
str +="";
search_result.innerHTML =str;
geocoder.getLocations(search_word.value, myCallback);
}
//住所検索結果表示
function myCallback(response){
var html = "";
var search_result_body = document.getElementById("search_result_body");
if (!response || response.Status.code != 200) {
html = "検索に失敗しました。";
search_result_body.innerHTML = html;
return false;
}
if (response.Placemark.length <=0) {
html = "該当する地名が見つかりませんでした。";
search_result_body.innerHTML = html;
return false;
}
if (response.Placemark.length == 1) {
var place = response.Placemark[0];
move_map(place.Point.coordinates[1],place.Point.coordinates[0],place.address);
return false;
}
if (response.Placemark.length > 100) {
html += "100件以上ヒットしました。上位100件を表示します。";
}
for(var i = 0; i < response.Placemark.length; i++){
if(i >= 100) { break; }
var place = response.Placemark[i];
// 住所一覧の作成
html += ''+place.address+'';
html += '
';
}
search_result_body.innerHTML = html;
}
// 選択した住所位置にマップを動かす
function move_map(lat,lng,word){
document.address_search_form.address.value = word;
search_window_close();
map.setCenter(new GLatLng(lat,lng));
}
// 検索結果のウィンドウを閉じる
function search_window_close(){
var search_result = document.getElementById("search_result");
search_result.style.display ='none';
search_result.innerHTML ="";
}
// 記事リストを隠す
function hide_menu(){
var map=document.getElementById('map');
var entry_list=document.getElementById('entry_list');
var show_hide_menu=document.getElementById('show_hide_menu');
entry_list.style.display='none';
map.style.width='779px';
show_hide_menu.innerHTML = "<< リストを表示";
}
// 記事リストを表示
function show_menu(){
var map=document.getElementById('map');
var entry_list=document.getElementById('entry_list');
var show_hide_menu=document.getElementById('show_hide_menu');
map.style.width='620px';
entry_list.style.display='';
show_hide_menu.innerHTML = "リストを隠す >>";
}
// カテゴリ選択時のサブメニュー表示
function show_hide(src){
for (i=1; i<=<%map_category_num%>; i++){
objNone=document.getElementById('map_icon_category_id_'+i);
if(objNone.style.display==""){
objNone.style.display='none';
}
}
if(src != ""){
if(document.getElementById){
obj=document.getElementById('map_icon_category_id_'+src);
}else if(document.all){
obj=document.all('map_icon_category_id_'+src);
}
obj.style.display='';
}
}
// 現在地のURLをコピー
function copy2Clipboard() {
window.clipboardData.setData('text',document.urlform.url.value);
}
//地図を中心点に戻す
function resetPosition(){
map.panTo(new GLatLng(<%y%>,<%x%>));
}
//]]>
<%analyze_tag%>