Adding extra param in each wms call

Topics: WinForms Controls
May 4, 2010 at 7:38 AM

How can i add extra params in the url the sharp map request from the server

i tried  to change the from  http://localhost/wms/wms.aspx

to http://localhost/wms/wms.aspx?user=user&pass=panos in

the example winformsexample  at the first call to getCapabilities the params pass

but in  the next call they don't pass.I think it has to do with the xml returned from the capabilities but

when i change it there it complains about the xml not containing correct info i provide the xml i use.

thanks in advance

 

<?xml version="1.0" encoding="UTF-8"?>
<WMS_Capabilities version="1.3.0" xmlns="http://www.opengis.net/wms" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.opengis.net/wms http://schemas.opengis.net/wms/1.3.0/capabilities_1_3_0.xsd">
<!-- Service Metadata -->
<Service>
  <!-- The WMT-defined name for this type of service -->
  <Name>WMS</Name>
  <!-- Human-readable title for pick lists -->
  <Title>Acme Corp. Map Server</Title>
  <!-- Narrative description providing additional information -->
  <Abstract>Map Server maintained by Acme Corporation.  Contact: webmaster@wmt.acme.com.  High-quality maps showing roadrunner nests and possible ambush locations.</Abstract>
  <KeywordList>
    <Keyword>bird</Keyword>
    <Keyword>roadrunner</Keyword>
    <Keyword>ambush</Keyword>
  </KeywordList>
  <!-- Top-level web address of service or service provider.  See also OnlineResource
  elements under <DCPType>. -->
  <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost/wms/wms.aspx"/>
  <!-- Contact information -->
  <ContactInformation>
    <ContactPersonPrimary>
      <ContactPerson>PS</ContactPerson>
      <ContactOrganization>Manna</ContactOrganization>
    </ContactPersonPrimary>
    <ContactPosition>Computer Scientist</ContactPosition>
    <ContactAddress>
      <AddressType>postal</AddressType>
      <Address>PANO</Address>
      <City>Athens</City>
      <StateOrProvince>XALANDRI</StateOrProvince>
      <PostCode>20771</PostCode>
      <Country>GREECE</Country>
    </ContactAddress>
    <ContactVoiceTelephone>6728</ContactVoiceTelephone>
    <ContactElectronicMailAddress>user@in.gr</ContactElectronicMailAddress>
  </ContactInformation>
  <Fees>none</Fees>
  <AccessConstraints>none</AccessConstraints>
  <LayerLimit>16</LayerLimit>
  <MaxWidth>2048</MaxWidth>
  <MaxHeight>2048</MaxHeight>
</Service>
<Capability>
  <Request>
    <GetCapabilities>
      <Format>text/xml</Format>
      <DCPType>
        <HTTP>
          <Get>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost/wms/wms.aspx?"/>
          </Get>
          <Post>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost/wms/wms.aspx?"/>
          </Post>
        </HTTP>
      </DCPType>
    </GetCapabilities>
    <GetMap>
      <Format>image/gif</Format>
      <Format>image/png</Format>
      <Format>image/jpeg</Format>
      <DCPType>
        <HTTP>
          <Get>
            <!-- The URL here for invoking GetCapabilities using HTTP GET
            is only a prefix to which a query string is appended. -->
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost/wms/wms.aspx?"/>
          </Get>
        </HTTP>
      </DCPType>
    </GetMap>
    <GetFeatureInfo>
      <Format>text/xml</Format>
      <Format>text/plain</Format>
      <Format>text/html</Format>
      <DCPType>
        <HTTP>
          <Get>
            <OnlineResource xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="http://localhost/wms/wms.aspx?"/>
          </Get>
        </HTTP>
      </DCPType>
    </GetFeatureInfo>
  </Request>
  <Exception>
    <Format>XML</Format>
    <Format>INIMAGE</Format>
    <Format>BLANK</Format>
  </Exception>
  <Layer>

        <Title>eparxiakodiktio</Title>
            <SRS>EPSG:4326</SRS>
            <LatLonBoundingBox minx="-180" miny="-90" maxx="180" maxy="90"/>
            <BoundingBox SRS="EPSG:4326" minx="-184" miny="-90" maxx="180" maxy="90"/>
            <Layer queryable="1" opaque="1">
                <Name>eparxiakodiktio</Name>
                <Title>eparxiakodiktio</Title>
                <BoundingBox SRS="EPSG:4326" minx="-180" miny="-90" maxx="180" maxy="90"/>
                <ScaleHint min="0" max="14000"/>
            </Layer>
  </Layer>
</Capability>
</WMS_Capabilities>