I have a client for the WMS-Services of my mapserver. The client program is written in javascript and it uses Openlayers (v. 2.12). The map has as a base layer "Google satellite"-Layer and the mercator projection. The WMS layers are overlayers. Some of them have as a source data - raster data and some of them have as data - vector data. I have no problem with WMS "raster" layers. But I have a problem with WMS "vector" layers. If my Openlayers map is dragged too much to the left and the generated request to mapserver is started, the WMS "vector" layers go to be invisible (and it happens only on the lowest zoom level). I found out that the bbox in generated requests is in some way wrong because the mapserver response is empty: I tested the automatically generated request strings as links in my browser (firefox or Chrom). I have modified the mapfile and I added the mercator projection to it. But it did not help. Here is the begin of the map file: MAP
NAME "africa_southafrica_admin" PROJECTION
"init=epsg:3857" "init=epsg:900913" END STATUS ON TRANSPARENT ON UNITS METERS WEB METADATA "wms_srs" "epsg:4326 epsg:3857 epsg:32733 epsg:900913" "wms_title" "ROCEEH Southafrica" "wms_onlineresource" "https://www.roceeh.uni-tuebingen.de/cgi-bin/mapserv?map=mapdata/MAP_88361.map" "wms_enable_request" "*" "ms_enable_modes" "*" "labelcache_map_edge_buffer" "-30" END END MAXSIZE 10000 SIZE 2048 2048 EXTENT -180.0 -89.0 180.0 89.0 FONTSET "font/fontset" LAYER NAME "SRTM_90m_Screening" STATUS OFF CLASS STYLE OUTLINECOLOR 102 255 51 END NAME "Satellite_SRTM_90m" LABEL TYPE BITMAP SIZE SMALL COLOR 102 255 51 END END TOLERANCE 3 PROJECTION "init=epsg:4326" "init=epsg:900913" END GROUP "Satellite_Data_Index" LABELITEM "name" METADATA "wms_title" "SRTM 90m" "wms_group_title" "Satellite Data Index" "wms_abstract" "No information available." "wms_include_items" "all" "gml_include_items" "all" "gml_geometries" "the_geom" "gml_the_geom_type" "multipolygon" END ...

Here two Requests to Mapserver: the first don't work and the second is fine:

1) https://www.roceeh.uni-tuebingen.de/cgi-bin/mapserv?map=mapdata/MAP_88361.map&FORMAT=image%2Fpng&LAYERS=SRTM_90m_Screening&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&SRS=EPSG%3A3857&BBOX=-45940489.454273,-7333063.5634033,-18555242.460298,12831635.991646&WIDTH=1399&HEIGHT=1030


My Question is: what I can do or how can I control the automatically generated Requests to avoid the described misbehavior.

Thanks in advance, ZK.

2 Answers 2


I have solved my problem. Perhaps not the best way... The solution was a "singleTile" option for every WMS-Layer. It was set always to true. With "singleTile: false" I solved my problem.

Actually my problem with WMS "vector" layers persisted on all zoom levels. It was simply difficult to see this.


I'm not sure if this will fix your problem, but the projection information in the map file is, I think, incorrect.

For example in the first PROJECTION declaration (as below), there should be just one projection, which should be the default projection for the service.

    NAME "africa_southafrica_admin"

In the LAYER PROJECTION declarations (as below), there should be just one projection which should be the projection that the layer data is actually in.

    NAME "SRTM_90m_Screening"

The list of supported projections for the service is added in the WEB METADATA section

"wms_srs" "epsg:4326 epsg:3857 epsg:32733 epsg:900913"

If you want a layer to support a different set of projections you add a similar statement in the LAYER METADATA

  • Thanks for the answer. It did not help. I changed the mapfile layer specification: DATA "the_geom from satellite_srtm_90m" CONNECTIONTYPE POSTGIS CONNECTION "..." TYPE POLYGON TOLERANCE 3 PROJECTION "init=epsg:4326" END METADATA "wms_title" "SRTM 90m" "wms_group_title" "Satellite Data Index" "wms_abstract" "No information available." "wms_include_items" "all" "gml_include_items" "all" "gml_geometries" "the_geom" "gml_the_geom_type" "multipolygon" "wms_srs" "epsg:3857 epsg:900913" END END
    – Zara
    Apr 11, 2014 at 7:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.