Exemplo n.º 1
0
 /// <summary>
 /// Configures for WFS 'GetCapabilities' request using an instance implementing <see cref="SharpMap.Utilities.Wfs.IWFS_TextResources"/>.
 /// The <see cref="SharpMap.Utilities.Wfs.HttpClientUtil"/> instance is returned for immediate usage. 
 /// </summary>
 internal HttpClientUtil configureForWfsGetCapabilitiesRequest(HttpClientUtil httpClientUtil,
                                                               string targetUrl)
 {
     httpClientUtil.Reset();
     httpClientUtil.Url = targetUrl + _WfsTextResources.GetCapabilitiesRequest();
     return httpClientUtil;
 }
Exemplo n.º 2
0
            /// <summary>
            /// Configures for WFS 'GetFeature' request using an instance implementing <see cref="SharpMap.Utilities.Wfs.IWFS_TextResources"/>.
            /// The <see cref="SharpMap.Utilities.Wfs.HttpClientUtil"/> instance is returned for immediate usage. 
            /// </summary>
            internal HttpClientUtil configureForWfsGetFeatureRequest(HttpClientUtil httpClientUtil,
                                                                     WfsFeatureTypeInfo featureTypeInfo,
                                                                     string labelProperty, Envelope boundingBox,
                                                                     IFilter filter, bool GET)
            {
                httpClientUtil.Reset();
                httpClientUtil.Url = featureTypeInfo.ServiceURI;

                if (GET)
                {
                    /* HTTP-GET */
                    httpClientUtil.Url += _WfsTextResources.GetFeatureGETRequest(featureTypeInfo, boundingBox, filter);
                    return httpClientUtil;
                }

                /* HTTP-POST */
                httpClientUtil.PostData = _WfsTextResources.GetFeaturePOSTRequest(featureTypeInfo, labelProperty,
                                                                                  boundingBox, filter);
                httpClientUtil.AddHeader(HttpRequestHeader.ContentType.ToString(), "text/xml");
                return httpClientUtil;
            }
Exemplo n.º 3
0
 /// <summary>
 /// Configures for WFS 'DescribeFeatureType' request using an instance implementing <see cref="SharpMap.Utilities.Wfs.IWFS_TextResources"/>.
 /// The <see cref="SharpMap.Utilities.Wfs.HttpClientUtil"/> instance is returned for immediate usage. 
 /// </summary>
 internal HttpClientUtil configureForWfsDescribeFeatureTypeRequest(HttpClientUtil httpClientUtil,
                                                                   string targetUrl,
                                                                   string featureTypeName)
 {
     httpClientUtil.Reset();
     httpClientUtil.Url = targetUrl + _WfsTextResources.DescribeFeatureTypeRequest(featureTypeName);
     return httpClientUtil;
 }