Hi,<br>I want to make a .gpx file viewer with PHP/Mapscript and OGR extension, but I got errors. Can you give me advices? Do ORG extension of PHP support .gpx file? Is my map file correct? Thank you very much!<br><br>Here is the errors:<br>
-------------------------------------<br><b>Warning</b>:  [MapServer Error]: msDrawMap(): Failed to draw layer named &#39;12-MAR-08&#39;.
 in <b>F:\ms4w\Apache\htdocs\vd\gpx\gpx.php</b> on line <b>9</b><br>
<br>
<b>Warning</b>:  [MapServer Error]: msOGRFileOpen(): Open failed for OGR connection `test.gpx&#39;.  File not found or unsupported format.
 in <b>F:\ms4w\Apache\htdocs\vd\gpx\gpx.php</b> on line <b>9</b><br>
<br>
<b>Fatal error</b>:  Call to a member function saveWebImage() on a non-object in <b>F:\ms4w\Apache\htdocs\vd\gpx\gpx.php</b> on line <b>10<br>------------------------------------------<br><br></b>Here is my map file:<br>
-----------------------------------------------<br>NAME &quot;Europe in purple&quot;<br>SIZE 400 400<br>STATUS ON<br>#SYMBOLSET &quot;/var/www/html/maps/symbols/symbols.sym&quot;<br>EXTENT 54.288403988 10.519452095 54.361188412 10.601441860<br>
UNITS METERS<br>#SHAPEPATH &quot;data&quot;<br>&nbsp;&nbsp;&nbsp; <br>WEB<br>&nbsp;&nbsp;&nbsp; IMAGEPATH &quot;f:/ms4w/Apache/htdocs/vd/gpx/&quot;<br>&nbsp;&nbsp;&nbsp; IMAGEURL &quot;/vd/gpx/&quot;<br>END<br><br>LAYER<br>&nbsp;&nbsp;&nbsp; NAME &quot;test&quot;<br>&nbsp;&nbsp;&nbsp; TYPE LINE<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; CONNECTIONTYPE OGR<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; CONNECTION &quot;test.gpx&quot;<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; STATUS ON&nbsp;&nbsp;&nbsp; <br>&nbsp;&nbsp;&nbsp; DATA &quot;0&quot;<br>&nbsp;&nbsp;&nbsp; #MAXSCALE 8000000<br>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; STYLE<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 110 50 100<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #OUTLINECOLOR 200 200 200<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; #SYMBOL 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>END<br><br>END<br>------------------------------<br><br>And my php code:<br>------------------------------<br>&lt;?php<br><br>dl(&#39;php_mapscript.dll&#39;); <br>dl(&#39;php_ogr.dll&#39;); <br>
//phpinfo(); <br>$map_path=&quot;F:\ms4w\Apache\htdocs\vd\gpx\\&quot;;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br>$map = ms_newMapObj($map_path.&quot;gpx.map&quot;);<br>$image=$map-&gt;draw();<br>$image_url=$image-&gt;saveWebImage();<br><br>?&gt;<br>
<br>&lt;HTML&gt;<br>&lt;HEAD&gt;<br>&lt;TITLE&gt;Example 1: Displaying a map&lt;/TITLE&gt;<br>&lt;/HEAD&gt;<br>&lt;BODY&gt;<br>&lt;IMG SRC=&lt;?php echo $image_url; ?&gt; &gt;<br>&lt;/BODY&gt;<br>&lt;/HTML&gt;<br>-------------------------------------<br>