// -1 ) { var strEsc = escape( strRet ); if ( strEsc.indexOf("%u") < 0 && strEsc.indexOf("%") > -1 ) { strRet = decodeURIComponent( strEsc ); } } // return strRet; } ///////////////////////////////////////////////////// // meter var objMt = { fMeter: function( intLvl ) { // var strHtml = ""; // if( intLvl > 0 ) { strHtml += ""; } if( intLvl > 1 ) { strHtml += ""; } if( intLvl > 2 ) { strHtml += ""; } if( intLvl > 3 ) { strHtml += ""; } if( intLvl > 4 ) { strHtml += ""; } if( intLvl > 5 ) { strHtml += ""; } if( intLvl > 6 ) { strHtml += ""; } document.getElementById( "meter" ).innerHTML = strHtml; // document.getElementById( "meter" ).style.display = "block"; } } ///////////////////////////////////////////////////// // short cut var objSC = { // fHtml: function() { // if( document.getElementById( "map_shortcut" ).style.display != "none" ) { var objBounds = gobjGMap.getBounds(); var objSW = objBounds.getSouthWest(); var objNE = objBounds.getNorthEast(); var objMarker; // var arrCatCB = document.getElementsByName( "cat_cb" ); var arrCatVal = []; var intMax = arrCatCB.length ? arrCatCB.length : 0; for( var i = 0; i < intMax; i++ ) { // if( arrCatCB[i].checked ) { arrCatVal.push( arrCatCB[i].value ); } } // 上部一覧読み込み var strUrl = "scut.php"; var strPrms = "sw_lat=" + objSW.lat() + "&sw_lon=" + objSW.lng() + "&ne_lat=" + objNE.lat() + "&ne_lon=" + objNE.lng() + "&cat=" + arrCatVal.join( "," ) + "&mnum=" + ( document.fmnum.markers.value < 20 ? document.fmnum.markers.value : 20 ); GDownloadUrl( strUrl + "?" + strPrms, function( strRes, intCode ) { // if( intCode == 200 ) { // strRes = decodeURIComponent( fExtract( strRes ) ); eval( "var objRes=" + strRes ); // if( objRes.error.code != 0 ) { alert( "エラー\n" + objRes.error.desc ); return; } // document.getElementById( "marker_sc" ).style.display ="none"; document.getElementById( "marker_sc" ).innerHTML = ""; if( objRes.data.page != "" ) { document.getElementById( "marker_sc" ).innerHTML = objRes.data.page; document.getElementById( "marker_sc" ).style.display ="block"; } } } ); } }, // fSwitch: function() { // if( document.getElementById( "map_shortcut" ).style.display == "none" ) { document.getElementById( "map_sc_title" ).innerHTML = "マーカー一覧を非表示"; document.getElementById( "map_shortcut" ).style.display ="block"; document.getElementById( "map_shortcut" ).innerHTML = "

表示中の最新マーカー

"; objSC.fHtml(); // fSetCookie( "m_sc", "0", 60 * 60 * 24 * 365 ); } else { document.getElementById( "map_sc_title" ).innerHTML = "マーカー一覧を表示"; document.getElementById( "map_shortcut" ).innerHTML = ""; document.getElementById( "map_shortcut" ).style.display ="none"; // fSetCookie( "m_sc", "1", 60 * 60 * 24 * 365 ); } } } ///////////////////////////////////////////////////// // icon function cIcon() { this.arrIcon = new Array(); var iconSize = new GSize( 20, 20 ); var iconAnchor = new GPoint( 10, 10 ); var infoWindowAnchor = new GPoint( 10, 0 ); this.arrIcon[ '49e5dc0bf95a914090a42a49982d45b3' ] = new GIcon( ); this.arrIcon[ '49e5dc0bf95a914090a42a49982d45b3' ].image = "http://www.8833.jp/share/img/icon/category/49e5dc0bf95a914090a42a49982d45b3.png"; this.arrIcon[ '49e5dc0bf95a914090a42a49982d45b3' ].iconSize = iconSize; this.arrIcon[ '49e5dc0bf95a914090a42a49982d45b3' ].iconAnchor = iconAnchor; this.arrIcon[ '49e5dc0bf95a914090a42a49982d45b3' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ '10b2761db5a8e089049df39675abc550' ] = new GIcon( ); this.arrIcon[ '10b2761db5a8e089049df39675abc550' ].image = "http://www.8833.jp/share/img/icon/category/10b2761db5a8e089049df39675abc550.png"; this.arrIcon[ '10b2761db5a8e089049df39675abc550' ].iconSize = iconSize; this.arrIcon[ '10b2761db5a8e089049df39675abc550' ].iconAnchor = iconAnchor; this.arrIcon[ '10b2761db5a8e089049df39675abc550' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'ad833178d68d7f35ea358e8210c81d10' ] = new GIcon( ); this.arrIcon[ 'ad833178d68d7f35ea358e8210c81d10' ].image = "http://www.8833.jp/share/img/icon/category/ad833178d68d7f35ea358e8210c81d10.png"; this.arrIcon[ 'ad833178d68d7f35ea358e8210c81d10' ].iconSize = iconSize; this.arrIcon[ 'ad833178d68d7f35ea358e8210c81d10' ].iconAnchor = iconAnchor; this.arrIcon[ 'ad833178d68d7f35ea358e8210c81d10' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'df17afbc469d11df8936001372fe80f8' ] = new GIcon( ); this.arrIcon[ 'df17afbc469d11df8936001372fe80f8' ].image = "http://www.8833.jp/share/img/icon/category/df17afbc469d11df8936001372fe80f8.png"; this.arrIcon[ 'df17afbc469d11df8936001372fe80f8' ].iconSize = iconSize; this.arrIcon[ 'df17afbc469d11df8936001372fe80f8' ].iconAnchor = iconAnchor; this.arrIcon[ 'df17afbc469d11df8936001372fe80f8' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'feca0af8469d11df8936001372fe80f8' ] = new GIcon( ); this.arrIcon[ 'feca0af8469d11df8936001372fe80f8' ].image = "http://www.8833.jp/share/img/icon/category/feca0af8469d11df8936001372fe80f8.png"; this.arrIcon[ 'feca0af8469d11df8936001372fe80f8' ].iconSize = iconSize; this.arrIcon[ 'feca0af8469d11df8936001372fe80f8' ].iconAnchor = iconAnchor; this.arrIcon[ 'feca0af8469d11df8936001372fe80f8' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ '14ffe400469e11df8936001372fe80f8' ] = new GIcon( ); this.arrIcon[ '14ffe400469e11df8936001372fe80f8' ].image = "http://www.8833.jp/share/img/icon/category/14ffe400469e11df8936001372fe80f8.png"; this.arrIcon[ '14ffe400469e11df8936001372fe80f8' ].iconSize = iconSize; this.arrIcon[ '14ffe400469e11df8936001372fe80f8' ].iconAnchor = iconAnchor; this.arrIcon[ '14ffe400469e11df8936001372fe80f8' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'd3b3d5ce469d11df8936001372fe80f8' ] = new GIcon( ); this.arrIcon[ 'd3b3d5ce469d11df8936001372fe80f8' ].image = "http://www.8833.jp/share/img/icon/category/d3b3d5ce469d11df8936001372fe80f8.png"; this.arrIcon[ 'd3b3d5ce469d11df8936001372fe80f8' ].iconSize = iconSize; this.arrIcon[ 'd3b3d5ce469d11df8936001372fe80f8' ].iconAnchor = iconAnchor; this.arrIcon[ 'd3b3d5ce469d11df8936001372fe80f8' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'bfe3a06a469d11df8936001372fe80f8' ] = new GIcon( ); this.arrIcon[ 'bfe3a06a469d11df8936001372fe80f8' ].image = "http://www.8833.jp/share/img/icon/category/bfe3a06a469d11df8936001372fe80f8.png"; this.arrIcon[ 'bfe3a06a469d11df8936001372fe80f8' ].iconSize = iconSize; this.arrIcon[ 'bfe3a06a469d11df8936001372fe80f8' ].iconAnchor = iconAnchor; this.arrIcon[ 'bfe3a06a469d11df8936001372fe80f8' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'f431dc8a486711df8936001372fe80f8' ] = new GIcon( ); this.arrIcon[ 'f431dc8a486711df8936001372fe80f8' ].image = "http://www.8833.jp/share/img/icon/category/f431dc8a486711df8936001372fe80f8.png"; this.arrIcon[ 'f431dc8a486711df8936001372fe80f8' ].iconSize = iconSize; this.arrIcon[ 'f431dc8a486711df8936001372fe80f8' ].iconAnchor = iconAnchor; this.arrIcon[ 'f431dc8a486711df8936001372fe80f8' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ '0f641554486811df8936001372fe80f8' ] = new GIcon( ); this.arrIcon[ '0f641554486811df8936001372fe80f8' ].image = "http://www.8833.jp/share/img/icon/category/0f641554486811df8936001372fe80f8.png"; this.arrIcon[ '0f641554486811df8936001372fe80f8' ].iconSize = iconSize; this.arrIcon[ '0f641554486811df8936001372fe80f8' ].iconAnchor = iconAnchor; this.arrIcon[ '0f641554486811df8936001372fe80f8' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'fe77ff9850ec11df8936001372fe80f8' ] = new GIcon( ); this.arrIcon[ 'fe77ff9850ec11df8936001372fe80f8' ].image = "http://www.8833.jp/share/img/icon/category/fe77ff9850ec11df8936001372fe80f8.png"; this.arrIcon[ 'fe77ff9850ec11df8936001372fe80f8' ].iconSize = iconSize; this.arrIcon[ 'fe77ff9850ec11df8936001372fe80f8' ].iconAnchor = iconAnchor; this.arrIcon[ 'fe77ff9850ec11df8936001372fe80f8' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'd494505830f5f754d83cd2a6da07fec6' ] = new GIcon( ); this.arrIcon[ 'd494505830f5f754d83cd2a6da07fec6' ].image = "http://www.8833.jp/share/img/icon/category/d494505830f5f754d83cd2a6da07fec6.png"; this.arrIcon[ 'd494505830f5f754d83cd2a6da07fec6' ].iconSize = iconSize; this.arrIcon[ 'd494505830f5f754d83cd2a6da07fec6' ].iconAnchor = iconAnchor; this.arrIcon[ 'd494505830f5f754d83cd2a6da07fec6' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'd5105612720bd925a40999eab7296a67' ] = new GIcon( ); this.arrIcon[ 'd5105612720bd925a40999eab7296a67' ].image = "http://www.8833.jp/share/img/icon/category/d5105612720bd925a40999eab7296a67.png"; this.arrIcon[ 'd5105612720bd925a40999eab7296a67' ].iconSize = iconSize; this.arrIcon[ 'd5105612720bd925a40999eab7296a67' ].iconAnchor = iconAnchor; this.arrIcon[ 'd5105612720bd925a40999eab7296a67' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ '6dafe293af0143b1d248f71c45c3356c' ] = new GIcon( ); this.arrIcon[ '6dafe293af0143b1d248f71c45c3356c' ].image = "http://www.8833.jp/share/img/icon/category/6dafe293af0143b1d248f71c45c3356c.png"; this.arrIcon[ '6dafe293af0143b1d248f71c45c3356c' ].iconSize = iconSize; this.arrIcon[ '6dafe293af0143b1d248f71c45c3356c' ].iconAnchor = iconAnchor; this.arrIcon[ '6dafe293af0143b1d248f71c45c3356c' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'c2d77a57806ab6d399e1ff7febf184dc' ] = new GIcon( ); this.arrIcon[ 'c2d77a57806ab6d399e1ff7febf184dc' ].image = "http://www.8833.jp/share/img/icon/category/c2d77a57806ab6d399e1ff7febf184dc.png"; this.arrIcon[ 'c2d77a57806ab6d399e1ff7febf184dc' ].iconSize = iconSize; this.arrIcon[ 'c2d77a57806ab6d399e1ff7febf184dc' ].iconAnchor = iconAnchor; this.arrIcon[ 'c2d77a57806ab6d399e1ff7febf184dc' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ '23ef1b183d8167d40087b01d802e9c13' ] = new GIcon( ); this.arrIcon[ '23ef1b183d8167d40087b01d802e9c13' ].image = "http://www.8833.jp/share/img/icon/category/23ef1b183d8167d40087b01d802e9c13.png"; this.arrIcon[ '23ef1b183d8167d40087b01d802e9c13' ].iconSize = iconSize; this.arrIcon[ '23ef1b183d8167d40087b01d802e9c13' ].iconAnchor = iconAnchor; this.arrIcon[ '23ef1b183d8167d40087b01d802e9c13' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'e2f11e8355b22eee2acfd2c36d9e722c' ] = new GIcon( ); this.arrIcon[ 'e2f11e8355b22eee2acfd2c36d9e722c' ].image = "http://www.8833.jp/share/img/icon/category/e2f11e8355b22eee2acfd2c36d9e722c.png"; this.arrIcon[ 'e2f11e8355b22eee2acfd2c36d9e722c' ].iconSize = iconSize; this.arrIcon[ 'e2f11e8355b22eee2acfd2c36d9e722c' ].iconAnchor = iconAnchor; this.arrIcon[ 'e2f11e8355b22eee2acfd2c36d9e722c' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'fe69a608021f102c9c4e6e3ce0afcbed' ] = new GIcon( ); this.arrIcon[ 'fe69a608021f102c9c4e6e3ce0afcbed' ].image = "http://www.8833.jp/share/img/icon/category/fe69a608021f102c9c4e6e3ce0afcbed.png"; this.arrIcon[ 'fe69a608021f102c9c4e6e3ce0afcbed' ].iconSize = iconSize; this.arrIcon[ 'fe69a608021f102c9c4e6e3ce0afcbed' ].iconAnchor = iconAnchor; this.arrIcon[ 'fe69a608021f102c9c4e6e3ce0afcbed' ].infoWindowAnchor = infoWindowAnchor; this.arrIcon[ 'd74f2de085ba11de9224001372fe80f8' ] = new GIcon( ); this.arrIcon[ 'd74f2de085ba11de9224001372fe80f8' ].image = "http://www.8833.jp/share/img/icon/category/d74f2de085ba11de9224001372fe80f8.png"; this.arrIcon[ 'd74f2de085ba11de9224001372fe80f8' ].iconSize = iconSize; this.arrIcon[ 'd74f2de085ba11de9224001372fe80f8' ].iconAnchor = iconAnchor; this.arrIcon[ 'd74f2de085ba11de9224001372fe80f8' ].infoWindowAnchor = infoWindowAnchor; } ///////////////////////////////////////////////////// // markers function cMk() { // this.arrMarkers = new Array(); // this.fDeploy = function() { // meter objMt.fMeter( 0 ); // var objBounds = gobjGMap.getBounds(); var objSW = objBounds.getSouthWest(); var objNE = objBounds.getNorthEast(); var objMarker; // meter objMt.fMeter( 1 ); // var arrCatCB = document.getElementsByName( "cat_cb" ); var arrCatVal = []; var intMax = arrCatCB.length ? arrCatCB.length : 0; for( var i = 0; i < intMax; i++ ) { // if( arrCatCB[i].checked ) { arrCatVal.push( arrCatCB[i].value ); } } // meter objMt.fMeter( 2 ); // マーカー読み込み var strUrl = "mark.php"; var strPrms = "sw_lat=" + objSW.lat() + "&sw_lon=" + objSW.lng() + "&ne_lat=" + objNE.lat() + "&ne_lon=" + objNE.lng() + "&cat=" + arrCatVal.join( "," ) + "&mnum=" + document.fmnum.markers.value; // GDownloadUrl( strUrl + "?" + strPrms, function( strRes, intCode ) { // if( intCode == 200 ) { // meter objMt.fMeter( 3 ); // strRes = decodeURIComponent( fExtract( strRes ) ); eval( "var objRes=" + strRes ); // meter objMt.fMeter( 4 ); // if( objRes.error.code != 0 ) { alert( "エラー\n" + objRes.error.desc ); return; } // var arrItem = objRes.data; // for( var strKey in gobjMk.arrMarkers ) { // gobjMk.arrMarkers[ strKey ].bolRemain = false; } // meter objMt.fMeter( 5 ); // intMax = arrItem.length ? arrItem.length : 0; for( var i = 0; i < arrItem.length; i++ ) { // gobjMk.fAddMarker( arrItem[ i ].strMsgId, arrItem[ i ].strKeyCat, arrItem[ i ].strIconNameCat, arrItem[ i ].dblGeoLat, arrItem[ i ].dblGeoLon ); } // meter objMt.fMeter( 6 ); gobjMk.fClear( false ); // meter objMt.fMeter( 7 ); } } ); // objSC.fHtml(); } // this.fAddMarker = function( strMsgId, strKeyCat, strCatName, dblLat, dblLon ) { // if( !gobjMk.arrMarkers[ strMsgId ] ) { objMarker = new GMarker( new GLatLng( dblLat, dblLon ), { title : strCatName, icon : gobjIcon.arrIcon[ strKeyCat ] } ); objMarker.strMsgId = strMsgId; // GEvent.addListener( objMarker, 'click', function() { gobjMk.fBlowUp( this.strMsgId ) } ); gobjMk.arrMarkers[ strMsgId ] = objMarker; gobjGMap.addOverlay( gobjMk.arrMarkers[ strMsgId ] ); } gobjMk.arrMarkers[ strMsgId ].bolRemain = true; } // this.fSearched = function( strMsgId, strKeyCat, strCatName, dblLat, dblLon ) { var arrCatCB = document.getElementsByName( "cat_cb" ); var intMax = arrCatCB.length ? arrCatCB.length : 0; for( var i = 0; i < arrCatCB.length; i++ ) { // if( arrCatCB[i].value == strKeyCat ) { // arrCatCB[i].checked = true; } } // // if( !gobjMk.arrMarkers[ strMsgId ] ) // { gobjMk.fAddMarker( strMsgId, strKeyCat, strCatName, dblLat, dblLon ); // } gobjMk.fBlowUp( strMsgId ); // return true; } // this.fBlowUp = function( strMsgId ) { // GDownloadUrl( "blow.php?id=" + strMsgId, function( strRes, intCode ) { // if( intCode == 200 ) { // strRes = decodeURIComponent( fExtract( strRes ) ); eval( "var objRes=" + strRes ); // if( objRes.error.code != 0 ) { alert( "エラー\n" + objRes.error.desc ); return; } gobjMk.arrMarkers[ objRes.data.id ].openInfoWindowHtml( objRes.data.html, { maxWidth : 200 } ); } } ); } // this.fClear = function( bolAll ) { // for( var strKey in gobjMk.arrMarkers ) { if( bolAll || !gobjMk.arrMarkers[ strKey ].bolRemain ) { gobjGMap.removeOverlay( gobjMk.arrMarkers[ strKey ] ); delete gobjMk.arrMarkers[ strKey ]; } } // gobjGMap.clearOverlays( ); // this.arrMarkers = new Array(); } } ///////////////////////////////////////////////////// // search var objSearch = { // fSearch: function( strQuery ) { // if( !document.getElementById( "map_search" ).innerHTML.length ) { // document.getElementById( "map_search" ).style.display ="none"; document.getElementById( "map_search" ).innerHTML = ""; } // var strPrms = ""; // if( strQuery != "" ) { strPrms = strQuery; } else { var strPrm = document.fsearch.query.value; if( strPrm != "" ) { strPrms += "str=" + strPrm; } } // if( strPrms != "" ) { // var strFile = "srch.php" + "?" + strPrms; GDownloadUrl( strFile, function( strRes, intCode ) { // if( intCode == 200 ) { objSearch.fSearchResult( strRes ); } } ); } // return true; }, // fSearchResult: function( objHttp ) { // strRes = decodeURIComponent( fExtract( objHttp ) ); eval( "var objRes=" + strRes ); // if( objRes.error.code != 0 ) { alert( "エラー\n" + objRes.error.desc ); return false; } // document.getElementById( "map_search" ).innerHTML = "

検索結果" + objRes.data.ix + "

" + objRes.data.page + "
"; document.getElementById( "map_search" ).style.display ="block"; // return true; } } //////////////////////////////////////////////////////////////////////////////////////// // geo // var objGC = { // fSearch: function() { // document.getElementById( "map_search" ).style.display ="none"; document.getElementById( "map_search" ).innerHTML = ""; // if( document.fgeocode.query.value != "" ) { // var objGC = new GClientGeocoder(); objGC.getLocations( document.fgeocode.query.value, this.fLoad ); } // return true; }, // fLoad: function( objLocations ) { // if ( objLocations.Status.code == G_GEO_SUCCESS ) { // if( objLocations.Placemark.length ) { // var arrPM = new Array(); // var intMax = objLocations.Placemark.length ? objLocations.Placemark.length : 0; for ( var i = 0; i < intMax; i++ ) { // if( objLocations.Placemark[ i ].AddressDetails.Country.CountryNameCode == "JP" ) { // arrPM[ i ] = objLocations.Placemark[ i ]; } } // var intCol = 2; var intRow = Math.ceil( arrPM.length / intCol ); var strHtml = ''; var strAddress = ""; var intIx = 0; var objTmp = null; // strHtml += ''; for( var i = 0; i < intRow; i++ ) { // strHtml += ''; // for( var j = 0; j < intCol; j++ ) { // strAddress = ""; strHtml += ''; } // strHtml += ''; } strHtml += '
'; // intIx = ( intCol * i ) + j; if( arrPM[ intIx ] ) { // strAddress = objGC.fAddr( arrPM[ intIx ].AddressDetails ); // strHtml += "" + strAddress + ""; } else { strHtml += ' '; } strHtml += '
'; // document.getElementById( "map_search" ).innerHTML = "

場所候補

" + strHtml + "
"; document.getElementById( "map_search" ).style.display ="block"; } } // return true; }, // fAddr: function( objAddr ) { // var strAddress = ""; // if( objAddr.Country.AddressLine ) { strAddress = objAddr.Country.AddressLine[ 0 ]; } else { // if( objAddr.Country.AdministrativeArea.SubAdministrativeArea ) { objTmp = objAddr.Country.AdministrativeArea.SubAdministrativeArea; } else { objTmp = objAddr.Country.AdministrativeArea; } if( objTmp.Locality ) { if( objTmp.Locality.DependentLocality ) { strAddress = objTmp.Locality.DependentLocality.DependentLocalityName; } if( objTmp.Locality ) { strAddress = objTmp.Locality.LocalityName + " " + strAddress; } } if( objTmp.SubAdministrativeAreaName ) { strAddress = objTmp.SubAdministrativeAreaName + " " + strAddress; } if( strAddress == "" ) { if( objAddr.Country.AdministrativeArea.AdministrativeAreaName != "" ) { strAddress = objAddr.Country.AdministrativeArea.AdministrativeAreaName; } } if( strAddress == "" ) { if( objAddr.Country.CountryName != "" ) { strAddress = objAddr.Country.CountryName; } } } // return strAddress; } }; //]]>