shapefile uri/location

3 posts, 0 answers
  1. Wyatt
    Wyatt avatar
    22 posts
    Member since:
    Aug 2012

    Posted 05 Aug 2014 Link to this post

    when trying to add a shapefile layer I keep getting not found errors.  what should the uri look like and where do the shapefiles go?

    do the go in the web harness part of the project or the xaml part? and the URI what should that be?


        <telerik:MapShapeReader DataSource="PhysicalLocations;/ClientBin/cb_2013_us_state_500k.dbf"
                                                Source="PhysicalLocations;/ClientBin/cb_2013_us_state_500k.shp"
                                                PreviewReadCompleted="MapShapeReader_PreviewReadCompleted">
                            
                        </telerik:MapShapeReader>
  2. Pavel R. Pavlov
    Admin
    Pavel R. Pavlov avatar
    1182 posts

    Posted 05 Aug 2014 Link to this post

    Hi Wyatt,

    You can include the shape-file (.shp and .dbf) to the Silverlight project as Resources. In this case you should set the Uri format like to the following:
    /Assembly Name;component/Path/File Name.

    Or can include the shape-file to the web project as Content. In a case, when the shape-file is placed on the web site then you can use the the following Uri format:
    Path/File Name.

    Regards,
    Andrey Murzov 
    Telerik

     
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  3. DevCraft banner
  4. Wyatt
    Wyatt avatar
    22 posts
    Member since:
    Aug 2012

    Posted 07 Aug 2014 in reply to Pavel R. Pavlov Link to this post

    is there some additional setting?  I have the files in a folder in the web project under ClientBin/cb_2013_us_state_500k.dbf and ClientBin/cb_2013_us_state_500k.shp and have tried the following iterations. all come back as not found? I was able to do it successfully in a wpf project, just not a sliverlight website.

    I also have Copy to output directory set to copy always

    DataSource="../ClientBin/cb_2013_us_state_500k.dbf"
                                                Source="../ClientBin/cb_2013_us_state_500k.shp"

    DataSource="~/ClientBin/cb_2013_us_state_500k.dbf"
                                                Source="~/ClientBin/cb_2013_us_state_500k.shp"

    DataSource="/ClientBin/cb_2013_us_state_500k.dbf"
                                                Source="/ClientBin/cb_2013_us_state_500k.shp"

    DataSource="ClientBin/cb_2013_us_state_500k.dbf"
                                                Source="ClientBin/cb_2013_us_state_500k.shp"
Back to Top