[mapserver-users] newbie just getting a blank page

Eloi Ribeiro eloi.ribeiro at gmail.com
Tue Jun 26 06:18:03 PDT 2012


Thank you both. Now I'm seeing some light at the end of the tunnel. I got
my first request from MapServer work! You were both right CLASS, STATUS
were missing.

I started from the map file QGIS 1.8 MapServerExport tool output, but then
I made more modifications and probably got worst. So my responsibility for
not working properly. Anyway now a can start working from here.

Thanks!

This is how it looks now, still simple but working:
-----------------------------------------------------
MAP
  NAME "World map"
  SIZE 900 700
  UNITS meters
  IMAGECOLOR 28 28 55
  IMAGETYPE png
  EXTENT -180 -90 180 90
  PROJECTION
    "proj=latlong"
    "ellps=WGS84"
  END

  OUTPUTFORMAT
    NAME png
    DRIVER 'GD/PNG'
    MIMETYPE 'image/png'
    IMAGEMODE RGBA
    EXTENSION 'png'
  END

  LAYER
    STATUS DEFAULT
    CONNECTIONTYPE POSTGIS
    CONNECTION "dbname='bd_ceam' host='localhost' port='5432'
user='consulta' password='*******' sslmode='disable'"
    DATA "geom FROM sch_sig.wd_paises USING UNIQUE gid USING srid=4326"
    NAME "wd_paises"
    CLASS
      COLOR 10 20 50
    END
    TYPE POLYGON
    END
    EXTENT -180 -90 180 90
  END

END
-----------------------------------------------------


Eloi Ribeiro
GIS Analyst
39,45º -0,40º
flavors.me/eloiribeiro


2012/6/26 Rahkonen Jukka <Jukka.Rahkonen at mmmtike.fi>

> Hi,
>
> You do not ask for any layer. Add STATUS DEFAULT to your layer or add
> &layers=all into your request.
>
> Unfortunately, even your mapfile is short is has many other errors and
> outdated stuff.  Where did you take an example when you wrote it?
>
> We should absolutely have some guaranteed correct mapfiles with
> corresponding data for the newbies and it should be forbidden for the poor
> new users to do any own trials before the Hello Word example shows a map.
>  When I started we had MapLab but what do we have now?  Even the Qgis
> mapfile write plugin is broken nowadays.
>
> -Jukka Rahkonen-
> ________________________________
> Eloi Ribeiro wrote:
>
> > Hi,
>
> > I'm trying MapServer for the first time and doing something wrong
> because all I get is a blank page<
> https://dl.dropbox.com/u/1735137/MapServer_firefox_chromium.png> in the
> browser with:
> http://localhost/cgi-bin/mapserv?map=/var/www/teste.map&mode=map
> The computer is running Ubuntu 10.04 with UbuntuGIS-unstable repository.
> The map file is located under the Apache folder (/var/www/teste.map) and
> trying to load a PostGIS layer.
> This is the content of my map file:
> --------------------------------------
> MAP
>  NAME "World map"
>  SIZE 500 500
>  UNITS meters
>  IMAGECOLOR 28 28 55
>  IMAGETYPE png
>  EXTENT -180 -90 180 90
>  PROJECTION
>    "proj=latlong"
>    "ellps=WGS84"
>  END
>
>  OUTPUTFORMAT
>    NAME png
>    DRIVER 'GD/PNG'
>    MIMETYPE 'image/png'
>    IMAGEMODE RGBA
>    EXTENSION 'png'
>  END
>
>  LAYER
>    CONNECTIONTYPE POSTGIS
>    CONNECTION "dbname='bd_ceam' host='localhost' port='5432'
> user='consulta' password='*******' sslmode='disable'"
>    DATA "geom FROM 'sch_sig'.'wd_paises' USING UNIQUE gid USING srid=4326"
>    NAME "wd_paises"
>    TYPE POLYGON
>    END
>    EXTENT -180 -90 180 90
>  END
>
> END
> --------------------------------------
>
> Any clue of what I'm doing wrong?
>
> Thanks,
>
> Eloi Ribeiro
> GIS Analyst
> 39,45º -0,40º
> flavors.me/eloiribeiro<http://flavors.me/eloiribeiro>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20120626/57e5999a/attachment-0001.html>


More information about the mapserver-users mailing list