[OpenLayers-Users] OpenLayers, MapServer Map files and AGG

Arnd Wippermann arnd.wippermann at web.de
Mon Aug 4 16:56:51 EDT 2008


perhaps it's the default map_imagetype in OL for the MapServer request.
 
    DEFAULT_PARAMS: {
        mode: "map",
        map_imagetype: "png"
    },

Arnd

 
  _____  

Von: users-bounces at openlayers.org [mailto:users-bounces at openlayers.org] Im
Auftrag von Bill Thoen
Gesendet: Montag, 4. August 2008 22:02
An: users at openlayers.org
Betreff: [OpenLayers-Users] OpenLayers, MapServer Map files and AGG


I'm just getting started with OpenLayers so I have a lot of questions, but
I'll try to pace myself.

Anyway I've been using MapServer and I've compiled it with AGG support so I
can get nice anti-aliased maps, but when I feed a .map file to OpenLayers
that includes the AGG driver in the OUTPUTFORMAT section, I don't seem to
get anti-aliasing.

I'm referencing the map file like so:
  var layer = new OpenLayers.Layer.MapServer( "World", 
    "http://sandbox/cgi-bin/mapserv" <http://sandbox/cgi-bin/mapserv> ,
{layers: 'states world', 
    map: '/var/www/html/blt/usa/usa.map'}, {singleTile: true} );

Everything seems to work, except that I get the old jaggy lines that the GD
driver used to produce. (Also, I'm using Linux FC9, MapServer 5.0.3 and
OpenLayers 2.5).

Am I doing something wrong, or is AGG not supported in OL?

My .map file looks like:


MAP

  SIZE  600  500

  EXTENT  -2210000  -2640000  2590000  1360000

  IMAGECOLOR  180  180  250

  TEMPLATEPATTERN  "printable\.html|loader\.html"

  UNITS  METERS



  SHAPEPATH  /var/www/maps/data/

  PROJECTION

    "init=epsg:2163"    #  Lambert  Azimuthal  (Equal  Area)

  END



  SCALEBAR

    STATUS  EMBED

    UNITS  MILES

    INTERVALS  3

    TRANSPARENT  TRUE

    OUTLINECOLOR  0  0  0  

  END



  LEGEND

    STATUS  ON

  END



  WEB

    TEMPLATE  "/var/www/html/blt/usa/usa.html"

    IMAGEPATH  "/var/www/html/tmp/"

    IMAGEURL  "/tmp/"

  END



  OUTPUTFORMAT

    NAME  'AGG'

    DRIVER  "AGG/PNG"

    MIMETYPE  "image/png"

    IMAGEMODE  RGB

    EXTENSION  "png"

  END



  LAYER

    NAME  world

    TYPE  POLYGON

    STATUS  ON

    DATA  countries_simpl

    CLASSITEM  'name'

    CLASS

      NAME  'USA'

      EXPRESSION  'United  States'

      OUTLINECOLOR  100  100  100

      COLOR  255  255  240

    END

    CLASS

      NAME  'Countries'

      EXPRESSION  ("[name]"  ne  "United  States")

      OUTLINECOLOR  100  100  100

      COLOR  200  200  200

    END

    PROJECTION

      "+proj=latlong  +datum=WGS84"

    END

  END



  LAYER

    NAME  states

    TYPE  POLYGON

    STATUS  ON

    INCLUDE  '/var/www/maps/data/states.map'

    CLASS

      NAME  "US  States"

      OUTLINECOLOR  0  0  0

      COLOR  255  255  196

    END

    MINSCALE  10000000

  END



  LAYER

    NAME  counties

    TYPE  LINE

    STATUS  ON

    INCLUDE  '/var/www/maps/data/counties.map'

    CLASS

      STYLE

        OUTLINECOLOR  192  0  128

        WIDTH  1

      END

    END

    MAXSCALE  2500000

  END



  LAYER

    NAME  counties

    TYPE  POLYGON

    STATUS  OFF

    INCLUDE  '/var/www/maps/data/counties.map'

    INCLUDE  '/var/www/maps/styles/counties.map'

    LABELMAXSCALE  2500000

  END



  LAYER

    NAME  states

    TYPE  LINE

    STATUS  ON

    INCLUDE  '/var/www/maps/data/states.map'

    CLASS

      NAME  "US  States"

      STYLE

        OUTLINECOLOR  0  0  128

        WIDTH  1

      END

    END

    MAXSCALE  10000000

  END

END

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20080804/bcd76026/attachment.html


More information about the Users mailing list