This is a migrated thread and some comments may be shown as answers.

Problem with SHP file

1 Answer 80 Views
Map
This is a migrated thread and some comments may be shown as answers.
Sasa Grebenar
Top achievements
Rank 1
Sasa Grebenar asked on 07 Feb 2011, 09:32 PM

Hello..

I get the next error when I show esri shp files..
Can you help me..

Best regards

SASA

Webpage error details 
    
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; AskTB5.6) 
Timestamp: Fri, 4 Feb 2011 15:39:58 UTC 
    
    
Message: Unhandled Error in Silverlight Application Object reference not set to an instance of an object.   at eGroblje.MainPage.MapShapeReader_PreviewReadCompleted(Object sender, PreviewReadShapesCompletedEventArgs eventArgs) 
   at Telerik.Windows.Controls.Map.PreviewReadShapesCompletedEventHandler.Invoke(Object sender, PreviewReadShapesCompletedEventArgs eventArgs) 
   at Telerik.Windows.Controls.Map.MapShapeReader.OnPreviewReadCompleted(PreviewReadShapesCompletedEventArgs previewReadCompletedArgs) 
   at Telerik.Windows.Controls.Map.MapShapeReader.CompleteReading(ShapeReaderStatus status, Exception error) 
   at Telerik.Windows.Controls.Map.MapShapeReader.CheckComplete(Exception serviceError, Object userState, Stream stream, Boolean data) 
   at Telerik.Windows.Controls.Map.MapShapeReader.ReadShapesCompleted(Object sender, OpenReadCompletedEventArgs e) 
   at System.Net.WebClient.OnOpenReadCompleted(OpenReadCompletedEventArgs e) 
   at System.Net.WebClient.OpenReadOperationCompleted(Object arg) 
Line: 1 
Char: 1 
Code: 0 
URI: http://***.dyndns.org:8081/gr1/Silverlight.js

1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 09 Feb 2011, 12:09 PM
Hi Sasa Grebenar,

According to the exception call stack the problem occurs in your application at eGroblje.MainPage.MapShapeReader_PreviewReadCompleted(Object sender, PreviewReadShapesCompletedEventArgs eventArgs) method. I can't say for sure what is wrong without your code, but it looks like you use in your code some property of the eventArgs which is not set during shape file reading. For example, in case of the error (when MapShapeReader can't read shape file for some reasons) the eventArgs.Error property will contain information about the exception, and eventArgs.Items will be null. So if you don't test the result of shape file reading for errors in your code and simple use eventArgs.Items property then you will get NullReferenceException exception.

Best wishes,
Andrey Murzov
the Telerik team
Let us know about your Windows Phone 7 application built with RadControls and we will help you promote it. Learn more>>
Tags
Map
Asked by
Sasa Grebenar
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or