zhyiwww
用平实的笔,记录编程路上的点点滴滴………
posts - 536,comments - 394,trackbacks - 0
(1)主要在mapscript(beijing.map)文件里面添加如下配置:
        OUTPUTFORMAT
                NAME AGG
                DRIVER AGG/PNG
                IMAGEMODE RGB
                MIMETYPE IMAGE/PNG             
                EXTENSION PNG
                FORMATOPTION TRANSPARENT=ON    
                FORMATOPTION INTERLANCE=OFF    
        END

(2) 在OpenLayer里面使用AGG
           var serverURL = "/cgi-bin/tilecache.cgi";

            var layer_obj = new OpenLayers.Layer.WMS(
                "beijing",
                serverURL,
                {  
                    layers: 'beijing',
                    map: '/wwwroot/shp/bj.map',
                    format: 'AGG'
                },
                {
                    reproject: false,
                    numZoomLevels: 20
                }
            );

效果,请参看上篇文章

|----------------------------------------------------------------------------------------|
                           版权声明  版权所有 @zhyiwww
            引用请注明来源 http://www.blogjava.net/zhyiwww   
|----------------------------------------------------------------------------------------|
posted on 2009-08-18 17:22 zhyiwww 阅读(551) 评论(0)  编辑  收藏 所属分类: linuxgis

只有注册用户登录后才能发表评论。


网站导航: