AjaxScript地图打印[转]

 

function SaveMap() {

    var param = new Object();

    param = map.GetMapParam();

    var pixelRect = map.GetSize();

    param.SetPixelRect(pixelRect);

    map.GetMapImage(param, onSaveMapComplete, onSaveMapError);

}

 

function onSaveMapComplete(url) {

    if (url != null && url.length > 0) {

        window.open(url, '地图保存', 'menubar=yes,titlebar=yes,toolbar=no,scrollbars=no,location=no,status=no');

    }

}

 

function onSaveMapError(responseText) {

    alert(responseText);

}

 

posted @ 2011-01-29 23:58  因是因非  阅读(184)  评论(0编辑  收藏  举报