//新規追加 var property_kind_special = new Array(); property_kind_special[1] = '新築一戸建'; property_kind_special[2] = '中古一戸建'; property_kind_special[3] = '土地'; property_kind_special[4] = 'マンション'; property_kind_special[5] = '売ビル'; property_kind_special[6] = '売アパート'; property_kind_special[7] = '売店舗'; property_kind_special[8] = '売工場'; property_kind_special[9] = 'その他'; var map; //現在プルタブで選択されているタウンリスト var SelectTown = new Object(); //全表示で選択されているタウンリスト var AllViewTown= new Array(); //読み込まれた市町村リスト var TownCache = new Array(); var MunicipalityCache = new Array(); var jsDir='/js/' //セレクトフォームの取得 function CreatePopup(Getdata,TargetPoup,ID) { if (ID==''){ document.getElementById(TargetPoup).value = ''; var formtext = 'document.thisform.' + TargetPoup; var formobj = eval(formtext); formobj[0] = new Option( 'つぎは地名を選択!' , '' ); $(TargetPoup).length = 1; $(TargetPoup).selectIndex = 0; if(map){ //既にあるマーカも削除 if(TargetPoup.match(/town_zone/gi)){ map.removeOverlay(SelectTown['municipality'+TargetPoup.toString().replace (/[a-z]*_*[a-z]*/,"")]); } } } else { //取得済み if ( TownCache[ID] ){ var Cache=1; var req =""; showResponse(req,TargetPoup,ID,Cache); //未取得 } else { var Cache=0; var url = 'http://www.higawari.info/js/area.php'; var pars = 'getdata=' + Getdata + '&id='+ ID; var myAjax = new Ajax.Request(url, { method: 'get', parameters: pars, onComplete: function(request) {showResponse(request,TargetPoup,ID,Cache)} }); } } } //セレクトフォームの生成 function showResponse(req,TargetPoup,ID,Cache) { if ( Cache ) { var data = TownCache[ID]; } else { var data =eval(req.responseText); //キャッシュに追加 TownCache[ID] = data; MunicipalityCache = data; } var formtext = 'document.thisform.' + TargetPoup; var formobj = eval(formtext); if(TargetPoup.match(/town_zone/gi)){ formobj[0] = new Option( "つぎは地名を選択!" , "" ); } else if(TargetPoup.match(/municipality/gi)){ formobj[0] = new Option( "エリアを選んでね!" , "" ); } for(var i=1 , n=0 ; i i ;i++){ if (TownCache[municipality_id1][i].no == town_zone_id1 ){ var name = TownCache[municipality_id1][i].name; var latitude = TownCache[municipality_id1][i].latitude; var longitude = TownCache[municipality_id1][i].longitude; var no = TownCache[municipality_id1][i].no; var type ='SelectTown1'; var popup = 'municipality1'; LoadProperty(latitude,longitude,name,no,popup,type,municipality_id1); } } } //ポータルからの時 if(municipalityID != '-1' && ID != '0'){ //選択されている町に移動 map.setZoom(parseInt(TownCache[4][municipalityID].scale)); map.panTo(new GLatLng(TownCache[4][municipalityID].latitude,TownCache[4][municipalityID].longitude)); // map.setZoom(parseInt(MunicipalityCache[municipalityID].scale)); // map.panTo(new GLatLng(MunicipalityCache[municipalityID].latitude,MunicipalityCache[municipalityID].longitude)); } if(ID){ for(var i=0 ; i'; output +=''; output +=''; if(formobj[0].total!=0){ output +=''; }else{ output +=''; } if(formobj[0].kind1!=0){ output +=''; }else{ output +=''; } output +=''; output +=''; if(formobj[0].kind2!=0){ output +=''; }else{ output +=''; } if(formobj[0].kind3!=0){ output +=''; }else{ output +=''; } output +=''; output +=''; if(formobj[0].kind4!=0){ output +=''; }else{ output +=''; } if(formobj[0].kind5!=0){ output +=''; }else{ output +=''; } output +=''; output +=''; if(formobj[0].kind6!=0){ output +=''; }else{ output +=''; } if(formobj[0].kind7!=0){ output +=''; }else{ output +=''; } output +=''; output +=''; if(formobj[0].kind8!=0){ output +=''; }else{ output +=''; } if(formobj[0].kind9!=0){ output +=''; }else{ output +=''; } output +=''; output +='
登録物件数 ' + formobj[0].total + '件・登録物件数 0件新築一戸建 ' + formobj[0].kind1 + '件・新築一戸建 0件
中古戸建 ' + formobj[0].kind2 + '件・中古戸建 0件土地 ' + formobj[0].kind3 + '件・土地 0件
マンション ' + formobj[0].kind4 + '件・マンション 0件売ビル ' + formobj[0].kind5 + '件・売ビル 0件
売アパート ' + formobj[0].kind6 + '件・売アパート 0件売店舗 ' + formobj[0].kind7 + '件・売店舗 0件
売工場 ' + formobj[0].kind8 + '件・売工場 0件その他 ' + formobj[0].kind9 + '件・その他 0件
'; marker.openInfoWindowHtml(output); } function LoadGooglemap() { var sw = new GLatLng(35.25311909,139.3686104); var ne = new GLatLng(35.42962379,139.642067); var bound = new GLatLngBounds(sw,ne); var lon = 139.5053387; var lat = 35.34137144; var kanagawa = new GLatLng(lat,lon); map =new GMap2(document.getElementById("map")); map.setCenter(kanagawa,map.getBoundsZoomLevel(bound)); map.addControl(new GLargeMapControl()) map.addControl(new GMapTypeControl()) var points = []; points[0] = new GLatLng(35.40080449,139.3719149); points[1] = new GLatLng(35.39608189,139.3740606); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.39608189,139.3740606); points[1] = new GLatLng(35.39450764,139.3734598); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.40794032,139.4066334); points[1] = new GLatLng(35.41913252,139.412899); points[2] = new GLatLng(35.41647451,139.4242287); points[3] = new GLatLng(35.41976204,139.425087); points[4] = new GLatLng(35.41864289,139.4343567); points[5] = new GLatLng(35.41311691,139.4424248); points[6] = new GLatLng(35.40752059,139.4425106); points[7] = new GLatLng(35.40759054,139.4487762); points[8] = new GLatLng(35.41164791,139.4577885); points[9] = new GLatLng(35.41290705,139.4550419); points[10] = new GLatLng(35.417174,139.4567585); points[11] = new GLatLng(35.42724589,139.4433689); points[12] = new GLatLng(35.42857473,139.445343); points[13] = new GLatLng(35.42801522,139.4477463); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.40794032,139.4066334); points[1] = new GLatLng(35.40199384,139.403286); points[2] = new GLatLng(35.4024136,139.4022131); points[3] = new GLatLng(35.40108434,139.4011402); points[4] = new GLatLng(35.40139916,139.3952608); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.40139916,139.3952608); points[1] = new GLatLng(35.39982501,139.3884373); points[2] = new GLatLng(35.40125924,139.3814421); points[3] = new GLatLng(35.40080449,139.3719149); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.40139916,139.3952608); points[1] = new GLatLng(35.39002958,139.3955612); points[2] = new GLatLng(35.39016952,139.402771); points[3] = new GLatLng(35.38499146,139.3995094); points[4] = new GLatLng(35.37771363,139.4048309); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.37771363,139.4048309); points[1] = new GLatLng(35.36287601,139.3935013); points[2] = new GLatLng(35.35265607,139.3948746); points[3] = new GLatLng(35.35115097,139.370327); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.39450764,139.3734598); points[1] = new GLatLng(35.38856016,139.3744469); points[2] = new GLatLng(35.36777553,139.3706703); points[3] = new GLatLng(35.36322599,139.3686104); points[4] = new GLatLng(35.36154609,139.3717861); points[5] = new GLatLng(35.35552619,139.3719578); points[6] = new GLatLng(35.35559619,139.3706703); points[7] = new GLatLng(35.35115097,139.370327); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.42808516,139.4477463); points[1] = new GLatLng(35.42304942,139.4606209); points[2] = new GLatLng(35.42388873,139.4649124); points[3] = new GLatLng(35.42962379,139.4655991); points[4] = new GLatLng(35.42374885,139.467144); points[5] = new GLatLng(35.4241685,139.4726372); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.4241685,139.472723); points[1] = new GLatLng(35.42241993,139.4733238); points[2] = new GLatLng(35.42067133,139.4778728); points[3] = new GLatLng(35.41619472,139.4778728); points[4] = new GLatLng(35.40171399,139.4747829); points[5] = new GLatLng(35.39156894,139.4789028); points[6] = new GLatLng(35.38817531,139.4840956); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.38807035,139.4841385); points[1] = new GLatLng(35.3827522,139.4855976); points[2] = new GLatLng(35.37946317,139.4923782); points[3] = new GLatLng(35.37421444,139.4936657); points[4] = new GLatLng(35.37155495,139.4893742); points[5] = new GLatLng(35.35965617,139.4855976); points[6] = new GLatLng(35.35874619,139.4892025); points[7] = new GLatLng(35.3581162,139.4951677); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.3581162,139.4951677); points[1] = new GLatLng(35.36735558,139.5025921); points[2] = new GLatLng(35.3615111,139.5190716); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.3615111,139.5190716); points[1] = new GLatLng(35.36203607,139.5205307); points[2] = new GLatLng(35.3570662,139.5258522); points[3] = new GLatLng(35.3569262,139.5279121); points[4] = new GLatLng(35.3582562,139.5288563); points[5] = new GLatLng(35.35468616,139.5313454); points[6] = new GLatLng(35.35489617,139.5360661); points[7] = new GLatLng(35.35720621,139.5374393); points[8] = new GLatLng(35.3568562,139.5423317); points[9] = new GLatLng(35.36294601,139.5441341); points[10] = new GLatLng(35.35979617,139.5490265); points[11] = new GLatLng(35.35517618,139.5485973); points[12] = new GLatLng(35.34712556,139.5578671); points[13] = new GLatLng(35.3474056,139.5697975); points[14] = new GLatLng(35.33711368,139.5735741); points[15] = new GLatLng(35.33515316,139.5818138); points[16] = new GLatLng(35.33662355,139.587822); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.33662355,139.587822); points[1] = new GLatLng(35.33648352,139.5887661); points[2] = new GLatLng(35.32801089,139.5897961); points[3] = new GLatLng(35.32408937,139.5932293); points[4] = new GLatLng(35.32037776,139.5932293); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.32037776,139.5932293); points[1] = new GLatLng(35.31932727,139.5956326); points[2] = new GLatLng(35.31666598,139.5960617); points[3] = new GLatLng(35.31589559,139.5987225); points[4] = new GLatLng(35.31708619,139.6037865); points[5] = new GLatLng(35.31512519,139.6037006); points[6] = new GLatLng(35.31260384,139.6094513); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.31260384,139.6094513); points[1] = new GLatLng(35.3063001,139.612112); points[2] = new GLatLng(35.30160701,139.6189785); points[3] = new GLatLng(35.29144937,139.6217251); points[4] = new GLatLng(35.28591467,139.6238708); points[5] = new GLatLng(35.28206118,139.6209526); points[6] = new GLatLng(35.27908336,139.6230555); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.35115097,139.370327); points[1] = new GLatLng(35.34005436,139.3695545); points[2] = new GLatLng(35.33970429,139.3747044); points[3] = new GLatLng(35.33515316,139.3711853); points[4] = new GLatLng(35.33018165,139.3715286); points[5] = new GLatLng(35.3300416,139.3694687); points[6] = new GLatLng(35.32324902,139.3693829); points[7] = new GLatLng(35.31953737,139.3735886); points[8] = new GLatLng(35.31463493,139.3745327); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.37771363,139.4048309); points[1] = new GLatLng(35.38464158,139.4177914); points[2] = new GLatLng(35.38485151,139.4310093); points[3] = new GLatLng(35.38009299,139.4326401); points[4] = new GLatLng(35.37043514,139.4288635); points[5] = new GLatLng(35.36980524,139.4302368); points[6] = new GLatLng(35.37379452,139.4334126); points[7] = new GLatLng(35.3700852,139.4326401); points[8] = new GLatLng(35.36819547,139.4343567); points[9] = new GLatLng(35.36959527,139.4390774); points[10] = new GLatLng(35.36889538,139.4412231); points[11] = new GLatLng(35.36490585,139.4400215); points[12] = new GLatLng(35.36371595,139.4367599); points[13] = new GLatLng(35.35377613,139.4373608); points[14] = new GLatLng(35.35265607,139.4400215); points[15] = new GLatLng(35.34089454,139.4441414); points[16] = new GLatLng(35.33179217,139.4435406); points[17] = new GLatLng(35.31918721,139.4379616); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.3581162,139.4951677); points[1] = new GLatLng(35.35482617,139.5036221); points[2] = new GLatLng(35.35090595,139.504137); points[3] = new GLatLng(35.34985586,139.5109177); points[4] = new GLatLng(35.34292492,139.5098019); points[5] = new GLatLng(35.34404511,139.5110035); points[6] = new GLatLng(35.34187473,139.5166683); points[7] = new GLatLng(35.33333264,139.5094585); points[8] = new GLatLng(35.33270246,139.5028496); points[9] = new GLatLng(35.32450954,139.4969273); points[10] = new GLatLng(35.31806667,139.4961548); points[11] = new GLatLng(35.31274391,139.4907475); points[12] = new GLatLng(35.30777102,139.4881725); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.32037776,139.5932293); points[1] = new GLatLng(35.31960741,139.5909119); points[2] = new GLatLng(35.31960741,139.5866203); points[3] = new GLatLng(35.31715623,139.5850754); points[4] = new GLatLng(35.31617573,139.5807838); points[5] = new GLatLng(35.31365441,139.5776939); points[6] = new GLatLng(35.31281395,139.5687675); points[7] = new GLatLng(35.31043261,139.5688534); points[8] = new GLatLng(35.30580979,139.5582104); points[9] = new GLatLng(35.30496925,139.5579529); points[10] = new GLatLng(35.3050393,139.5563221); points[11] = new GLatLng(35.30265772,139.5564938); points[12] = new GLatLng(35.30125676,139.5528889); points[13] = new GLatLng(35.29880503,139.5511723); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.27908336,139.6230555); points[1] = new GLatLng(35.27778709,139.6242142); points[2] = new GLatLng(35.27596528,139.6225834); points[3] = new GLatLng(35.2779973,139.6125412); points[4] = new GLatLng(35.27596528,139.6049881); points[5] = new GLatLng(35.27729661,139.5976925); points[6] = new GLatLng(35.28115033,139.5957184); points[7] = new GLatLng(35.28234144,139.6053314); points[8] = new GLatLng(35.28626498,139.6113396); points[9] = new GLatLng(35.29081885,139.6094513); points[10] = new GLatLng(35.2917296,139.5895386); points[11] = new GLatLng(35.28626498,139.5831013); points[12] = new GLatLng(35.28710572,139.5789814); points[13] = new GLatLng(35.28248157,139.5741749); points[14] = new GLatLng(35.28486374,139.5692825); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); var points = []; points[0] = new GLatLng(35.27908336,139.6230555); points[1] = new GLatLng(35.27897825,139.6277332); points[2] = new GLatLng(35.27449379,139.6320248); points[3] = new GLatLng(35.27211131,139.642067); points[4] = new GLatLng(35.27113028,139.6392345); points[5] = new GLatLng(35.26531387,139.6377754); points[6] = new GLatLng(35.26258072,139.6408653); points[7] = new GLatLng(35.2583056,139.6289349); points[8] = new GLatLng(35.25543204,139.6269608); points[9] = new GLatLng(35.2573244,139.6212959); points[10] = new GLatLng(35.26124915,139.6209526); points[11] = new GLatLng(35.26166965,139.6181202); points[12] = new GLatLng(35.257815,139.6134853); points[13] = new GLatLng(35.2583056,139.603529); points[14] = new GLatLng(35.25529186,139.5991516); points[15] = new GLatLng(35.25311909,139.5763206); map.addOverlay(new GPolyline(points,'#ff0000',3,1)); // //マウスホイールのイベントを追加 // if( navigator.userAgent.match( "MSIE" ) ){ document.getElementById( "map" ).attachEvent( "onmousewheel" , mouseWheelZooming ); } // if( navigator.userAgent.match( "Gecko" ) ){ document.getElementById( "map" ).addEventListener( "DOMMouseScroll" , mouseWheelZooming , false ); } // if( navigator.userAgent.match( "Safari" ) ){ document.getElementById( "map" ).onmousewheel = mouseWheelZooming; } } // //KsGMap.jp Tips 『マウスホイールによるズーム機能』 http://www.ksgmap.jp/ Copyright(c) 2005 Ksc // function mouseWheelZooming( event ){ // //マウスホイールの上/下の取得と、スクロールのキャンセル // if( navigator.userAgent.match( "MSIE" ) ){ var delta = event.wheelDelta; event.returnValue = false; } //IE // if( navigator.userAgent.match( "Gecko" ) ){ var delta = event.detail * -1; event.preventDefault(); } //Gecko // if( navigator.userAgent.match( "Safari" ) ){ var delta = event.wheelDelta; event.returnValue = false; } //Safari // //ズーム処理 // map.setZoom( map.getZoom() + ( delta > 0 ? 1 : -1 ) ); // } //初期選択状態 function SetDefult(TargetPoup) { if( TargetPoup == 'municipality1'){ if(municipality_id1 && municipality_id1 != 'pass' && municipality_id1 != '0'){ document.getElementById('municipality1').value = municipality_id1; if(!document.getElementById('municipality1').value){document.getElementById('municipality1').selectedIndex = 0;} CreatePopup( Getdata='town_zone1',TargetPoup='town_zone1',ID=$F('municipality1') ); municipality_id1='pass'; } else if(!municipality_id1 && municipality_id1 != 'pass') { $('town_zone1').selectedIndex = 0; } } else if( TargetPoup == 'town_zone1'){ if(town_zone_id1 && town_zone_id1 != 'pass' && town_zone_id1 != '0'){ document.getElementById('town_zone1').value = town_zone_id1; town_zone_id1 ='pass'; } } if( TargetPoup == 'municipality2'){ if(municipality_id2 && municipality_id2 != 'pass' && municipality_id2 != '0'){ document.getElementById('municipality2').value = municipality_id2; if(!document.getElementById('municipality2').value){document.getElementById('municipality2').selectedIndex = 0;} CreatePopup( Getdata='town_zone2',TargetPoup='town_zone2',ID=$F('municipality2') ); municipality_id2='pass'; } else if(!municipality_id2 && municipality_id2 != 'pass') { $('town_zone2').selectedIndex = 0; } } else if( TargetPoup == 'town_zone2'){ if(town_zone_id2 && town_zone_id2 != 'pass' && town_zone_id2 != '0'){ document.getElementById('town_zone2').value = town_zone_id2; town_zone_id2 ='pass'; } } if( TargetPoup == 'municipality3'){ if(municipality_id3 && municipality_id3 != 'pass' && municipality_id3 != '0'){ document.getElementById('municipality3').value = municipality_id3; if(!document.getElementById('municipality3').value){document.getElementById('municipality3').selectedIndex = 0;} CreatePopup( Getdata='town_zone3',TargetPoup='town_zone3',ID=$F('municipality3') ); municipality_id3='pass'; } else if(!municipality_id3 && municipality_id3 != 'pass') { $('town_zone3').selectedIndex = 0; } } else if( TargetPoup == 'town_zone3'){ if(town_zone_id3 && town_zone_id3 != 'pass' && town_zone_id3 != '0'){ document.getElementById('town_zone3').value = town_zone_id3; town_zone_id3 ='pass'; } } } // 初期設定 function firstInit () { imgArray = firstInit.arguments; overImg = new Array (); for (i=0; i<(imgArray.length); i++) { overImg[i] = new Image().src = imgArray[i]; } } // ロールオーバー処理 function changeImages (imgId, imgSrc) { if (document.getElementById) { document.getElementById(imgId).src = imgSrc; } } addNewProperty = function(latitude, longitude, name, propertyId, propertyKind, municipality_id, town_zone_id, listImage) { // Create our "tiny" marker icon var icon = new GIcon(); icon.image = "http://www.higawari.info/images/map/mm_20_red.png"; icon.shadow = "http://www.higawari.info/images/map/mm_20_shadow.png"; icon.iconSize = new GSize(12, 20); icon.shadowSize = new GSize(22, 20); icon.iconAnchor = new GPoint(6, 20); icon.infoWindowAnchor = new GPoint(5, 1); var point = new GLatLng(parseFloat(latitude), parseFloat(longitude)); //alert(latitude); //alert(longitude); //alert(name); //alert(propertyId); //alert(propertyKind); //alert(municipality_id); //alert(town_zone_id); //alert(listImage); function GMarkerOptions() { this.icon = icon; this.clickable = true; this.title = property_kind_special[propertyKind]; } var opts = new GMarkerOptions(); var marker = new GMarker(point, opts); map.addOverlay(marker); if(name) { name += '(' + property_kind_special[propertyKind] + ')
'; } else { name +=property_kind_special[propertyKind] + '
'; } if(municipality_id != '' || town_zone_id != '') { name += '[' + municipality_id + town_zone_id + ']
'; } if(propertyId != "null" && listImage != "null") { name += '  '; } else { name += '  '; } if(propertyId != "null") name += '物件詳細'; var clickfunc = function() { marker.openInfoWindowHtml(name); }; GEvent.addListener(marker, "click",clickfunc ); } function NewlyPointload() { var target_url = 'http://www.higawari.info/js/latest_property.php?company_id=4&municipality_id=0'; try { if(window.XMLHttpRequest) { httpObj = new XMLHttpRequest(); } else if(window.ActiveXObject) { httpObj = new ActiveXObject("Microsoft.XMLHTTP"); } else { httpObj = false; } } catch(e) { httpObj = false; } if(!httpObj) { error_func(); } httpObj.open("GET",target_url,true); httpObj.onreadystatechange = function(){ if(httpObj.readyState == 4 && httpObj.status == 200){ try { var data =eval(decodeURIComponent(httpObj.responseText)); } catch(e) {} for(var i=0; i