[Mapserver-users] simple php/mapscript questions

Murat Isik muratisik at megatek.com.tr
Fri Dec 12 09:04:31 EST 2003


This is a multi-part message in MIME format.

------=_NextPart_000_00D1_01C3C0C9.A08D7350
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Hello,

I have two simple questions for those who know php/mapscript:

-actually first question more about map file. when we write SHAPEPATH =
"data" at the beginning of the file, mapserver goes into "data" to find =
all layer data. Is there a way to get the mapserver to retrieve data for =
each layer from different folders or paths?

-I have a layer like this:

LAYER
  NAME lastpoint
  TYPE point
  DATA lastpoint
  STATUS OFF
   CLASS
    SYMBOL 'circle'
    COLOR 102 255 36
    SIZE 20
     LABEL
      COLOR 0 0 0
     END
   END
END

This layer gets to be called within the php and turned ON. What I want =
to do is to use the same settings for different named layers but without =
rewriting this part multiple times. It is like: the php will get the =
layer by name (lastpoint) but for this layer it will retrieve data from =
firstpoint.shp, firstpoint.shx, firstpoint.dbf

Is there a php code that does this?

Have a nice day:)

Murat Isik

------=_NextPart_000_00D1_01C3C0C9.A08D7350
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 content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.3700.6699" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hello,</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I have two simple questions for those =
who know=20
php/mapscript:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-actually first question more about map =
file. when=20
we write SHAPEPATH "data" at the beginning of the file, mapserver goes =
into=20
"data" to find all layer data. Is there a way to get the mapserver to =
retrieve=20
data for each layer from different folders or paths?</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>-I have a layer like this:</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>LAYER<BR>&nbsp; =
NAME&nbsp;lastpoint<BR>&nbsp; TYPE=20
point<BR>&nbsp; DATA&nbsp;lastpoint<BR>&nbsp; STATUS OFF<BR>&nbsp;&nbsp; =

CLASS<BR>&nbsp;&nbsp;&nbsp; SYMBOL 'circle'<BR>&nbsp;&nbsp;&nbsp; COLOR =
102 255=20
36<BR>&nbsp;&nbsp;&nbsp; SIZE 20<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
LABEL<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 0 0 =
0<BR>&nbsp;&nbsp;&nbsp;&nbsp;=20
END<BR>&nbsp;&nbsp; END<BR>END<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>This layer gets to be called within the =
php and=20
turned ON. What I want to do is to use the same settings for different =
named=20
layers but without rewriting this part multiple times. It is like: the =
php will=20
get the layer by name (lastpoint) but for this layer it will retrieve =
data from=20
firstpoint.shp, firstpoint.shx, firstpoint.dbf</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Is there a php code that does =
this?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Have a nice day:)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Murat Isik</DIV></FONT></BODY></HTML>

------=_NextPart_000_00D1_01C3C0C9.A08D7350--




More information about the mapserver-users mailing list