[OpenLayers-Users] OpenLayers, MapServer Map files and AGG
Bill Thoen
bthoen at gisnet.com
Mon Aug 4 16:01:40 EDT 2008
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", {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/1201230d/attachment.html
More information about the Users
mailing list