[mapserver-users] Re: ‘mode=map’ with WMC of dynamic <Layer> - Solved!

myOpenLayersUName joanne.mcgraw at SYMPATICO.CA
Mon Dec 13 08:58:35 PST 2010


After preparing my last post, I noticed the strange numbers (really the fact
that I got two different ones) for the single quotes when I encoded the URL
(%91 and %92) that was failing:

http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/testing/dynamic.map&map.layer[line]=DATA%20%91id3/vector%92%20END&layers=line&mode=map 


And, after looking closer, I realized there were "smart" rather than regular
(as in %27) single quotes. Once I changed them the following URL worked fine
in the browser after all:

http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/testing/dynamic.map&map.layer[line]=DATA
'id3/vector' END&layers=line&mode=map



So, I thought, my attempts at trying to figure out what the bigger problem I
was having had failed to this point. I did not have "smart" quotes in the
WMC for that <Layer> definition (as shown in the original post) but I was
unable to create an output image with it. 


Then, I thought of Obsidian's suggestion and changed the <LayerList><Layer>
definition as follows (see the blanks replaced with %20 in the
<OnlineResource> values): 

    <Layer queryable="0" hidden="0" clid="id3vector">
      <Server service="OGC:WMS" version="1.1.1" title="Id3 Vector">
        <OnlineResource xlink:type="simple"
xlink:href="http://<domain>/ogc/printVecWms_en?map.layer[line]=DATA%20'id3/vector'%20END"/>
      </Server>
      <Name>line</Name>
      <Title>id3 vector</Title>
      <SRS>EPSG:42304</SRS>
      <FormatList>
        <Format current="1">image/png</Format>
      </FormatList>
      <StyleList>
        <Style current="1">
          <Name>default</Name>
          <Title>default</Title>
          <LegendURL format="image/png" width="47" height="294">
             <OnlineResource xlink:type="simple"
xlink:href="http://<domain>/ogc/printVecWms_en?version=1.1.1&service=WMS&request=GetLegendGraphic&map.layer[line]=DATA%20'id3/vector'%20END&layer=line&format=image/png&STYLE=default"/>
          </LegendURL>
        </Style>
      </StyleList>
      <Extension>
        <ol:maxExtent minx="-2903297" miny="-789911" maxx="3431059"
maxy="3959683"/>
        <ol:transparent>true</ol:transparent>
        <ol:isBaseLayer>false</ol:isBaseLayer>
        <ol:displayInLayerSwitcher>true</ol:displayInLayerSwitcher>
      </Extension>
    </Layer> 


And, low and behold, I have an image with the dynamic shapefile's contents
included. Yay!!!

Thank you, Jeff and Obsidian, for your pointers towards things to look more
closely at. 
-- 
View this message in context: http://osgeo-org.1803224.n2.nabble.com/mode-map-with-WMC-of-dynamic-Layer-failing-with-getString-error-tp5824774p5831449.html
Sent from the Mapserver - User mailing list archive at Nabble.com.



More information about the MapServer-users mailing list