[Mapserver-users] trying to start - mapserver and php Mapscript
leonardovilela at cdlbh.com.br
leonardovilela at cdlbh.com.br
Thu Jul 22 09:32:09 PDT 2004
This is a multi-part message in MIME format.
------=_NextPart_000_0012_01C46FF0.49FA2160
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hello, I=B4m Leonardo Vilela, from Brazil and need too help.
I=B4m trying to disponibilize a map that I have in shapefile in web =
with mapserver.
I=B4m studying the mapserver's features and reading the documentation, =
but it=B4s being very dificcult and i think that i need help.
There are some questions that I need to understand, and I expect that =
someone can help me:
1 - I=B4ve downoloaded a dll file called php_mapscript_42.dll and put it =
in php's extension dir, the demos of mapserver worked correct, but =
others examples that i study uses a archive called php_mapscript.so, =
what is php_mapscript.so? I need this to run In a apache/php server on =
windows?
2 - I have a shapefile that contains all squares of a town, I want try =
to view it with mapserver.
I do a .map file with the projections of the place that i found in =
http://mapserver.gis.umn.edu/doc40/proj.html , and create a simple file =
in php to generate a image.
The image was blank. There wasn=B4t error messages, but there wasn't any =
polygons...
I=B4m sending a copy that a file to yours, and i expect that someone can =
help me.
Thank=B4s a lot:
MAP FILE
MAP
NAME quadras
STATUS ON
SIZE 800 500
IMAGETYPE PNG
IMAGECOLOR 240 240 240
SHAPEPATH "/mapserver/"
EXTENT -8000000 300000 5000000 1500000
UNITS METERS
PROJECTION
"proj=3Dutm"
"zone=3D23"
"south"
"ellps=3DGRS67"
"towgs84=3D-57,1,-41,0,0,0,0"
"units=3Dm"
"no_defs"=20
END
WEB
IMAGEPATH "c:/temp/"
IMAGEURL "c:/temp/"
END
=20
LAYER
NAME "quadras"
TYPE POLYGON
STATUS ON
DATA "quadras"
PROJECTION
"proj=3Dutm"
"zone=3D23"
"south"
"ellps=3DGRS67"
"towgs84=3D-57,1,-41,0,0,0,0"
"units=3Dm"
"no_defs"=20
END
CLASS
NAME "quadras"
OUTLINECOLOR 60 60 60
COLOR 255 255 0
SYMBOL 0
END
END
=20
LAYER
NAME "credits"
STATUS DEFAULT
TRANSFORM FALSE
TYPE ANNOTATION
FEATURE
POINTS
10 480
END
TEXT 'Made with Mapserver.'
END
CLASS
LABEL
TYPE BITMAP
POSITION CR
COLOR 0 0 0
END
END
END
=20
=20
END
PHP FILE
<?php
$map_file=3D"quadras.map";
$map =3D ms_newMapObj($map_file);
$image=3D$map->draw();
$image_url=3D$image->saveWebImage();
?>
<HTML>
<HEAD>
<TITLE>Quadras</TITLE>
</HEAD>
<BODY>
<img SRC=3D"<?php echo $image_url?>">
/a></h2>
</BODY>
</html>
------=_NextPart_000_0012_01C46FF0.49FA2160
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2800.1400" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello, I=B4m Leonardo Vilela, from =
Brazil and need=20
too help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> I=B4m trying to disponibilize a =
map that I have=20
in shapefile in web with mapserver.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I=B4m studying the mapserver's features =
and reading=20
the documentation, but it=B4s being very dificcult and i think that i =
need=20
help.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>There are some questions that I need to =
understand,=20
and I expect that someone can help me:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>1 - I=B4ve downoloaded a dll file =
called=20
php_mapscript_42.dll and put it in php's extension dir, the demos of =
mapserver=20
worked correct, but others examples that i study uses a archive called=20
php_mapscript.so, what is php_mapscript.so? I need this to run In a =
apache/php=20
server on windows?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>2 - I have a shapefile that contains =
all squares of=20
a town, I want try to view it with mapserver.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I do a .map file with the projections =
of the place=20
that i found in <A=20
href=3D"http://mapserver.gis.umn.edu/doc40/proj.html">http://mapserver.gi=
s.umn.edu/doc40/proj.html</A> ,=20
and create a simple file in php to generate a image.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>The image was blank. There wasn=B4t =
error messages,=20
but there wasn't any polygons...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I=B4m sending a copy that a file to =
yours, and i=20
expect that someone can help me.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thank=B4s a lot:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>MAP FILE</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>MAP<BR> NAME=20
quadras<BR> STATUS ON<BR> SIZE 800=20
500<BR> IMAGETYPE PNG<BR> IMAGECOLOR =
240 240=20
240<BR> SHAPEPATH "/mapserver/"<BR> =
EXTENT=20
-8000000 300000 5000000 1500000<BR> UNITS=20
METERS<BR> PROJECTION<BR> =20
"proj=3Dutm"<BR> "zone=3D23"<BR> =20
"south"<BR> "ellps=3DGRS67"<BR> =20
"towgs84=3D-57,1,-41,0,0,0,0"<BR> =20
"units=3Dm"<BR> "no_defs" <BR> =20
END<BR> WEB<BR> =
IMAGEPATH=20
"c:/temp/"<BR> IMAGEURL=20
"c:/temp/"<BR> =20
END<BR> <BR> LAYER<BR> NAME =
"quadras"<BR> TYPE=20
POLYGON<BR> STATUS ON<BR> DATA=20
"quadras"<BR> PROJECTION<BR> "proj=3Dutm"<BR> =
"zone=3D23"<BR> "south"<BR> "ellps=3DGRS67"<B=
R> "towgs84=3D-57,1,-41,0,0,0,0"<BR> "units=3Dm"<BR=
> "no_defs"=20
<BR> END<BR> CLASS<BR> NAME=20
"quadras"<BR> OUTLINECOLOR 60 60 =
60<BR> COLOR=20
255 255 0<BR> SYMBOL=20
0<BR> END<BR> END<BR> <BR> LAYER<BR>  =
;NAME=20
"credits"<BR> STATUS DEFAULT<BR> TRANSFORM=20
FALSE<BR> TYPE=20
ANNOTATION<BR> FEATURE<BR> POINTS<BR> &n=
bsp; 10=20
480<BR> END<BR> TEXT 'Made with=20
Mapserver.'<BR> END<BR> CLASS<BR> =
LABEL<BR> TYPE=20
BITMAP<BR> POSITION =
CR<BR> COLOR 0=20
0=20
0<BR> END<BR> END<BR> END<BR> <BR>&=
nbsp;<BR>END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>PHP FILE</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2><?php<BR>$map_file=3D"quadras.map";<BR>$map =3D=20
ms_newMapObj($map_file);<BR>$image=3D$map->draw();<BR>$image_url=3D$im=
age->saveWebImage();<BR>?><BR> <HTML><BR> <HEAD&=
gt;<BR> <TITLE>Quadras</TITLE><BR> </HEAD><BR=
> <BODY><BR><img=20
SRC=3D"<?php echo=20
$image_url?>"><BR>/a></h2><BR> </BODY><BR></=
html></FONT></DIV></BODY></HTML>
------=_NextPart_000_0012_01C46FF0.49FA2160--
More information about the MapServer-users
mailing list