Sharpmap WMS Client and calling Map layer is not working

Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Sharpmap WMS Client and calling Map layer is not working

vivek.srivastawa@gmail.com
Hi All,

I am stuck in one position, hope I will get solution from here.

I am calling Map server layer with help of Sharpmap WMS client, I have created two layers, one is of Shrapmap layers and second one is of Map server layer, I am using below Map file to accomplish this

MAP

NAME GMAP_DEMO
STATUS ON
SIZE 400 300
SYMBOLSET ../etc/symbols.txt
SHAPEPATH "../data"
IMAGECOLOR 255 0 0
FONTSET ../etc/fonts.txt
UNITS DD
EXTENT   -180 -90 180 90 # Geographic
CONFIG "PROJ_LIB" "C:/ms4w/apps/gmap/proj/nad/epsg"
TRANSPARENT off


#
# Start of web interface definition
#
WEB

#
# On Windows systems, /tmp and /tmp/ms_tmp/ should be created at the root
# of the drive where the .MAP file resides.
#
 IMAGEPATH "C:/ms4w/tmp/ms_tmp/"
 IMAGEURL "/ms_tmp/"

 METADATA
       "wms_srs"  "EPSG:4326"
 END
END


#
# Start of layer definitions
#


LAYER
PROJECTION
 "proj=latlong"
 "ellps=WGS84"
END
   NAME   "world_poly"
   DATA         'C:/ms4w/apps/gmap/shapefile/world_adm0.shp'
       STATUS       ON
   TYPE         POLYGON
   CLASS
       NAME       'The World'
       STYLE
           OUTLINECOLOR    0 0 0
       END
   END
END # layer


END # Map File


and I am calling this above map by my WMS client here is my WMS clint

string wmsUrl = "http://localhost/cgi-bin/mapserv.exe?map=/ms4w/apps/gmap/htdocs/gmap_modified.map";
               WmsLayer layWms = new WmsLayer("GMAP_DEMO", wmsUrl);
               layWms.AddLayer("world_poly");
               layWms.SetImageFormat(layWms.OutputFormats[1]);
               //Map Server Transparancy
               layWms.Transparancy = false;
               layWms.SetImageFormat("image/png");
               layWms.ContinueOnError = false;
               layWms.BgColor = System.Drawing.Color.Red;
               layWms.Enabled = true;
               //Set timeout to 5 seconds
               layWms.TimeOut = 5000;

               //Map Server Projection ID
               layWms.SRID = 4326;
               map.Layers.Add(layWms);

The problem is this not showing any map, only blank screen is coming.

Please guide me to do this.

Thanks,
Vivek