[OpenLayers-Users] Re: Mapserver untiled problem
Saka Royban
sakaroyban at yahoo.com
Mon May 23 04:24:02 EDT 2011
Am i posting in wrong section? Should i post in mapserver mailing list
________________________________
From: Saka Royban <sakaroyban at yahoo.com>
To: openlayers-users at lists.osgeo.org
Sent: Thu, May 19, 2011 11:42:48 PM
Subject: Mapserver untiled problem
Hi all.
I'm gonna use a mapserver untiled layer but the result just fills heart of
produced image and near borders it is filled by background color. this is
javascript code:
function init(){
map = new OpenLayers.Map("map");
layer = new OpenLayers.Layer.MapServer( "World Map",
"http://localhost/cgi-bin/mapserv.exe", {map:
'/ms4w/apps/ms101/htdocs/ms101.map'},
{singleTile: true} );
layer.ratio=1;
map.addLayer(layer);
map.zoomToMaxExtent();
}
It sounds the problem is with extent because FireBug shows:
imgext-281.25 -140.625 281.25 140.625
mapext-281.25 -140.625 281.25 140.625
while my mapfile is as follows:
MAP
NAME "MS101"
EXTENT -180 -90 180 90 # Geographic
SIZE 800 400
IMAGECOLOR 128 128 255
SHAPEPATH '../data'
FONTSET '../fonts/fonts.list'
IMAGETYPE png24
PROJECTION
"init=epsg:4326"
END
LEGEND
STATUS on
LABEL
TYPE TRUETYPE
FONT vera_sans
COLOR 0 0 0
SIZE 8
ANTIALIAS TRUE
END
END
LAYER # World polygon classified by continents begins here
NAME continents
DATA 'shapefile/Countries_area'
STATUS default
TYPE POLYGON
PROJECTION
"init=epsg:4326"
END
CLASSITEM 'NA3DESC'
LABELITEM 'NA3DESC'
CLASS
NAME 'Africa'
EXPRESSION 'Africa'
STYLE
COLOR 255 128 128
END
LABEL
COLOR 64 64 64
OUTLINECOLOR 212 212 212
TYPE TRUETYPE
FONT vera_sans-bold-italic
SIZE 12
ANTIALIAS TRUE
POSITION CC
PARTIALS FALSE
MINDISTANCE 250
BUFFER 4
END
END
CLASS
NAME 'Antarctica'
EXPRESSION /Antarctic./ #'Antarctic Area'
STYLE
COLOR 128 255 128
END
LABEL
COLOR 64 64 64
OUTLINECOLOR 212 212 212
TYPE TRUETYPE
FONT vera_sans-bold-italic
SIZE 10
ANTIALIAS TRUE
POSITION CC
PARTIALS FALSE
MINDISTANCE 250
BUFFER 4
END
END
CLASS
NAME 'Asia'
EXPRESSION 'Asia'
STYLE
COLOR 0 0 255
END
LABEL
COLOR 64 64 64
OUTLINECOLOR 212 212 212
TYPE TRUETYPE
FONT vera_sans-bold-italic
SIZE 10
ANTIALIAS TRUE
POSITION auto
PARTIALS FALSE
MINDISTANCE 250
BUFFER 4
END
END
CLASS
NAME 'Oceania'
EXPRESSION /Australia*/ #'Australian Area'
STYLE
COLOR 255 255 128
END
LABEL
COLOR 64 64 64
OUTLINECOLOR 212 212 212
TYPE TRUETYPE
FONT vera_sans-bold-italic
SIZE 10
ANTIALIAS TRUE
POSITION CC
PARTIALS FALSE
MINDISTANCE 250
BUFFER 4
END
END
CLASS
NAME 'Europe'
EXPRESSION 'Europe'
STYLE
COLOR 255 128 255
END
LABEL
COLOR 64 64 64
OUTLINECOLOR 212 212 212
TYPE TRUETYPE
FONT vera_sans-bold-italic
SIZE 10
ANTIALIAS TRUE
POSITION CC
PARTIALS FALSE
MINDISTANCE 250
BUFFER 4
END
END
CLASS
NAME 'North America'
EXPRESSION 'North America'
STYLE
COLOR 128 255 255
END
LABEL
COLOR 64 64 64
OUTLINECOLOR 212 212 212
TYPE TRUETYPE
FONT vera_sans-bold-italic
SIZE 10
ANTIALIAS TRUE
POSITION CC
PARTIALS FALSE
MINDISTANCE 250
BUFFER 4
END
END
CLASS
NAME 'South America'
EXPRESSION 'South America'
STYLE
COLOR 255 192 96
END
LABEL
COLOR 64 64 64
OUTLINECOLOR 212 212 212
TYPE TRUETYPE
FONT vera_sans-bold-italic
SIZE 10
ANTIALIAS TRUE
POSITION CC
PARTIALS FALSE
MINDISTANCE 250
BUFFER 4
END
END
END # World polygon classified by continents ends here
LAYER # World polygon layer begins here
NAME world_poly
GROUP world
DATA 'shapefile/Countries_area.shp'
STATUS ON
TYPE LINE
PROJECTION
"init=epsg:4326"
END
CLASS
NAME 'The World'
STYLE
COLOR 220 220 220
END
END
END # World polygon layer ends here
END
Thanks in advance
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20110523/7952bb3e/attachment.html
More information about the Users
mailing list