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

Errors on MapShapeReader.Source after upgrade

3 Answers 77 Views
Map
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
LaDonna
Top achievements
Rank 1
LaDonna asked on 10 Jul 2012, 05:32 PM
After upgrading to the latest version, we can no longer build our map Silverlight code.
This is the original code:
Uri worldUri = new Uri(string.Format(ShapeRelativeUriFormat, "world"), UriKind.Absolute); 
this.worldLayer.Reader = new MapShapeReader(); 
this.worldLayer.Reader.Source = worldUri;

We are receiving errors on :
'Telerik.Windows.Controls.Map.MapShapeReaderBase' does not contain a definition for 'Source' and no extension method 'Source' accepting a first argument of type 'Telerik.Windows.Controls.Map.MapShapeReaderBase' could be found (are you missing a using directive or an assembly reference?)

I tried modifying the code to accept the worldUri as a parameter in the new MapShapeReader instantiation call.  That doesn't give a compile error, but it doesn't work either!

Help!!!!!!!!!

3 Answers, 1 is accepted

Sort by
0
LaDonna
Top achievements
Rank 1
answered on 11 Jul 2012, 01:00 PM
With help from support,

The type of InformationLayer.Reader property is MapShapeReaderBase. However currently it does not contain the Source property. So, you should cast the value of the Reader to the MapShapeReader before assigning the Source property like this:

((MapShapeReader)this.worldLayer.Reader).Source = worldUri;



This fixed it!
0
PARAG
Top achievements
Rank 1
answered on 06 Sep 2012, 07:53 AM
Map is not visible after integrating MapShapeReader.
0
Andrey
Telerik team
answered on 11 Sep 2012, 07:29 AM
Hello LaDonna,

The type of InformationLayer.Reader property is MapShapeReaderBase. But currently it does not contain the Source property. So, you should cast the value of the Reader to the MapShapeReader before assigning the Source property like this:

((MapShapeReader)this.worldLayer.Reader).Source = worldUri;

Regards,
Andrey Murzov
the Telerik team

Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Tags
Map
Asked by
LaDonna
Top achievements
Rank 1
Answers by
LaDonna
Top achievements
Rank 1
PARAG
Top achievements
Rank 1
Andrey
Telerik team
Share this question
or