让TileCache支持AGG-反锯齿

让TileCache支持AGG-反锯齿
(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   
|----------------------------------------------------------------------------------------|

你可能感兴趣的:(让TileCache支持AGG-反锯齿)