[Mapserver-users] trying to start - mapserver and php Mapscript

leonardovilela at cdlbh.com.br leonardovilela at cdlbh.com.br
Thu Jul 22 12:32:09 EDT 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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>&nbsp;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>&nbsp;</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>&nbsp;</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>&nbsp;,=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>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I=B4m sending a copy that a file to =
yours, and i=20
expect that someone&nbsp;can help me.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Thank=B4s a lot:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>MAP FILE</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>MAP<BR>&nbsp;&nbsp;&nbsp; NAME=20
quadras<BR>&nbsp;&nbsp;&nbsp; STATUS ON<BR>&nbsp;&nbsp;&nbsp; SIZE 800=20
500<BR>&nbsp;&nbsp;&nbsp; IMAGETYPE PNG<BR>&nbsp;&nbsp;&nbsp; IMAGECOLOR =
240 240=20
240<BR>&nbsp;&nbsp;&nbsp; SHAPEPATH "/mapserver/"<BR>&nbsp;&nbsp;&nbsp; =
EXTENT=20
-8000000 300000 5000000 1500000<BR>&nbsp;&nbsp;&nbsp; UNITS=20
METERS<BR>&nbsp;&nbsp;&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp;=20
"proj=3Dutm"<BR>&nbsp;&nbsp;&nbsp; "zone=3D23"<BR>&nbsp;&nbsp;&nbsp;=20
"south"<BR>&nbsp;&nbsp;&nbsp; "ellps=3DGRS67"<BR>&nbsp;&nbsp;&nbsp;=20
"towgs84=3D-57,1,-41,0,0,0,0"<BR>&nbsp;&nbsp;&nbsp;=20
"units=3Dm"<BR>&nbsp;&nbsp;&nbsp; "no_defs" <BR>&nbsp;&nbsp;&nbsp;=20
END<BR>&nbsp;&nbsp;&nbsp; WEB<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; =
IMAGEPATH=20
"c:/temp/"<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; IMAGEURL=20
"c:/temp/"<BR>&nbsp;&nbsp;&nbsp;=20
END<BR>&nbsp;<BR>&nbsp;LAYER<BR>&nbsp;&nbsp;NAME =
"quadras"<BR>&nbsp;&nbsp;TYPE=20
POLYGON<BR>&nbsp;&nbsp;STATUS ON<BR>&nbsp;&nbsp;DATA=20
"quadras"<BR>&nbsp;&nbsp;PROJECTION<BR>&nbsp;&nbsp;"proj=3Dutm"<BR>&nbsp;=
&nbsp;"zone=3D23"<BR>&nbsp;&nbsp;"south"<BR>&nbsp;&nbsp;"ellps=3DGRS67"<B=
R>&nbsp;&nbsp;"towgs84=3D-57,1,-41,0,0,0,0"<BR>&nbsp;&nbsp;"units=3Dm"<BR=
>&nbsp;&nbsp;"no_defs"=20
<BR>&nbsp;&nbsp;END<BR>&nbsp;&nbsp;CLASS<BR>&nbsp;&nbsp;&nbsp;NAME=20
"quadras"<BR>&nbsp;&nbsp;&nbsp;OUTLINECOLOR 60 60 =
60<BR>&nbsp;&nbsp;&nbsp;COLOR=20
255 255 0<BR>&nbsp;&nbsp;&nbsp;SYMBOL=20
0<BR>&nbsp;&nbsp;END<BR>&nbsp;END<BR>&nbsp;<BR>&nbsp;LAYER<BR>&nbsp;&nbsp=
;NAME=20
"credits"<BR>&nbsp;&nbsp;STATUS DEFAULT<BR>&nbsp;&nbsp;TRANSFORM=20
FALSE<BR>&nbsp;&nbsp;TYPE=20
ANNOTATION<BR>&nbsp;&nbsp;FEATURE<BR>&nbsp;&nbsp;&nbsp;POINTS<BR>&nbsp;&n=
bsp;&nbsp;&nbsp;10=20
480<BR>&nbsp;&nbsp;&nbsp;END<BR>&nbsp;&nbsp;&nbsp;TEXT 'Made with=20
Mapserver.'<BR>&nbsp;&nbsp;END<BR>&nbsp;&nbsp;CLASS<BR>&nbsp;&nbsp;&nbsp;=
LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;TYPE=20
BITMAP<BR>&nbsp;&nbsp;&nbsp;&nbsp;POSITION =
CR<BR>&nbsp;&nbsp;&nbsp;&nbsp;COLOR 0=20
0=20
0<BR>&nbsp;&nbsp;&nbsp;END<BR>&nbsp;&nbsp;END<BR>&nbsp;END<BR>&nbsp;<BR>&=
nbsp;<BR>END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>PHP FILE</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2>&lt;?php<BR>$map_file=3D"quadras.map";<BR>$map =3D=20
ms_newMapObj($map_file);<BR>$image=3D$map-&gt;draw();<BR>$image_url=3D$im=
age-&gt;saveWebImage();<BR>?&gt;<BR>&nbsp;&lt;HTML&gt;<BR>&nbsp;&lt;HEAD&=
gt;<BR>&nbsp;&lt;TITLE&gt;Quadras&lt;/TITLE&gt;<BR>&nbsp;&lt;/HEAD&gt;<BR=
>&nbsp;&lt;BODY&gt;<BR>&lt;img=20
SRC=3D"&lt;?php echo=20
$image_url?&gt;"&gt;<BR>/a&gt;&lt;/h2&gt;<BR>&nbsp;&lt;/BODY&gt;<BR>&lt;/=
html&gt;</FONT></DIV></BODY></HTML>

------=_NextPart_000_0012_01C46FF0.49FA2160--




More information about the mapserver-users mailing list