MapShape Reader Source Property

2 posts, 0 answers
  1. Vidyadhar
    Vidyadhar avatar
    23 posts
    Member since:
    Oct 2011

    Posted 13 Dec 2011 Link to this post

    Am working on a Silverlight project using the Rad Map control which is hosted in to SharePoint. And I have a requirement that when I check a checkbox, I have to get the path of a kml file on the server and bind it to the information layer of my Rad Map. Since it is an InBrowser application, I do not have access to local disk from Silverlight. So I want to read the file from the server and create a byte array in the memory. So, is there a way that I can assign a byte array as source to an Information layer of the RadMap control. If so, can you gimme an example how I can achieve it or if there is a better way to accomplish the task.

  2. Andrey
    Andrey avatar
    1681 posts

    Posted 16 Dec 2011 Link to this post

    Hello Vidyadhar,

    The MapShapeReader allows to use the URI type as Source Property only. It allows to read the kml-file from assembly resource as well as from the web site. So, you can just specify a URI to the kml-file on the server. For example if your kml-file is in the root of your site, then you can specify the Source property like following:
    <telerik:MapShapeReader Source="myGeospatial.kml" />

    Also there is the KmlReader class in the map control. It allows to read the kml from a stream or from a string. For more information please take a look at the Manual Shape Reading topic of our online documentation using the following link:

    Best wishes,
    Andrey Murzov
    the Telerik team

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

Back to Top