I'm using mapcache/mapserver/openlayers 3 with ms4w. When my application is loaded with the browser at the normal 100% zoom level, everything returns fine (testing on chrome, firefox, and edge). The map requests are:


However, some of my users are using the zoom feature of the browser and zooming in to levels above 100% and that changes the height and width values. At 150%, it sets the height and width to 384 and adds MAP_RESOLUTION=135 to the URL.


When this happens, only a handful of tiles are returned and mapcache/wms server won't respond to any future web requests. I can pan or zoom over the map, but all generated requests are never fulfilled.

I can change the height and width of the requests in a new/reloaded tab and it returns the appropriate tiles immediately.

A previous version of my application that was using older versions of mapcache/mapserver/openlayers did not have this problem. Other than the version differences, I am now using the predefined grids in mapcache, instead of defining my own.

If I point my layers directly at mapserver, instead of using mapcache, the tiles returned from mapserver work as expected with the updated height/width/map_resolution values.

Can anyone point me to where I need to look to resolve this issue? This is a sanitized version of my mapfile.

<?xml version="1.0" encoding="UTF-8"?>


   <grid name="WGS84">
      <extent>-180 -90 180 90</extent>
      <size>256 256</size>
      <resolutions>0.703125000000000 0.351562500000000 0.175781250000000 8.78906250000000e-2 4.39453125000000e-2 2.19726562500000e-2 1.09863281250000e-2 5.49316406250000e-3 2.74658203125000e-3 1.37329101562500e-3 6.86645507812500e-4 3.43322753906250e-4 1.71661376953125e-4 8.58306884765625e-5 4.29153442382812e-5 2.14576721191406e-5 1.07288360595703e-5 5.36441802978516e-6</resolutions>

   <cache name="disk" type="disk">

   <cache name="sqlitecache" type="sqlite3">
      <pragma name="max_page_count">10000000</pragma>

   <source name="statemap" type="wms">

   <!-- Tilesets -->
   <!-- Tilesets name must match layer name both from wms & source -->       

   <tileset name="statemap">
      <grid use_wms_intermediate_resolutions="true">WGS84</grid>
      <metatile>5 5</metatile>

   <!-- settings -->


   <format name="PNG_FAST" type="PNG">

   <format name="PNG_BEST" type="PNG">

   <format name="MIXED" type="MIXED">

   <service type="wms" enabled="true">

   <service type="wmts" enabled="true"/>
   <service type="tms" enabled="true"/>
   <service type="kml" enabled="true"/>
   <service type="gmaps" enabled="false"/>
   <service type="ve" enabled="false"/>
   <service type="demo" enabled="false"/>




Your Answer

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

Browse other questions tagged or ask your own question.