﻿var newBuilding=[{"bid":"9120","type":"1","hid":"86477","name":"\u5929\u5e9c\u5bb6\u56ed","addr":"\u5858\u6816\u9547\u4f73\u4e3d\u82d1\u5357\u4fa7 ","y":"120.196857988896","x":"30.4766093855651"},{"bid":"9387","type":"1","hid":"86748","name":"\u5929\u4e50\u4e91\u90fd","addr":"\u6240\u524d\u9547 ","y":"120.369683509148","x":"30.118053986283"},{"bid":"9263","type":"1","hid":"86624","name":"\u5929\u5c7f.\u5343\u5c9b\u6e56\u5c71\u9876\u5ea6\u5047\u522b\u5885","addr":"\u5343\u5c9b\u6e56\u5929\u5c7f\u5ea6\u5047\u6751 ","y":"119.030703044796","x":"29.6216374222228"},{"bid":"9217","type":"1","hid":"86576","name":"\u5929\u76ee\u5c71\u6e05\u6cc9\u5c45","addr":"\u897f\u5929\u76ee\u4e61\u76db\u6751 ","y":"119.474307482957","x":"30.2709779380125"},{"bid":"7262","type":"1","hid":"28648","name":"\u5929\u9e3f\u541b\u9091","addr":"\u6ee8\u6c5f\u533a\u4e1c\u4fe1\u5927\u9053\u4ee5\u5357\uff0c\u4e2d\u6052\u7535\u5b50\u4ee5\u897f\u3001\u9038\u5929\u5e7f\u573a\u4ee5\u4e1c\u3001\u89c4\u5212\u652f\u8def\u4ee5\u5317","y":"120.142378412531","x":"30.1736012324923"},{"bid":"9555","type":"1","hid":"87365","name":"\u5929\u4ebf\u5927\u53a6","addr":"\u676d\u5dde\u53e4\u58a9\u8def819\u53f7 ","y":"120.093777262592","x":"30.3151298060047"},{"bid":"9685","type":"1","hid":"87051","name":"\u5929\u9633.\u89c2\u7b51","addr":"\u4e01\u6865\u5927\u578b\u5c45\u4f4f\u533a ","y":"120.21983335067","x":"30.3556398675921"},{"bid":"1454","type":"1","hid":"88143","name":"\u5929\u9633\u4e0a\u6cb3","addr":"\u62f1\u5885\u533a\u5317\u671b\u62f1\u5885\u533a\u653f\u5e9c\uff0c\u5357\u4e34\u5c0f\u6cb3\uff0c\u897f\u81f3\u767b\u4e91\u8def\uff0c\u5317\u81f3\u89c4\u5212\u4e2d\u7684\u6843\u56ed\u8def","y":"120.131595513675","x":"30.3118428151182"},{"bid":"1674","type":"1","hid":"28805","name":"\u7eff\u91ce\u6625\u5929.\u7fe0\u8c37\u5e7d\u5170","addr":"\u7559\u548c\u8def\u5c0f\u548c\u5c71\u9ad8\u6559\u56ed\u533a ","y":"120.032179186337","x":"30.1940592321997"},{"bid":"1632","type":"1","hid":"28484","name":"\u9633\u5149\u5929\u9645","addr":"\u676d\u5dde\u4f59\u676d\u826f\u6e1a ","y":"120.045322869065","x":"30.3643842523598"}];document.write("<link rel='stylesheet' media='all' type='text/css' href='http://images.zjfbh.com/css/fbwmap.css' />");function FbwMap($,_){this._domain="http://"+document.domain;this._container=$;this._width=0;this._height=0;this._mapControl=0;this._x=30.27635986;this._y=120.120152085;this._zoom=17;this.e_marker=null;this._ico="blank_orange.png";this._delayLoad=null;this._dragging;this._ruler;this._Scale;this._overview;this._scroll;this._doubleZoom;this._mapTypeControl;if(_){this._width=_.w?_.w:this._width;this._height=_.h?_.h:this._height;this._x=_.x?_.x:this._x;this._y=_.y?_.y:this._y;this._zoom=_.z?_.z:this._zoom;this._mapControl=_.mapControl?_.mapControl:this._mapControl;this._dragging=_.dragging?_.dragging:this._dragging;this._ruler=_.ruler?_.ruler:this._ruler;this._scale=_.scale?_.scale:this._scale;this._overview=_.overview?_.overview:this._overview;this._scroll=_.scroll?_.scroll:this._scroll;this._doubleZoom=_.doubleZoom?_.doubleZoom:this._doubleZoom;this._mapTypeControl=_.mapTypeControl?_.mapTypeControl:this._mapTypeControl}if(GMap2){this._map=new GMap2(this._container);with(this._map){setCenter(new GLatLng(this._x,this._y),this._zoom);if(this._dragging)this._map.disableDragging();switch(this._mapControl){case 2:addControl(new GSmallMapControl());break;case 3:addControl(new GSmallZoomControl3D());break;case 1:addControl(new GLargeMapControl3D());break}if(this._scale)addControl(new GScaleControl());if(this._overview)addControl(new GOverviewMapControl());if(this._mapTypeControl)addControl(new GHierarchicalMapTypeControl());if(this._scroll)enableScrollWheelZoom();if(this._doubleZoom)disableDoubleClickZoom();if(this._ruler){var ruler=new GRulerControl();addControl(ruler);ruler.setEnabled(false)}}GEvent.addListener(this._map,"dragend",function(){});this._geocoder=new GClientGeocoder();this.fbwUnload=GUnload}this._onLoad=null}FbwMap.prototype.changeType=function($){switch($.toUpperCase()){case"SATELLITE":this._map.setMapType(G_SATELLITE_MAP);break;case"2D":this._map.setMapType(G_NORMAL_MAP);break;case"HYBRID":this._map.setMapType(G_HYBRID_MAP);break}};FbwMap.prototype.setCenter=function(A,_,$){if(A&&_)this._map.setCenter(new GLatLng(A,_),$)};FbwMap.prototype.showPanel=function(opts){if(opts&&opts.id){var getBuildingUrl="/com/ajaxpage/ajaxGetNewHouseInfo.aspx?bid="+opts.id;eval($.ajax({type:"GET",url:getBuildingUrl,async:false}).responseText);if(typeof(building)!="undefined"){var html="<div class=\"zjfbwcom_map\">"+"<div class=\"zjfbwcom_house\">"+"<div class=\"zjfbwcom_house_pic\"><img src=\""+building["img"]+"\" width=\"85\" height=\"90\" /></div>"+"<div class=\"zjfbwcom_house_note\">"+"<div class=\"zjfbwcom_house_name\"><a href=\""+building["detail"]+"\" target=\"_blank\">"+building["name"]+"</a></div>"+"<div class=\"addr\"><strong>\u5730\u5740\uff1a</strong>"+building["addr"]+"</div>"+"<div><strong>\u5f00\u76d8\u65f6\u95f4\uff1a<span class=\"FONT_007CFF\">"+building["time"]+"</span></strong></div>"+"<div><strong>\u5747\u4ef7\uff1a<span class=\"FONT_007CFF\">"+building["price"]+"</span></strong></div>"+"<div style=\"display:none\">\u603b\u5957\u6570(<span class=\"FONT_007CFF\"><strong>"+building["s"]+"\u5957</strong></span>) \u53ef\u552e\u5957(<span class=\"FONT_007CFF\"><strong>"+building["v"]+"\u5957</strong></span>)</div>"+"</div>"+"</div>"+"</div>",point=new GLatLng(building["x"],building["y"]),marker=new GMarker(point);this._map.addOverlay(marker);marker.bindInfoWindowHtml(html);marker.openInfoWindowHtml(html);this._map.panTo(point)}}};FbwMap.prototype.showBuildingPanel=function($){if($&&$.id){this._map.clearOverlays();this.showPanel($)}};FbwMap.prototype.showAddress=function(_,$){if(this._geocoder)this._geocoder.getLatLng(_,function(B){if(!B)alert("Google\u5c45\u7136\u627e\u4e0d\u5230\uff1a"+_);else{$._map.setCenter(B,this._zoom);var A=new GMarker(B);$._map.addOverlay(A);A.openInfoWindowHtml(_+"("+B.lat()+" , "+B.lng()+")")}})};FbwMap.prototype.loadHotspot=function(){var _=this._map.getBounds(),F=_.getSouthWest(),A=_.getNorthEast(),B=F.lat(),C=F.lng(),E=A.lat(),$=A.lng(),D=this._map.getZoom();this.downDataTimer(B,C,E,$,D)};FbwMap.prototype.downDataTimer=function(C,_,A,B,$){this.getBubbleData(C-512,_-512,A+512,B+512,$)};FbwMap.prototype.getBubbleData=function(E,C,_,A,B){try{for(var $=0;$<newBuilding.length;$++)this.showBubble(newBuilding[$]["hid"],newBuilding[$]["name"],newBuilding[$]["type"],newBuilding[$]["bid"],new GLatLng(newBuilding[$]["x"],newBuilding[$]["y"]))}catch(D){}};FbwMap.prototype.showBubble=function(C,D,_,$,B){var A;editState=false;this.e_marker=new GMarker(B,{icon:new GIcon(G_DEFAULT_ICON,this._ico),title:D,draggable:true});this.e_marker._data={hid:C,name:D,type:_,bid:$,x:B.lat(),y:B.lng()};this.e_marker._ico=this._ico;this.e_marker.disableDragging();this._map.addOverlay(this.e_marker);GEvent.addListener(this.e_marker,"click",function($){editState=true;var _="<p>\u697c\u76d8\u540d\u79f0:"+this._data.name+" \u65b0\u697c\u76d8ID:("+this._data.bid+")</p>";this.enableDragging();this.openInfoWindowHtml(_);this.setImage(this._ico)});GEvent.addListener(this.e_marker,"dragstart",function($){this.closeInfoWindow();this.setImage(this.ico)});GEvent.addListener(this.e_marker,"dragend",function(_){if(A)this._map.removeOverlay(A);var C=new GLatLng(this._data.x,this._data.y),$=new GPolyline([C,_],"purple",3);A=$;this._map.addOverlay(A);var B="<b style='color:red'>\u66f4\u65b0\u70ed\u70b9</b>(\u8bf7\u62d6\u62fd\u5c0f\u7ea2\u70b9\u81f3\u6b63\u786e\u4f4d\u7f6e)<hr width=250 size=1 />\u9009\u62e9\u5206\u7c7b\uff1a"+_sel.replace("value=\""+this._data.sort+"\"","value=\""+this._data.sort+"\" selected")+"<br />\u70ed\u70b9\u540d\u79f0\uff1a<input id='g_hot' type='text' value="+this._data.name+" /><hr style='clear:left;' width=250 size=1 />  <a href='javascript:EditHotspot("+this._data.hid+");'>\u66f4\u65b0\u70ed\u70b9</a> <a href='javascript:RemoverHot("+this._data.hid+")'>\u5220\u9664\u70ed\u70b9</a> <a href='javascript:BindingEntity("+this._data.hid+","+this._data.sort+",\""+this._data.name+"\");'>\u7ed1\u5b9a\u6570\u636e</a> <a href='javascript:CancelEdit("+this._data.x+","+this._data.y+");'>\u53d6\u6d88\u7f16\u8f91</a>";this.openInfoWindowHtml(B)});GEvent.addListener(this.e_marker,"infowindowclose",function($){if(this.getPoint().lat()==this._data.x&&this.getPoint().lng()==this._data.y){this.setImage(this._ico);this.disableDragging();editState=false}})};var kobj=new Object();kobj.RESET_BUTTON_TITLE_="\u6e05\u9664\u6240\u6709\u6d4b\u8ddd\u6807\u8bb0";kobj.ENABLE_BUTTON_TITLE_="\u6dfb\u52a0\u6d4b\u8ddd\u6807\u8bb0\u5df2\u542f\u7528\uff0c\u5355\u51fb\u8fd9\u91cc\u7981\u7528";kobj.DISABLE_BUTTON_TITLE_="\u6dfb\u52a0\u6d4b\u8ddd\u6807\u8bb0\u5df2\u7981\u7528\uff0c\u5355\u51fb\u8fd9\u91cc\u542f\u7528";kobj.DELETE_BUTTON_TITLE_="\u5220\u9664";kobj.RESET_BUTTON_IMAGE_="http://www.playgoogle.com/googlemap/ruler_clear.png";kobj.ENABLE_BUTTON_IMAGE_="http://www.playgoogle.com/googlemap/ruler_enabled.png";kobj.DISABLE_BUTTON_IMAGE_="http://www.playgoogle.com/googlemap/ruler_disabled.png";kobj.BACKGROUND_IMAGE_="http://www.playgoogle.com/googlemap/ruler_background.png";kobj.KILOMETER_="\u516c\u91cc";kobj.METER_="\u7c73";var northLatitude="\u5317\u7eac",southLatitude="\u5357\u7eac",westLongtitude="\u897f\u7ecf",eastLongtitude="\u4e1c\u7ecf";function GRulerControl(){var $=this;$.RESET_BUTTON_TITLE_=kobj.RESET_BUTTON_TITLE_;$.ENABLE_BUTTON_TITLE_=kobj.ENABLE_BUTTON_TITLE_;$.DISABLE_BUTTON_TITLE_=kobj.DISABLE_BUTTON_TITLE_;$.DELETE_BUTTON_TITLE_=kobj.DELETE_BUTTON_TITLE_;$.RESET_BUTTON_IMAGE_=kobj.RESET_BUTTON_IMAGE_;$.ENABLE_BUTTON_IMAGE_=kobj.ENABLE_BUTTON_IMAGE_;$.DISABLE_BUTTON_IMAGE_=kobj.DISABLE_BUTTON_IMAGE_;$.BACKGROUND_IMAGE_=kobj.BACKGROUND_IMAGE_;$.KILOMETER_=kobj.KILOMETER_;$.KILOMETER_=kobj.KILOMETER_;$.METER_=kobj.METER_}GRulerControl.prototype=new GControl();GRulerControl.prototype.initialize=function(B){var C=this,$=document.createElement("div");C.setButtonStyle_($);var _=document.createElement("img");_.width=_.height=19;GEvent.addDomListener(_,"click",function(){C.setEnabled(!C.isEnabled())});$.appendChild(_);var D=document.createElement("img");D.width=D.height=19;D.src=C.RESET_BUTTON_IMAGE_;D.title=C.RESET_BUTTON_TITLE_;GEvent.addDomListener(D,"click",function(){C.reset()});$.appendChild(D);var A=document.createElement("div");A.style.font="small Arial";A.style.fontWeight="bold";A.style.fontSize="9pt";A.style.width="82px";$.appendChild(A);B.rulerControl_=C;C.map_=B;C.head_=new Object();C.tail_=new Object();C.head_.next_=C.tail_;C.tail_.prev_=C.head_;C.btnEnable_=_;C.btnReset_=D;C.txtInfo_=A;C.setEnabled(true);B.getContainer().appendChild($);return $};GRulerControl.prototype.setButtonStyle_=function($){$.style.backgroundColor="#fff";$.style.backgroundImage="url("+this.BACKGROUND_IMAGE_+")";$.style.font="small Arial";$.style.border="1px solid #888888";$.style.padding="4px";$.style.textAlign="right";$.style.cursor="pointer"};GRulerControl.prototype.formatDistance_=function($){var _=this;$=Math.round($);if($<=1000)return $+" "+_.METER_;else if($<=1000000)return $/1000+" "+_.KILOMETER_;return Math.round($/1000)+" "+_.KILOMETER_};GRulerControl.prototype.formatDegree_=function(_){_=Math.abs(_);var $=Math.floor(_),B=Math.floor((_-$)*60),A=Math.round((_-$)*3600%60);return $+"."+B+A};GRulerControl.prototype.formatLatLng_=function(_){var C=this,B,A,$=_.lat(),D=_.lng();B=$>=0?northLatitude:southLatitude;A=D>=0?eastLongtitude:westLongtitude;return A+C.formatDegree_(D)+", "+B+C.formatDegree_($)};GRulerControl.prototype.getDefaultPosition=function(){return new GControlPosition(G_ANCHOR_TOP_RIGHT,new GSize(400,8))};GRulerControl.prototype.isEnabled=function(){return this.enabled_};GRulerControl.prototype.setEnabled=function($){var _=this;if($==_.enabled_)return;_.enabled_=$;if(_.enabled_){_.mapClickHandle_=GEvent.addListener(_.map_,"click",_.onMapClick_);_.txtInfo_.style.display="block";_.btnReset_.style.display="inline";_.btnEnable_.src=_.ENABLE_BUTTON_IMAGE_;_.btnEnable_.title=_.ENABLE_BUTTON_TITLE_;_.updateDistance_()}else{GEvent.removeListener(_.mapClickHandle_);_.txtInfo_.style.display="none";_.btnReset_.style.display="none";_.btnEnable_.src=_.DISABLE_BUTTON_IMAGE_;_.btnEnable_.title=_.DISABLE_BUTTON_TITLE_}};GRulerControl.prototype.onMapClick_=function(_,C){var B=this.rulerControl_;if(_)return;var D=new GMarker(C,{draggable:true}),A=B.tail_.prev_;D.prev_=A;D.next_=A.next_;A.next_.prev_=D;A.next_=D;GEvent.addListener(D,"dragend",function(){B.map_.closeInfoWindow();B.updateSegments_(D);B.updateDistance_()});GEvent.addListener(D,"click",function(){D.openInfoWindow(B.createInfoWindow_(D))});B.map_.addOverlay(D);if(D.prev_!=B.head_){var $=[D.prev_.getLatLng(),C];D.segPrev_=new GPolyline($);D.prev_.segNext_=D.segPrev_;B.map_.addOverlay(D.segPrev_);B.updateDistance_()}};GRulerControl.prototype.updateDistance_=function(){var _=this,$=_.getDistance();_.txtInfo_.innerHTML=_.formatDistance_($)};GRulerControl.prototype.getDistance=function(){var A=this,$=0;for(var _=A.head_;_!=A.tail_;_=_.next_)if(_.prev_&&_.prev_.getLatLng)$+=_.prev_.getLatLng().distanceFrom(_.getLatLng());return $};GRulerControl.prototype.reset=function(){var _=this;for(var $=_.head_.next_;$!=_.tail_;$=$.next_){_.map_.removeOverlay($);if($.segNext_)_.map_.removeOverlay($.segNext_)}_.head_=new Object();_.tail_=new Object();_.head_.next_=_.tail_;_.tail_.prev_=_.head_;_.updateDistance_()};GRulerControl.prototype.updateSegments_=function(_){var A=this,$;if(_.segPrev_&&_.prev_.getLatLng){A.map_.removeOverlay(_.segPrev_);$=[_.prev_.getLatLng(),_.getLatLng()];_.segPrev_=new GPolyline($);_.prev_.segNext_=_.segPrev_;A.map_.addOverlay(_.segPrev_)}if(_.segNext_&&_.next_.getLatLng){A.map_.removeOverlay(_.segNext_);$=[_.getLatLng(),_.next_.getLatLng()];_.segNext_=new GPolyline($);_.next_.segPrev_=_.segNext_;A.map_.addOverlay(_.segNext_)}};GRulerControl.prototype.createInfoWindow_=function(_){var B=this,A=document.createElement("div");A.style.fontSize="10.5pt";A.style.width="250px";A.appendChild(document.createTextNode(B.formatLatLng_(_.getLatLng())));var C=document.createElement("hr");C.style.border="solid 1px #cccccc";A.appendChild(C);var $=document.createElement("div");$.innerHTML=B.DELETE_BUTTON_TITLE_;$.style.color="#0000cc";$.style.cursor="pointer";$.style.textDecoration="underline";$.onclick=function(){B.map_.closeInfoWindow();B.removePoint_(_);B.updateDistance_()};A.appendChild($);return A};GRulerControl.prototype.removePoint_=function(_){var B=this;B.map_.removeOverlay(_);if(_.prev_.getLatLng&&_.next_.getLatLng){var $=[_.prev_.getLatLng(),_.next_.getLatLng()],A=new GPolyline($);_.prev_.segNext_=A;_.next_.segPrev_=A;B.map_.addOverlay(A)}_.prev_.next_=_.next_;_.next_.prev_=_.prev_;if(_.segPrev_)B.map_.removeOverlay(_.segPrev_);if(_.segNext_)B.map_.removeOverlay(_.segNext_)}