﻿//var Esc_setValue={w:0,h:0,x:50000,y:40000,z:3,d:3,loadType:0,type:0,code:'utf-8',apiSrc:'EscApi.jsp',apiPath:'http://www.vr-c.com/',domain:'gz',resourcePath:'/resource/',popStr:'',isLoadMiniMap:true,isLoadZoomBar:true,isLoadHotspot:true,isLoadInfo:true};
//默认值
var Esc_setValue = {
    w: 0, h: 0, x: 50000, y: 40000, z: 4, d: 3, loadType: 0, type: 0, code: 'utf-8', apiSrc: 'EscApi2.js', apiPath: 'http://map.xdesc.com/api/', mapRootPath: 'http://map.xdesc.com/',
    domain: 'gz', resourcePath: '/resource/', popStr: '', isLoadMiniMap: true, issuperMiniMap: false, isLoadZoomBar: true, isLoadHotspot: true, isLoadInfo: true, isLoadRoadWeb: false, xPicPath: '',
    //LTx: 131070, LTy: 131070, xL: 262144, yL: 163840,
    inertance: true    , //drag inertance
    googleparameter: {},
    ApiConst: window.ApiConst //卍 20110331 添加 以参数形式 传入api2 避免ApiConst 为空问题
};  //xPicPath添加于2008-06-07　by 柳寒风


//=======================================google 地图配置
if (typeof (google) != "undefined" && google!=null ) {
    var myLatlng = new google.maps.LatLng(24.69447783840982, 108.06007504463196); //中心点坐标－－y-x 南宁22.80，108.39
    Esc_setValue.googleparameter.myOptions = { zoom: 19, navigationControl: false, mapTypeControl: false, streetViewControl: false, scaleControl: false, center: myLatlng, mapTypeId: google.maps.MapTypeId.ROADMAP}//ROADMAP  zoom:级别；地图类型 HYBRID-混合、satellite-卫星、ROADMAP-平面、terrain-地形
    Esc_setValue.googleparameter.newgooglemap = google.maps; //.Map; //(document.getElementById("divMap"), myOptions);
  
}
//var googlemap = new google.maps.Map(document.getElementById("divMap"), myOptions);
//=========================================

//设置默认值
//var Esc_customValue={};
var Esc_mapStatus=false;
if(typeof(Esc_customValue)=='undefined'||typeof(Esc_customValue)!='object')var Esc_customValue={};
if(typeof(o_h)!='undefined'&&typeof(o_h)=='number') Esc_customValue.h=o_h;
if(typeof(o_w)!='undefined'&&typeof(o_w)=='number') Esc_customValue.w=o_w;
if(typeof(o_x)!='undefined'&&typeof(o_x)=='number') Esc_customValue.x=o_x;
if(typeof(o_y)!='undefined'&&typeof(o_y)=='number') Esc_customValue.y=o_y;
if(typeof(o_z)!='undefined'&&typeof(o_z)=='number') Esc_customValue.z=o_z;
if(typeof(o_mpx)!='undefined'&&typeof(o_mpx)=='number') Esc_customValue.mpx=o_mpx;
if(typeof(o_mpy)!='undefined'&&typeof(o_mpy)=='number') Esc_customValue.mpy=o_mpy;
if(typeof(o_msize)!='undefined'&&typeof(o_msize)=='number') Esc_customValue.msize=o_msize;
if(typeof(o_resourcePath)!='undefined'&&typeof(o_resourcePath)=='string') Esc_customValue.resourcePath=o_resourcePath;
if(typeof(o_resourcePage)!='undefined'&&typeof(o_resourcePage)=='string') Esc_customValue.resourcePage=o_resourcePage;
if(typeof(o_mapPath)!='undefined'&&typeof(o_mapPath)=='string') Esc_customValue.mapPath=o_mapPath;
if(typeof(o_domain)!='undefined'&&typeof(o_domain)=='string') Esc_customValue.host='http://'+o_domain+'.www.vr-c.com';
if(typeof(o_filePath)!='undefined'&&typeof(o_filePath)=='string') Esc_customValue.filePath=o_filePath;
if(typeof(o_mapid)!='undefined'&&typeof(o_mapid)=='number') Esc_customValue.mapid=o_mapid;
if(typeof(o_ruler)!='undefined'&&typeof(o_ruler)=='number') Esc_customValue.ruler=o_ruler;
if(typeof(o_popStr)!='undefined'&&typeof(o_popStr)=='string') Esc_customValue.popStr=o_popStr;

Esc_customValue.parent=this;

//检查浏览器
if(navigator.userAgent.toLowerCase().indexOf('msie')>0)
	window.brw='ie';
else if(navigator.userAgent.toLowerCase().indexOf('firefox')>0)
	window.brw='ff';
else 
	window.brw='other';
//地图基类
var Esc_Class = {
	/**
	*	新建一个实例
	*/
  create: function() {
    return function() {
      this.initialize.apply(this, arguments);
    }
  }
}
/**
*   将source里的函数等都复制到dest中去,条件是replace为true
*   @param  dest    :目的地
*   @param  source  :源
*   @param  replace :是否要复制
*   @return dest    :对象
*/
Object.extend = function(dest, source, replace) {
	for(prop in source) {
		if(replace == false && dest[prop] != null) continue;
		dest[prop] = source[prop];
	}
	return dest;
}
//实例化一个地图基类
var mapDocClass=Esc_Class.create();
/**
*	对地图基类的扩展
*/
mapDocClass.prototype = {
    /**
    *	初始化
    */
    initialize: function() {
        this.defValue = { w: 0, h: 800, x: 50100, y: 38900, z: 2, d: 3, code: 'utf-8', apiSrc: 'EscApi.js', apiPath: '' };
        Object.extend(Esc_setValue, Esc_customValue, true);
        Object.extend(this.defValue, Esc_setValue, true);
        this.mapName = 'x__popomap';
        this.createMap();
        //=====================================================       
        if (typeof (this.map) != 'object') {
            alert("文件错误，请从新打开");
            window.close();
        }
        //=====================================================
    },
    /**
    *	新建地图
    */
    createMap: function() {
        //地图高宽
        var w, h;
        if (this.defValue.w == 0 || this.defValue.h == 0) {
            w = '100%';
            h = '100%';
        }
        else {
            w = this.defValue.w;
            h = this.defValue.h;
        }
        //在页面上输出地图的IFrame
        document.write('<iframe id=' + this.mapName + ' name=' + this.mapName + ' width="' + w + '"  height="' + h + '" frameBorder=0 scrolling="no" src="" style="width:' + w + ';height:' + h + ';position:relative;scrolling:no;z-index:1;"></iframe>');
        //生成地图对象
        this.map = null;
        this.map = eval(this.mapName);
        //输出地图对象
        with (this.map) {          
            document.open();
            document.charset = this.defValue.code;
            document.write('<html xmlns:v="urn:schemas-microsoft-com:vml">');
            document.write('<head>');
            document.write('<style>v\\:*{behavior:url(#default#VML);}</style>');
            //document.write('<link href="http://www.vr-c.com/inc/css.css" rel="stylesheet" type="text/css">');
            document.write('</head>');
            document.write('<body style="margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;background-image:url(\'' + this.defValue.mapRootPath + '/images/nopic.jpg\');">');
            document.write('</body>');
            document.write('</html>');
            document.close();

            //添加语言JavaScript到页面
            //			var jselm=document.createElement('script');
            //			jselm.language='javascript';
            //			jselm.id='lang';
            //			jselm.src=this.defValue.apiPath+'inc/lang/zh_cn.js';
            //			document.getElementsByTagName('head')[0].appendChild(jselm);
            //-------------------------------------------------------------------------------------------卍 怀疑此处有问题  导致 window.ApiConst.imgs 为空  现改用参数传入
            //添加API常量的JavaScript到页面
//            var jselm = document.createElement('script');
//            jselm.language = 'javascript';
//            jselm.id = 'mapconstjs';
//            jselm.charset = 'utf-8';
//            jselm.src = this.defValue.apiPath + 'ApiConst.js';
//            document.body.appendChild(jselm);
            //---------------------------------------------------------------------------
            //添加弹出窗口事件的JavaScript到页面
            var jselm = document.createElement('script');
            jselm.language = 'javascript';
            jselm.id = 'poppageplusjs';
            jselm.charset = 'utf-8';
            jselm.src = this.defValue.apiPath + 'plus/PopPagePlus.js';
            document.body.appendChild(jselm);

            //添加弹出窗口事件的JavaScript到页面
            var jselm = document.createElement('script');
            jselm.language = 'javascript';
            jselm.id = 'errorplusjs';
            jselm.charset = 'utf-8';
            jselm.src = this.defValue.apiPath + 'plus/ErrorPlus.js';
            document.body.appendChild(jselm);



            //添加API的JavaScript到页面
            var jselm = document.createElement('script');
            jselm.language = 'javascript';
            jselm.id = 'mapjs';
            jselm.charset = 'utf-8';
            jselm.src = this.defValue.apiPath + this.defValue.apiSrc;
            document.body.appendChild(jselm);

            //添加API的样式到页面
            var style = document.createElement('link');
            style.href = this.defValue.mapRootPath + '/css/css.css';
            style.rel = 'stylesheet';
            style.type = 'text/css';
            style.id = 'css1';
            document.getElementsByTagName('head')[0].appendChild(style);

            //添加语言样式到页面
            style = document.createElement('link');
            style.href = this.defValue.mapRootPath + '/css/css_zh_cn.css';
            style.rel = 'stylesheet';
            style.type = 'text/css';
            style.id = 'css2';
            document.getElementsByTagName('head')[0].appendChild(style);
            //            setTimeout("", 500);
            this.testtime = 0;
            if (typeof (this.map) != 'object' || typeof (this.map.mapApi) != 'object') this.twicereflesh();

        }
    },
    /**
    *	获取地图
    *	@return 	:地图对象
    */
    getMap: function() {
        return this.map;
    },
    /**
    *   设置返回值
    *   @param  fun1    :函数名称
    */
    setReturnObj: function(fun) {
        return this.getMap().mapApi.setReturnObj(fun);
    },

    /**
    *	返回地图状态
    */
    getMapStatus: function() {
        return Esc_mapStatus;
    },
    /**
    *	获取地图中心点的X坐标
    */
    getCenterX: function() {
        return this.getMap().mapApi.getCenterX();
    },
    /**
    *	获取地图中心点的Y坐标
    */
    getCenterY: function() {
        return this.getMap().mapApi.getCenterY();
    },
    /**
    *	获取当前的X坐标
    *	@param	evt	:事件
    */
    getCurX: function(evt) {
        return this.getMap().mapApi.getCurX(evt);
    },
    /**
    *	获取当前的Y坐标
    *	@param	evt	:事件
    */
    getCurY: function(evt) {
        return this.getMap().mapApi.getCurY(evt);

    },
    /**
    *	获取地图宽度
    */
    getMapWidth: function() {
        return this.getMap().mapApi.mapWidth;
    },
    /**
    *	获取地图高度
    */
    getMapHeight: function() {
        return this.getMap().mapApi.mapHeight;
    },
    /**
    *	获取地图放大倍数
    */
    getZoom: function() {
        return this.getMap().mapApi.Zoom;
    },
    /**
    *	获取区域/单元的信息,成员不定(柳寒风注:未明确)
    */
    getAreaUnitInfo: function() {
        return this.getMap().mapApi.AreaUnitInfo;
    },
    /**
    *	(柳寒风注:未明确)
    *	@param	type	:类型
    */
    getD: function(type) {
        return this.getMap().mapApi.getD(type);
    },
    /**
    *	(wormhole注:获取P 点 地图接口使用 20110124)
    *	@param	type	:类型
    */
    getP: function() {
        return this.getMap().mapApi.getP();
    },
    /**
    *	(柳寒风注:未明确)
    *	@param	name	:名称
    */
    getValue: function(name) {
        return this.getMap().mapApi[name];
    },
    /**
    *   调用指定函数
    *   @param  argu    :参数[0]方法名,[1...]方法的调用参数
    */
    invokeFun: function() {
        return this.getMap().mapApi.invokeFun(arguments);
    },
    /**
    *   绘制公交线路
    *   @param  o   :公交线路对象
    */
    drawLine: function(o) {
        return this.getMap().mapApi.drawLine(o);
    },
    mdLine: function(o) {
        return this.getMap().mapApi.mdLine(o);
    },
    mdBusLine: function(o, busLine) {
        return this.getMap().mapApi.mdBusLine(o, busLine);
    },
    /**
    *   设置在地图的当前中心点
    *   @param  x0      :X坐标
    *   @param  y0      :Y坐标
    *   @param  onmove  :(柳寒风注:未明确)
    *   @param  onend   :(柳寒风注:未明确)
    */
    go2xy: function(x0, y0, onmove, onend) {
        return this.getMap().mapApi.go2xy(x0, y0, onmove, onend);
    },
    /**
    *   设置在地图的当前中心点
    *   @param  x0      :X坐标
    *   @param  y0      :Y坐标
    *   @param  onmove  :(柳寒风注:未明确)
    *   @param  onend   :(柳寒风注:未明确)
    */
    go2xyS: function(x0, y0, onmove, onend) {
        return this.getMap().mapApi.go2xyS(x0, y0, onmove, onend);
    },
    /**
    *   设置VML对象的参数(选项)
    *   @param  option  :VML的参数(选项)
    */
    setValue: function(option, value) {
        return this.getMap().mapApi.setOption(option, value);
    },
    /**
    *   设置事件处理
    *   @param  eventType   :事件类型
    *   @param  fun         :处理函数
    */
    setEvent: function(eventType, fun) {
        return this.getMap().mapApi.setEvent(eventType, fun);
    },
    /**
    *   设置地图提示
    *   @param  htmlStr :地图提示内容(Html代码)
    */
    setMapTip: function(htmlStr) {
        return this.getMap().mapApi.setMapTip(htmlStr);
    },
    /**
    *   设置地图鼠标指针
    *   @param  c   :鼠标指针
    */
    setMapCursor: function(c) {
        return this.getMap().mapApi.setMapCursor(c);
    },
    /**
    *   设置模式
    *   @param  mode    :模式编号
    */
    selectMode: function(mode) {
        return this.getMap().mapApi.selectMode(mode);
    },
    /**
    *	在地图上显示信息
    *	@x		:X轴
    *	@y		:Y轴
    *	@id		:信息编号-
    *	@cid	:区域编号-
    *	@pager	:
    *	@noSlowF:
    */
    showOCInfo: function(x, y, id, cid, pager, noSlowF) {
        return this.getMap().mapApi.showOCInfo(x, y, id, cid, pager, noSlowF);
    },
    /**
    *	(柳寒风注:未明确)
    */
    drawArea: function(o) {
        return this.getMap().mapApi.drawArea(o);
    },
    /**
    *	(柳寒风注:未明确)
    */
    drawAllArea: function() {
        return this.getMap().mapApi.drawAllArea();
    },
    /**
    *   清除所有XX(柳寒风注:未明确)
    */
    destroyAllG: function() {
        return this.getMap().mapApi.destroyAllG();
    },
    /**
    *   清除一条XX(柳寒风注:未明确)
    *   @param  item    :XX
    */
    destroyG: function(item) {
        return this.getMap().mapApi.destroyG(item);
    },
    /**
    *   (柳寒风注:未明确)
    *   @param  x   :
    *   @param  y   :
    */
    clrData: function(x, y) {
        return this.getMap().mapApi.clrData(x, y);
    },
    /**
    *   类初始化
    *   @param  x   :中心点X坐标
    *   @param  y   :中心点Y坐标
    *   @param  l   :未知
    */
    init: function(x, y, l) {
        return this.getMap().mapApi.init(x, y, l);
    },
    /**
    *   载入标志(标牌)
    *   @param  type    :类型
    */
    loadSign: function(type) {
        return this.getMap().mapApi.loadSign(type);
    },
    /**
    *   移除标志(标牌)
    *   @param  type    :类型
    */
    removeSign: function(type) {
        return this.getMap().mapApi.removeSign(type);
    },
    /**
    *   更改地图类型
    *   @param  type    :类型
    */
    changeMapType: function(type) {
        return this.getMap().mapApi.changeMapType(type);
    },
    /**
    *   添加用户弹出窗口
    *   @param  obj     :数据
    *   @param  type    :类型
    */
    addUserPop: function(arr) {
        return this.getMap().mapApi.addUserPop(arr);
    },
    /**
    *   新建用户弹出窗口
    *   @param  e       :元素
    *   @param  param   :参数
    */
    createUserPop: function(e, params) {
        return this.getMap().mapApi.createUserPop(e, params);
    },
    /**
    *   新建弹出层
    *   @param  idStr   :元素ID
    *   @param  html    :元素内容(文本/对象)
    *   @param  x0      :X坐标
    *   @param  y0      :Y坐标
    *   @param  sx      :X坐标偏移量
    *   @param  sy      :Y坐标偏移量
    *   @param  z       :Zindex
    */
    createPop: function(idStr, htmlStr, x0, y0, sx, sy, z) {
        return this.getMap().mapApi.createPop(idStr, htmlStr, x0, y0, sx, sy, z);
    },
    /**
    *   新建弹出层
    *   @param  idStr   :元素ID
    *   @param  html    :元素内容(文本/对象)
    *   @param  x0      :X坐标
    *   @param  y0      :Y坐标
    *   @param  sx      :X坐标偏移量
    *   @param  sy      :Y坐标偏移量
    *   @param  z       :Zindex
    *   @param  r       :自动缩放到某一等级(柳寒风注:未明确)
    */
    createPopT: function(idStr, htmlStr, x0, y0, sx, sy, z) {
        return this.getMap().mapApi.createPopT(idStr, htmlStr, x0, y0, sx, sy, z);
    },
    /**
    *   缩放到某一等级
    *   @param  z   :缩放的等级
    */
    zoomto: function(z) {
        return this.getMap().mapApi.zoomto(z);
    },
    /**
    *   移除弹出层
    *   @param  id  :元素ID
    */
    removePop: function(id) {
        return this.getMap().mapApi.removePop(id);
    },
    /**
    *   移除所有弹出层
    */
    removeAllPop: function() {
        return this.getMap().mapApi.removeAllPop();
    },
    /**
    *   创建商铺标签 lbk
    *   2010-12-29
    */
    createShopFlag: function(shopsStr) {
        return this.getMap().mapApi.createShopFlag(shopsStr);
    },
    /**
    *   以下为柳寒风添加
    *   开始于2008-05-27
    */
    /**
    *   载入路网
    */
    showRoadWeb: function() {
        this.getMap().mapApi.isLoadRoadWeb = true;
        return this.getMap().mapApi.showRoadWeb();
    },
    /**
    *   移除路网
    */
    hiddenRoadWeb: function() {
        this.getMap().mapApi.isLoadRoadWeb = false;
        return this.getMap().mapApi.hiddenRoadWeb();
    },
    /**
    *   移除路名的线路
    */
    clearMapLoad: function() {
        return this.getMap().mapApi.clearMapLoad();
    }, getxiaoMsg: function() {
        return this.getMap().mapApi.getxiaoMsg();
    },
    /**
    *   显示弹出页面窗口
    *   注:只可用时使用一个,即在使用当前弹出页面时会把原有的弹出页面清除.
    */
    showPopPage: function(type, id, x, y) {
        //type在api目录下的ApiConst.js中设置
        return this.getMap().mapApi.showPopPage(type, id, x, y);
    },
    /**
    *   设置弹出页面窗口
    */
    setPopPage: function(w, h) {
        //type在api目录下的ApiConst.js中设置
        return this.getMap().mapApi.setPopPage(w, h);
    },
    /**
    *   移除弹出页面(基于方法:showPopPage的弹出页面)
    */
    removePopPage: function() {
        //type在api目录下的ApiConst.js中设置
        return this.getMap().mapApi.removePopPage();
    },
    /**
    *   显示楼房弹出窗
    */
    showBuilding: function(id, x, y, cityid) {
        this.showPopPage('build', id, x, y, cityid);
    },
    /**
    *   显示商铺弹出窗
    */
    showShop: function(id, x, y, cityid) {

        this.showPopPage('shoppage', id, x, y, cityid);
    },
    /**
    *   显示新闻弹出窗
    */
    showNews: function(id, x, y, cityid) {
        this.showPopPage('popnewspage', id, x, y, cityid);
    },
    /**
    *   显示房产信息弹出窗-lbk
    */
    showHouse: function(id, x, y, cityid) {
        this.showPopPage('pophousepage', id, x, y, cityid);
    },
    /**
    *   显示产品弹出窗(产品没有坐标,直接定位到商铺)
    */
    showProduct: function(id, x, y, cityid) {
        alert('请修改页面地址');
        return;
        this.showPopPage('productpage', id, x, y, cityid);
    },
    /**
    *   添加便签弹出窗
    */
    addnote: function(x, y, cityid) {
        this.showPopPage('addnote', x, y, cityid);
    },
    /**
    *   显示便签弹出窗
    */
    showNote: function(id, x, y, cityid) {
        this.showPopPage('shownote', id, x, y, cityid);
    },
    /**
    *   显示地图快照弹出窗
    */
    showSnapshot: function(id, x, y, cityid) {
        this.showPopPage('showSnapshot', id, x, y, cityid);
    },

    /**
    *   显示添加地图纠错弹出窗
    */
    adderr: function(id, x, y, cityid) {
        this.showPopPage('adderr', id, x, y, cityid);
    },

    /**
    *   显示公交站信息弹出窗
    */
    showBuspark: function(id, x, y, cityid) {
        this.showPopPage('busparkpage', id, x, y, cityid);
    },

    /**
    *   显示企业入住信息弹出窗
    */
    showShopbusiness: function(id, x, y, cityid) {
        this.showPopPage('shopbusinesspage', id, x, y, cityid);
    },
    /**
    *   定位 显示商铺名字 卍 20110330 
    */
    createWelcomePop: function(x, y, title) {
        this.go2xy(x,y);
        this.getMap().mapApi.newcreateWelcomePop(title);
    },
    /**
    *	new google地图
    *   wormhole 2011.01.28
    */
    newgooglemap: function() {

    },
    /**
    *	new 内部创建地图
    *   wormhole 
    */
    innercreatMap: function() {
        this.map = null;
        this.map = eval(this.mapName);
        //输出地图对象
        with (this.map) {
            document.open();
            document.charset = this.defValue.code;
            document.write('<html xmlns:v="urn:schemas-microsoft-com:vml">');
            document.write('<head>');
            document.write('<style>v\\:*{behavior:url(#default#VML);}</style>');
            //document.write('<link href="http://www.vr-c.com/inc/css.css" rel="stylesheet" type="text/css">');
            document.write('</head>');
            document.write('<body style="margin-left:0px;margin-right:0px;margin-top:0px;margin-bottom:0px;background-image:url(\'' + this.defValue.mapRootPath + '/images/nopic.jpg\');">');
            document.write('</body>');
            document.write('</html>');
            document.close();

            var jselm = document.createElement('script');
            jselm.language = 'javascript';
            jselm.id = 'mapconstjs';
            jselm.charset = 'utf-8';
            jselm.src = this.defValue.apiPath + 'ApiConst.js';
            document.body.appendChild(jselm);

            //添加弹出窗口事件的JavaScript到页面
            var jselm = document.createElement('script');
            jselm.language = 'javascript';
            jselm.id = 'poppageplusjs';
            jselm.charset = 'utf-8';
            jselm.src = this.defValue.apiPath + 'plus/PopPagePlus.js';
            document.body.appendChild(jselm);

            //添加弹出窗口事件的JavaScript到页面
            var jselm = document.createElement('script');
            jselm.language = 'javascript';
            jselm.id = 'errorplusjs';
            jselm.charset = 'utf-8';
            jselm.src = this.defValue.apiPath + 'plus/ErrorPlus.js';
            document.body.appendChild(jselm);



            //添加API的JavaScript到页面
            var jselm = document.createElement('script');
            jselm.language = 'javascript';
            jselm.id = 'mapjs';
            jselm.charset = 'utf-8';
            jselm.src = this.defValue.apiPath + this.defValue.apiSrc;
            document.body.appendChild(jselm);

            //添加API的样式到页面
            var style = document.createElement('link');
            style.href = this.defValue.mapRootPath + '/css/css.css';
            style.rel = 'stylesheet';
            style.type = 'text/css';
            style.id = 'css1';
            document.getElementsByTagName('head')[0].appendChild(style);

            //添加语言样式到页面
            style = document.createElement('link');
            style.href = this.defValue.mapRootPath + '/css/css_zh_cn.css';
            style.rel = 'stylesheet';
            style.type = 'text/css';
            style.id = 'css2';
            document.getElementsByTagName('head')[0].appendChild(style);
            //setTimeout("", 500);
        }
    },
    /**
    *	mapApi 二次刷新
    *   wormhole 
    */
    twicereflesh: function() {
        this.testtime++;
        if (this.testtime > 5) {
            //alert('mapApi创建失败'); 
            return;
        }
        var THIS = this;
        var innercreatmap = function() {
            this.twicereflesh();
        }

        if (typeof (this.map) == 'object') {
            try {
                if (typeof (this.map.mapApi) == 'object') {
                    return;
                }
                else { setTimeout(function() { innercreatmap.call(THIS) }, 300); } //alert("二次刷新");
            }
            catch (e) {
                setTimeout(function() { innercreatmap.call(THIS) }, 300);      //alert("二次刷新");
            }
        }


    }

}
var popomap = new mapDocClass();

  


