function createMapJs(src){ var scr = document.createElement('script'); scr.type = 'text/javascript'; scr.src = src; document.getElementsByTagName('HEAD').item(0).appendChild(scr); } /*createMapJs('http://www.0577emap.com/FlexCode/swfobject.js');*/ createMapJs('http://www.0577emap.com/FlexCode/rightClick.js');document.write("
");var MapMethod = {swfName:'WZMAPCODE',swfMapObj:null,getMapCodeSwf:function(swfName){ if(navigator.appName.indexOf('Microsoft') != -1) { return document.forms[0][swfName]; } else { return document[swfName]; } },getCurrentMapInfo:function(){ return this.swfMapObj.getCurrentMapInfo(); },getCurrentOwner:function(){ return this.swfMapObj.getCurrentOwner(); },getCurrentInco:function(){ return this.swfMapObj.getCurrentInco(); },go:function(params){ this.swfMapObj.go(params); },goScreen:function(beginX,beiginY,endX,endY){ this.swfMapObj.goScreen(beginX,beiginY,endX,endY); },setZoom:function(zoom){ this.swfMapObj.setZoom(zoom); },printInco:function(params){ this.swfMapObj.printInco(params); },printSwf:function(params){ this.swfMapObj.printSwf(params); },printLine:function(mapCoors, name){ this.swfMapObj.printLine(mapCoors, name); },hiddenPrint:function(incoName){ this.swfMapObj.hiddenPrintInco(incoName); },removePrint:function(incoName){ this.swfMapObj.removePrintInco(incoName); },setJsSetmapAfter:function(fun){ this.swfMapObj.setJsSetmapAfter(fun); },setJsZoomAfter:function(fun){ this.swfMapObj.setJsZoomAfter(fun); },setJsZoomBefore:function(fun){ this.swfMapObj.setJsZoomBefore(fun); },setJsOwnerClickAfter:function(fun){ this.swfMapObj.setJsOwnerClickAfter(fun); },starSurvey:function(){ this.swfMapObj.starSurvey(); },showRoad:function(){ this.swfMapObj.showRoad(); },hiddenRoad:function(){ this.swfMapObj.hiddenRoad(); },rightMenuShow:function(){ this.swfMapObj.rightMenuShow(); this.swfMapObj.endSurvey(); },drawMapcoors:function(params){ this.swfMapObj.drawMapcoors(params); },setBuildPolygonName:function(type, id, id0, buildName){ this.swfMapObj.setBuildPolygonName(type, id, id0, buildName); },starDraw:function(){ this.swfMapObj.starDraw(); },endDraw:function(){ this.swfMapObj.endDraw(); },leadWayData:function(mapcoorStr){ this.swfMapObj.leadWayData(mapcoorStr); },onReady:function(){ //用try,catch防止 //1.mapcode.swf还未在网页中初始化 //2.虽然初始化但注册的javascript方法可能没有完全注册好 try { window.status = window.status + ',1'; this.swfMapObj = this.getMapCodeSwf(this.swfName); RightClick.init(); mapInited(); } catch(e) { setTimeout('MapMethod.onReady()',50); } }};MapMethod.onReady();