[MS4W-Users] Bls: Trs: cannot render image

Rangga Negara rkn2003 at yahoo.co.id
Wed Sep 2 09:26:13 EST 2009


i already with shp2img and i got the picture, 
but still in browser just white colour it the image box 




________________________________
Dari: Jeff McKenna <jmckenna at gatewaygeomatics.com>
Kepada: ms4w-users at lists.maptools.org
Terkirim: Rabu, 2 September, 2009 20:29:27
Judul: Re: [MS4W-Users] Trs: cannot render image

Rangga Negara wrote:
> hi, i just not understand why the map cannot render
> this is my mapfile
> 
> name "b"
> SIZE 600 500
> UNITS DD
> IMAGETYPE JPEG
> IMAGECOLOR  255 255 255
> SHAPEPATH "C:/ms4w/home/mapdata/"
> EXTENT -77.119900 38.791513  -76.909396 38.995109
> STATUS ON
> 
> #
> #          Start of web interface definition
> #
> 
> WEB
>     TEMPLATE '/ms4w/apache/htdocs/b.html'
>     IMAGEPATH '/ms4w/tmp/ms_tmp/'
>     IMAGEURL '/ms_tmp/'
> END # WEB Section
> 
> #
> #          Start of Layer definition
> #
> LAYER
>     NAME  county
>     TYPE polygon
>     STATUS ON
>     CONNECTIONTYPE OGR
>     CONNECTION "c:/ms4w/home/mapdata/county.TAB"
>             CLASS
>             NAME "county"
>             STYLE
>                 COLOR 254 222 212
>                 OUTLINECOLOR 0 0 0
>             END
>         END # Class section
> END # LAYER Section
>        
> END # MapFile
> 
> 
> ------and this is my html--------------------------------------------
> <html>
> <head> <title>MapServer First Map</title></head>
> <body>
>    <form method=POST action="/cgi-bin/mapserv.exe?">
>       <input type="submit" value="Click Me">
>       <input type="hidden" name="map" 
> value="C:/ms4w/home/mapdata/b.map&layers=all&mode=map">
>       <input type="hidden" name="map_web"
>              value="imagepath /ms4w/tmp/ms_tmp/">
>    </form>
>    <IMG SRC="[img]" width=600 height=500 border=0>
> </body>
> </html>
> -------------------------------------------------------------------------
> 
> output just white colour on the image box?

Hello,

Here are my thoughts:

- use the ogrinfo commandline utility to get the extents of the TAB file 
(also included in MS4W)
- use the extents from ogrinfo in the EXTENT parameter of your mapfile
- test your mapfile using the shp2img commandline utility 
(http://www.mapserver.org/utilities/shp2img.html), which is included in MS4W

-jeff


-- 
Jeff McKenna
FOSS4G Consulting and Training Services
http://www.gatewaygeomatics.com/






_______________________________________________
MS4W-Users mailing list
MS4W-Users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/ms4w-users



      Selalu bisa chat di profil jaringan, blog, atau situs web pribadi! Yahoo! memungkinkan Anda selalu bisa chat melalui Pingbox. Coba! http://id.messenger.yahoo.com/pingbox/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/ms4w-users/attachments/20090902/4283a048/attachment.htm 


More information about the MS4W-Users mailing list