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 '12-MAR-08'.
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'. 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 "Europe in purple"<br>SIZE 400 400<br>STATUS ON<br>#SYMBOLSET "/var/www/html/maps/symbols/symbols.sym"<br>EXTENT 54.288403988 10.519452095 54.361188412 10.601441860<br>
UNITS METERS<br>#SHAPEPATH "data"<br> <br>WEB<br> IMAGEPATH "f:/ms4w/Apache/htdocs/vd/gpx/"<br> IMAGEURL "/vd/gpx/"<br>END<br><br>LAYER<br> NAME "test"<br> TYPE LINE<br>
CONNECTIONTYPE OGR<br> CONNECTION "test.gpx"<br> STATUS ON <br> DATA "0"<br> #MAXSCALE 8000000<br> CLASS<br> STYLE<br> COLOR 110 50 100<br> #OUTLINECOLOR 200 200 200<br>
#SYMBOL 0<br> END<br> END<br>END<br><br>END<br>------------------------------<br><br>And my php code:<br>------------------------------<br><?php<br><br>dl('php_mapscript.dll'); <br>dl('php_ogr.dll'); <br>
//phpinfo(); <br>$map_path="F:\ms4w\Apache\htdocs\vd\gpx\\";<br> <br>$map = ms_newMapObj($map_path."gpx.map");<br>$image=$map->draw();<br>$image_url=$image->saveWebImage();<br><br>?><br>
<br><HTML><br><HEAD><br><TITLE>Example 1: Displaying a map</TITLE><br></HEAD><br><BODY><br><IMG SRC=<?php echo $image_url; ?> ><br></BODY><br></HTML><br>-------------------------------------<br>