2

The MapServer and MapCache are installed on the Ubuntu machine, all works fine. However, the specific of developed system is that the displayed through WMS data often have different map files created. The question is - can the MAP parameter be dynamic, i.e. fetched from the original request to MapCache?

So, basically I want to make request like

http://31.227.56.57/mapcache/?SERVICE=WMS&REQUEST=GetMap&VERSION=1.1.1&LAYERS=localmapserver&HEIGHT=1024&WIDTH=1024&SRS=EPSG%3A3857&BBOX=11271098.442818949,6261721.35712164,11897270.578531113,6887893.492833804&map=/s/some/file.map

The example of working config

  <source name="vmap1" type="wms">
      <getmap>
         <params>
            <FORMAT>image/png</FORMAT>
            <LAYERS>result_0</LAYERS>
            <TRANSPARENT>true</TRANSPARENT>
            <MAP>/s/temp/mapfiles/RSCnuQp7iH.map</MAP>
            <!--<MAP>{MAP}</MAP>-->
         </params>
      </getmap>
      <http>
         <url>http://31.227.56.55/cgi-bin/mapserv</url>
      </http>
   </source>

   <tileset name="localmapserver">
      <source>vmap1</source>
      <cache>disk</cache>
      <grid>WGS84</grid>
      <grid>GoogleMapsCompatible</grid>
      <format>PNG</format>
      <metatile>5 5</metatile>
      <metabuffer>10</metabuffer>
      <expires>3600</expires>
   </tileset>

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.