[Mapserver-users] blank image--white empty image box

Joe Bussell joe at otsys.com
Fri Oct 17 10:32:49 PDT 2003


Looks like TestRegion is the only layer that you have turned on.  Is this your intent?

Try using a straight in-line layer like:

LAYER
   name     background
    TYPE    polygon
    STATUS ON
    CLASS
        NAME "World"
        OUTLINECOLOR    0 0 0
        COLOR    30 144 255
        SIZE    1
        SYMBOL  0
    END

    FEATURE
        POINTS 
            -180 90 
            -180 -90 
            180 -90
            180 90
            -180 90 
        END
    END
END

My points are in lat/lon.  I notice that in your mapfile you are specifiing meters.  You will have to adjust the range accordingly.  I use 

PROJECTION
    "proj=latlong"
END

as all my data is in lat/lon.  I do not see a projection declaration in your mapfile.  

You are also declaring a shapepath of "data".  To be honest I am unsure what the result of this will be.  Is this path supposed to be absolute?  Try setting it to the absolute path of your test_region.shp directory.

Don't give up now, you are halfway there...

Cordially,

Joe Bussell
www.TrafficDodger.com



don wrote:
> am a newbie, when i try to load map am getting blank
> image! everything else is ok,,demo loadin ok ,,i have
> tried playing around with extents but nothing is
> showing,,not even errors..i sincerely don't know what
> am doing wrong and am stuck and very
> desperate..am in a verge of quiting,,i have been
> trying this for weeks,,my mapfile is as follows:
> 
> #
> # Start of map file
> #
> NAME TEST
> STATUS ON
> SIZE 600 600
> EXTENT 35.786953 -0.721388 36.408545 0.094966
> UNITS METERS
> SHAPEPATH "data"
> IMAGECOLOR 255 255 255
> 
> 
> WEB
>   HEADER test_header.html
>   TEMPLATE test.html
>   FOOTER test_footer.html
>   MINSCALE 1000
>   MAXSCALE 1550000
>   IMAGEPATH "set in test.html"
>   IMAGEURL "set in test.html"
>   METADATA
>     WMS_TITLE "scomMapserver"
>     WMS_ACCESSCONSTRAINTS none
>     WMS_ONLINERESOURCE
> "http://var/www/html/mapsite/test.html"
> 
>     WMS_SRS "EPSG:26915"
>   END
> END
> 
> QUERYMAP
>   SIZE 200 200
>   STATUS ON
>   STYLE HILITE
>   COLOR 255 0 0
> END
> 
> #
> # Start of reference map
> #
> #REFERENCE
> #  IMAGE graphics/ref.png
> # EXTENT 35.786953 -0.721388 36.408545 0.094966
> #  SIZE 50 50
> #  STATUS ON
> #  COLOR -1 -1 -1
> #  OUTLINECOLOR 255 0 0
> #END
> 
> #
> # Start of legend
> #
> LEGEND
>   KEYSIZE 18 12
>   LABEL
>     TYPE BITMAP
>     SIZE MEDIUM
>     COLOR 0 0 89
>   END
>   STATUS ON
> END
> 
> #
> # Start of scalebar
> #
> SCALEBAR
>   IMAGECOLOR 255 255 255
>   LABEL
>     COLOR 255 255 255
>     SIZE tiny    
>   END
>   STYLE 1
>   SIZE 80 2
>   COLOR 255 255 255
>   UNITS MILES
>   INTERVALS 1
>   TRANSPARENT TRUE
>   STATUS TRUE
> END
> 
> #
> # Start of symbol definitions (we're only using a few)
> #
> SYMBOL
>   NAME 'circle'
>   TYPE ELLIPSE
>   POINTS 1 1 END
>   FILLED TRUE
> END
> 
> #
> # Start of layer definitions
> #
> 
> LAYER
>  NAME test_region
>   TYPE RASTER
>   STATUS DEFAULT
>   DATA "test_region"
>   
>   CLASSITEM 'cty_name'
>   CLASS
>     EXPRESSION 'Test'
>      OUTLINECOLOR 128 128 128
>     COLOR 225 225 185
>   END
>   CLASS # 
>     EXPRESSION /./ 
>     OUTLINECOLOR 128 128 128
>     COLOR 255 255 255
>   END
>   END
> 
> LAYER
>   NAME Towns_point
>   GROUP cities
>   TYPE RASTER
>   DATA "Towns_point"
>   STATUS OFF
>   CLASSITEM 'city_name'
>   CLASS
>     NAME "Cities & Towns"
>     EXPRESSION NONE
>     COLOR 255 225 90
>     TEMPLATE "population.html"
>   END
> 
>   HEADER "population_header.html"
>   FOOTER "population_footer.html"
> 
>   DUMP TRUE # allow GML export
> 
>   END
> END
> 
> LAYER
>   NAME Places_point
>   TYPE POINT
>   DATA "Places_point"
>   STATUS OFF
>   CLASS
>     SYMBOL 'circle'
>     SIZE 2
>     NAME 'Townships'
>     OUTLINECOLOR 181 181 145
>   END
>    END
> 
> 
> LAYER
>   NAME Lakes_region
>   TYPE RASTER
>   STATUS OFF
>   DATA "Lakes_region"
> 
>   CLASS
>     NAME 'Lakes & Rivers'
>     TEMPLATE "lakes.html"
>     COLOR 49 117 185  
>   END
> 
>   HEADER "lakes_header.html"
>   FOOTER "lakes_footer.html"
>   
>   TOLERANCE 3
> 
>   DUMP TRUE # allow GML export
> 
>   END
> END
> 
> LAYER
>   NAME Rivers_polyline
>   TYPE LINE
>   STATUS OFF
>   DATA "Rivers_polyline"
> 
>   CLASS
>     NAME "Streams"
>     TEMPLATE "description.html"    
>     COLOR 49 117 185
>   END
> 
>   HEADER "description_header.html"
>   FOOTER "description_footer.html"
> 
>   TOLERANCE 5  
> 
>   DUMP TRUE # allow GML export
> 
>   END
> END 
> 
> LAYER
>   NAME Roads_polyline
>   GROUP roads
>   MAXSCALE 300000
>   STATUS OFF
>   DATA "Roads_polyline"
>   TYPE LINE
>   CLASS
>     COLOR 0 0 0
>   END
> END 
> 
> LAYER
>   NAME Parks_region
>   GROUP roads
>   MAXSCALE 300000
>   STATUS OFF
>   DATA "Parks_region"
>   TYPE ANNOTATION
>   LABELITEM "Park_name"
>   CLASS
>     COLOR 255 255 255   
>     LABEL	
>    MINFEATURESIZE 40
>       MINDISTANCE 150
>       POSITION CC
>       SIZE SMALL
>       COLOR 0 0 0
>     END
>   END
>     
>   LAYER
>   NAME Public Utils_point
>   GROUP Public Utils
>   MAXSCALE 600000
>   STATUS OFF
>   DATA "Public Utils_point"
>  TYPE POLYGON
>   CLASS
>     NAME "Public Utils"
>     COLOR 0 0 0
>   END
> END
> 
> LAYER
>   NAME railway_polyline
>   GROUP railways
>   MAXSCALE 600000
>   STATUS OFF
>   DATA "railway_polyline"
>   TYPE ANNOTATION
>   LABELITEM "railway_num"  
>   CLASSITEM "railway_class"
>   CLASS
>     EXPRESSION "3"
>     COLOR 0 0 0 # dummy color
>      LABEL
>       MINFEATURESIZE 50
>       MINDISTANCE 150
>       POSITION CC
>       SIZE TINY
>       COLOR 0 0 0
>     END
>   END
>   CLASS
>     EXPRESSION "2" 
>     COLOR 0 0 0 # dummy color
>        LABEL
>       MINFEATURESIZE 50
>       MINDISTANCE 150
>       POSITION CC
>       SIZE TINY
>       COLOR 0 0 0
>     END
>   END
>   CLASS
>     EXPRESSION "1"
>   STYLE 
>     COLOR 0 0 0 # dummy color
>      LABEL
>       MINFEATURESIZE 50
>       MINDISTANCE 150
>       POSITION CC
>       SIZE TINY
>       COLOR 255 255 255
>     END
>   END
> 
> LAYER
>   NAME Places_point
>   TYPE POINT
>   DATA "Places_point"
>   STATUS OFF
>   CLASS
>     NAME 'Places'
>     COLOR 128 255 164
>     SYMBOL 'circle'
>     SIZE 7
>     TEMPLATE "airports.html"
>   END
> 
>   HEADER "airports_header.html"
>   FOOTER "airports_footer.html"
> 
>   TOLERANCE 5
> 
> 
>   END
> END
> 
> LAYER
>   NAME Towns
>   NAME cities
>   TYPE POINT
>   DATA "towns_point"
>   STATUS OFF
>   LABELITEM "city_name"
>   CLASSITEM "city_name"
>   LABELMAXSCALE 500000
>   CLASS
>     EXPRESSION /./
>     COLOR -1 -1 -1
>     LABEL
>       COLOR 0 0 0
>       SHADOWCOLOR 218 218 218
>       SHADOWSIZE 2 2
>       TYPE BITMAP
>       SIZE MEDIUM
>       POSITION CC
>       PARTIALS FALSE
>       BUFFER 2
>     END
>   END
> 
> END # Map File
> 
> redhat linux 8.0
> MS4.0
> 
> thanks.
> 
> 
> =====
> 
> =====
> don
> 
> __________________________________
> Do you Yahoo!?
> The New Yahoo! Shopping - with improved product search
> http://shopping.yahoo.com
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
> 





More information about the MapServer-users mailing list