Method | Description | |
---|---|---|
ParseQueryString ( SharpMap map, |
Generates a WMS 1.3.0 compliant response based on a SharpMap.Map and the current HttpRequest. The Web Map Server implementation in SharpMap requires v1.3.0 compatible clients, and support the basic operations "GetCapabilities" and "GetMap" as required by the WMS v1.3.0 specification. SharpMap does not support the optional GetFeatureInfo operation for querying. void page_load(object o, EventArgs e) { //Get the path of this page string url = (Request.Url.Query.Length>0?Request.Url.AbsoluteUri.Replace(Request.Url.Query,""):Request.Url.AbsoluteUri); SharpMap.Web.Wms.Capabilities.WmsServiceDescription description = new SharpMap.Web.Wms.Capabilities.WmsServiceDescription("Acme Corp. Map Server", url); // The following service descriptions below are not strictly required by the WMS specification. // Narrative description and keywords providing additional information description.Abstract = "Map Server maintained by Acme Corporation. Contact: [email protected]. High-quality maps showing roadrunner nests and possible ambush locations."; description.Keywords.Add("bird"); description.Keywords.Add("roadrunner"); description.Keywords.Add("ambush"); //Contact information description.ContactInformation.PersonPrimary.Person = "John Doe"; description.ContactInformation.PersonPrimary.Organisation = "Acme Inc"; description.ContactInformation.Address.AddressType = "postal"; description.ContactInformation.Address.Country = "Neverland"; description.ContactInformation.VoiceTelephone = "1-800-WE DO MAPS"; //Impose WMS constraints description.MaxWidth = 1000; //Set image request size width description.MaxHeight = 500; //Set image request size height //Call method that sets up the map //We just add a dummy-size, since the wms requests will set the image-size SharpMap.Map myMap = MapHelper.InitializeMap(new System.Drawing.Size(1,1)); //Parse the request and create a response SharpMap.Web.Wms.WmsServer.ParseQueryString(myMap,description); } |
Method | Description | |
---|---|---|
GetEncoderInfo ( String mimeType ) : System.Drawing.Imaging.ImageCodecInfo |
Used for setting up output format of image file
|
|
ParseBBOX ( string strBBOX ) : SharpMap.Geometries.BoundingBox |
Parses a boundingbox string to a boundingbox geometry from the format minx,miny,maxx,maxy. Returns null if the format is invalid
|
public static ParseQueryString ( SharpMap map, |
||
map | SharpMap | Map to serve on WMS |
description | Description of map service | |
return | void |