[Mapserver-users] problem displaying a single image

Steven Monai stevem at spatialmapping.com
Mon Jun 21 10:52:48 PDT 2004


Eric:

Your problem is that the MapServer CGI thinks your layer
"communes18_original" is turned off. (Yes, I know, you have STATUS ON in the
layer section, but for some reason, the CGI has behaved in this way for as
long as I've known it, circa version 3.5.) To tell the CGI to turn on the
layer, you need to add "&layer=communes18_original" (without the quotes) to
the end of your URL. Each additional layer that you want turned on (if you
had any) would require a corresponding "&layer=xxx".

An alternative to specifying the layer in the URL is to make the layer's
status "DEFAULT" instead of "ON". DEFAULT layers are always drawn, so you
don't have to specify it in the URL. The drawback, of course, is that you
lose the ability to turn the layer off, but in your case, that probably
doesn't matter.

Hope this helps,
-SM
--
============================================
Steven Monai
Database & Application Developer
Spatial Mapping Ltd.
484 2nd Avenue
Prince George, BC, Canada
V2L 2Z7

http://www.spatialmapping.com
mailto:stevem at spatialmapping.com
phone: 250 564 1928
fax: 250 564 0751
============================================


Belenfant Eric wrote:
> Hi ,
> i use mapserver 4.1 on W32, apache 1.3.27, php 4.3.3
> I try to display a map provided by MAPINFO but when i try the
> following URL
> http://127.0.0.1/cgi-bin/mapserv_41.exe?map=C%3A%5CProgram+Files%5
> CEasyPHP1-7%5Cwww%5Cmapserver%5Ccommune.map&mode=map
> i have no image displayed in the web browser
>
> the mapserver configuration is :
>
> MapServer version 4.1 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
> OUTPUT=PDF O
> UTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE SUPPORTS=WMS_SERVER
> SUPPORTS=WMS_CLIEN
> T SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT INPUT=OGR INPUT=GDAL
> INPUT=SHAPEFILE
>
> the map is the following (commune.map):
>
> MAP
>         NAME "Europe in purple"
>         SIZE 400 400
>         STATUS ON
>         UNITS METERS
>         IMAGETYPE PNG
>         EXTENT    557080.396149 2157880.301791 656751.905580
> 2292246.846584
>         SHAPEPATH "C:\Program Files\EasyPHP1-7\www\mapserver\data"
>         IMAGECOLOR 255 255 255
>
>         LAYER
>             NAME "communes18_original"
>             TYPE POLYGON
>             STATUS ON
>             CONNECTIONTYPE OGR
>             CONNECTION "C:\Program
> Files\EasyPHP1-7\www\mapserver\data\communes18_original.TAB"
>             CLASS
>                 COLOR 232 232 255
>                 OUTLINECOLOR 32 32 255
>             END
>
>         END
>
> END
>
> Anyone could give me a hint ?????
>
> thanks
>
> eric
>
> --
> eric BELENFANT
> *Tel* : 02.38.79.45.98
> ------------------------
> pôle SYSTEMES PARTAGES
> *DEP - rectorat d'Orléans-Tours*
> ---------------------------------------------------
> /Pour toute information sur la DEP ou pour obtenir des statistiques sur
> l'académie,
> consultez la base de pilotage/ PILOT <http://dep.ac-orleans-tours.fr>
>
> --__--__--





More information about the MapServer-users mailing list