Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
435
Setting Reader in C# produces Object Reference Error
posted

I was following the example at:

http://help.infragistics.com/Help/NetAdvantage/DV/2009.1/CLR3.5/html/SL_DV_xamWebMap_Displaying_xamWebMap_Using_Shapefiles.html

I get an "Object reference not set to an instance of an object" when I step through the code.  The error occurs when the statesLayer.Reader is set to the reader.

In C#:

ShapeFileReader reader = new ShapeFileReader();
reader.Uri = "Shapefiles/usa_st";

DataMapping.Converter converter = new DataMapping.Converter();
reader.DataMapping = converter.ConvertFromString("Caption=STATE_ABBR") as DataMapping;
statesLayer.Reader = reader; 
Parents Reply Children
No Data