RV: Don't draw GIF/PNG images on wms clients.

Gilles Bassière gilles.bassiere at MAKINA-CORPUS.COM
Wed Oct 17 10:00:23 PDT 2007


Manuel Ballesteros Cardador wrote:
> Thank Gilles by your response. Now, I have eliminated CONNECTIONTYPE and CONNECTION parameter of the layer to set it to default values and now wms client draw image only when I am moving the image (pan). Do you know the problem?
>   
Without much context, I'm afraid I can't help. The problem seems to be 
at interface level since you finally get an image. In order to check 
your WMS, you could try to send the request through a simple web 
browser. The request would looks like:

http://localhost/cgi-bin/mapserv.exe?map=comarca_wms.map&LAYERS=Limite&TRANSPARENT=true&FORMAT=image/png&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&EXCEPTIONS=application/vnd.ogc.se_inimage&SRS=epsg:23030&BBOX=286421,4210158,400752,4295906&WIDTH=500&HEIGHT=500

or just:

http://localhost/cgi-bin/mapserv.exe?map=comarca_wms.map&mode=map (this 
one is not a valid WMS request but usually provide better error messages).

If these requests return an image, then your problem would rather be in 
QGIS.

I usually set the "wms_extent" in the layer's metadata. I'm not sure 
whether it's compulsory but it might be useful.

Regards,

Gilles
> I have the shapefile in local path, so DATA parameter of layer point to shapefile. 
>
> If I try connect to my local wms server from qgis, it work well but don't draw the image, only when pan it.
>
> Best regards!
>
> -----Mensaje original-----
> De: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] En nombre de Gilles Bassière
> Enviado el: miércoles, 17 de octubre de 2007 12:20
> Para: MAPSERVER-USERS at LISTS.UMN.EDU
> Asunto: [UMN_MAPSERVER-USERS] [Fwd: Re: [UMN_MAPSERVER-USERS] Don't draw GIF/PNG images on wms clients.]
>
> Hi Manuel
>
> There's something wrong in your layer definition. If I understand your 
> OnlineResource parameter, you try to expose a WMS stream with URL 
> http://localhost/cgi-bin/mapserv.exe?, right ?
> So you can't feed your layer with the same WMS, it would be client and 
> server of the same service.
> Your connection element should point to your datasource (another WMS, a 
> shapefile, a postgis DB, etc.).
>
> Regards,
> Gilles
>
>
>
> Manuel Ballesteros Cardador wrote:
>   
>> Hi, Im new in MapServer list.
>>
>> I have configured a WMS server and when I try viewing a .map file on 
>> wms clients (arcmap, qgis), images are not shown in. I can do zoom, 
>> pan, etc but it is not drawn.
>>
>> If I change resourceonline parameter I obtain drawEPP error.
>>
>> Do you have any idea?
>>
>> Thanks in advance!
>>
>> This is the .map file.
>>
>> MAP
>>
>> NAME "COMARCA"
>>
>> STATUS ON
>>
>> EXTENT 286421 4210158 400752 4295906
>>
>> SIZE 600 500
>>
>> SHAPEPATH "./data"
>>
>> IMAGECOLOR 125 125 125
>>
>> UNITS METERS
>>
>> IMAGETYPE PNG
>>
>> WEB
>>
>> IMAGEPATH "./tmp/ms_tmp/"
>>
>> IMAGEURL "./tmp/"
>>
>> METADATA
>>
>> "wms_title" "WMS Adroches" ##required
>>
>> "wms_onlineresource" "http://localhost/cgi-bin/mapserv.exe?"
>>
>> "wms_srs" "EPSG:23030"
>>
>> END
>>
>> END
>>
>> PROJECTION
>>
>> "init=epsg:23030" ##required
>>
>> END
>>
>> LAYER
>>
>> NAME "Limite"
>>
>> STATUS ON
>>
>> DEBUG ON
>>
>> DATA "comarca"
>>
>> TYPE POLYGON
>>
>> CONNECTION "http://localhost/cgi-bin/mapserv.exe?map=comarca_wms.map"
>>
>> CONNECTIONTYPE WMS
>>
>> METADATA
>>
>> "wms_title" "Limite Comarca"
>>
>> "wms_srs" "EPSG:23030"
>>
>> "wms_name" "Limite"
>>
>> "wms_server_version" "1.1.1"
>>
>> "wms_format" "image/PNG"
>>
>> END
>>
>> CLASS
>>
>> NAME "Comarca"
>>
>> STYLE
>>
>> COLOR 170 253 172
>>
>> OUTLINECOLOR 199 199 199
>>
>> END
>>
>> END
>>
>> END # Layer
>>
>> END # Map File
>>
>>     
>
>
>   


-- 
Gilles Bassiere
MAKINA CORPUS
30 rue des Jeuneurs
FR-75011 PARIS
http://www.makina-corpus.com



More information about the MapServer-users mailing list