[Mapserver-users] Blank image got from .TAB and .shp

=?gb2312?q?guoloi=20dou?= douguoli at yahoo.com.cn
Tue Jun 29 14:29:19 EDT 2004


--0-1319119562-1088533759=:41715
Content-Type: text/plain; charset=gb2312
Content-Transfer-Encoding: 8bit


Hi. 
I got a blank image when trying to viewing the MapInfo .Tab and .shp data using PHP/MapScript which are translated from OS MasterMap GML2 using FME Suite. 
What kind of problem can it be? Dose projection matter?
Lots of thanks.

Zhengda Lu
The code is below:
MAP
  IMAGETYPE GIF
  SHAPEPATH "data"
  EXTENT 350137.99 168102.4 356541.55 174643.09
  SIZE 400 300
  IMAGECOLOR 255 255 255
  PROJECTION
    "init=epsg:6277"
  END
  WEB
    IMAGEPATH "/Proj/img/"
    IMAGEURL "/img/"
  END
  # Start of LAYER DEFINITIONS ---------------------------------------------
  LAYER # States polygon layer begins here
    NAME states
    #CONNECTIONTYPE OGR
    #CONNECTION "c:/Proj/data/BoundaryLine.tab"
    DATA BoundaryLine_line
    STATUS DEFAULT
    TYPE LINE
    PROJECTION
      "init=epsg:6277"
    END
    CLASS
      COLOR 232 232 232
      OUTLINECOLOR 32 32 32
    END
  END # States polygon layer ends here
  # End of LAYER DEFINITIONS -------------------------------
END # end of map file/object

PHP/Mapscript
<?php
dl("php_mapscript.dll");

$map_file="./test.map";
$map = ms_newMapObj($map_file);
$image=$map->draw();
$image_url=$image->saveWebImage();

?>
 <HTML>
 <BODY>
 TEST
<img SRC="<?php echo $image_url?>">
</BODY>
</html>

 




---------------------------------
Do You Yahoo!?
100Õ×ÓÊÏä¹»²»¹»Óã¿ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡
--0-1319119562-1088533759=:41715
Content-Type: text/html; charset=gb2312
Content-Transfer-Encoding: 8bit

<P>Hi. <BR>I got a blank image when trying to viewing the MapInfo .Tab and .shp data using PHP/MapScript which are translated from OS MasterMap GML2 using FME Suite. <BR>What kind of problem can it be? Dose projection matter?<BR>Lots of thanks.</P>
<P>Zhengda Lu<BR>The code is below:<BR>MAP<BR>&nbsp; IMAGETYPE GIF<BR>&nbsp; SHAPEPATH "data"<BR>&nbsp; EXTENT 350137.99 168102.4 356541.55 174643.09<BR>&nbsp; SIZE 400 300<BR>&nbsp; IMAGECOLOR 255 255 255<BR>&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp; "init=epsg:6277"<BR>&nbsp; END<BR>&nbsp; WEB<BR>&nbsp;&nbsp;&nbsp; IMAGEPATH "/Proj/img/"<BR>&nbsp;&nbsp;&nbsp; IMAGEURL "/img/"<BR>&nbsp; END<BR>&nbsp; # Start of LAYER DEFINITIONS ---------------------------------------------<BR>&nbsp; LAYER # States polygon layer begins here<BR>&nbsp;&nbsp;&nbsp; NAME states<BR>&nbsp;&nbsp;&nbsp; #CONNECTIONTYPE OGR<BR>&nbsp;&nbsp;&nbsp; #CONNECTION "c:/Proj/data/BoundaryLine.tab"<BR>&nbsp;&nbsp;&nbsp; DATA BoundaryLine_line<BR>&nbsp;&nbsp;&nbsp; STATUS DEFAULT<BR>&nbsp;&nbsp;&nbsp; TYPE LINE<BR>&nbsp;&nbsp;&nbsp; PROJECTION<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; "init=epsg:6277"<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp;&nbsp;&nbsp; CLASS<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 232 232
 232<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 32 32 32<BR>&nbsp;&nbsp;&nbsp; END<BR>&nbsp; END # States polygon layer ends here<BR>&nbsp; # End of LAYER DEFINITIONS -------------------------------<BR>END # end of map file/object</P>
<P>PHP/Mapscript<BR>&lt;?php<BR>dl("php_mapscript.dll");</P>
<P>$map_file="./test.map";<BR>$map = ms_newMapObj($map_file);<BR>$image=$map-&gt;draw();<BR>$image_url=$image-&gt;saveWebImage();</P>
<P>?&gt;<BR>&nbsp;&lt;HTML&gt;<BR>&nbsp;&lt;BODY&gt;<BR>&nbsp;TEST<BR>&lt;img SRC="&lt;?php echo $image_url?&gt;"&gt;<BR>&lt;/BODY&gt;<BR>&lt;/html&gt;</P>
<P>&nbsp;</P>
<DIV></DIV><p><br><hr size=1><b>Do You Yahoo!?</b><br>
<a href="http://cn.rd.yahoo.com/mail_cn/tag/100m/*http://cn.promo.yahoo.com/minisite/100m/" target=blank>100Õ×ÓÊÏä¹»²»¹»Óã¿ÑÅ»¢µçÓÊ×ÔÖúÀ©ÈÝ£¡</a>
--0-1319119562-1088533759=:41715--



More information about the mapserver-users mailing list