Errors on MapShapeReader.Source after upgrade

4 posts, 0 answers
  1. LaDonna
    LaDonna  avatar
    8 posts
    Member since:
    Jul 2010

    Posted 10 Jul 2012 Link to this post

    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!!!!!!!!!
  2. LaDonna
    LaDonna  avatar
    8 posts
    Member since:
    Jul 2010

    Posted 11 Jul 2012 Link to this post

    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!
  3. DevCraft banner
  4. PARAG
    PARAG avatar
    1 posts
    Member since:
    Jun 2011

    Posted 06 Sep 2012 Link to this post

    Map is not visible after integrating MapShapeReader.
  5. Andrey
    Admin
    Andrey avatar
    1681 posts

    Posted 11 Sep 2012 Link to this post

    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 >>

Back to Top