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

guoloi dou douguoli at yahoo.com.cn
Tue Jun 29 11:29:19 PDT 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>  IMAGETYPE GIF<BR>  SHAPEPATH "data"<BR>  EXTENT 350137.99 168102.4 356541.55 174643.09<BR>  SIZE 400 300<BR>  IMAGECOLOR 255 255 255<BR>  PROJECTION<BR>    "init=epsg:6277"<BR>  END<BR>  WEB<BR>    IMAGEPATH "/Proj/img/"<BR>    IMAGEURL "/img/"<BR>  END<BR>  # Start of LAYER DEFINITIONS ---------------------------------------------<BR>  LAYER # States polygon layer begins here<BR>    NAME states<BR>    #CONNECTIONTYPE OGR<BR>    #CONNECTION "c:/Proj/data/BoundaryLine.tab"<BR>    DATA BoundaryLine_line<BR>    STATUS DEFAULT<BR>    TYPE LINE<BR>    PROJECTION<BR>      "init=epsg:6277"<BR>    END<BR>    CLASS<BR>      COLOR 232 232
 232<BR>      OUTLINECOLOR 32 32 32<BR>    END<BR>  END # States polygon layer ends here<BR>  # End of LAYER DEFINITIONS -------------------------------<BR>END # end of map file/object</P>
<P>PHP/Mapscript<BR><?php<BR>dl("php_mapscript.dll");</P>
<P>$map_file="./test.map";<BR>$map = ms_newMapObj($map_file);<BR>$image=$map->draw();<BR>$image_url=$image->saveWebImage();</P>
<P>?><BR> <HTML><BR> <BODY><BR> TEST<BR><img SRC="<?php echo $image_url?>"><BR></BODY><BR></html></P>
<P> </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