Problem publish shape files

2 posts, 0 answers
  1. Sasa Grebenar
    Sasa Grebenar avatar
    8 posts
    Member since:
    Sep 2012

    Posted 03 Feb 2011 Link to this post

    I have problem when I made publish of my project which show esri shape files. When I start project in VS2010 everything work ok and I see shape file ok but when I publish it application work ok but I don't see shape file. I publish project to 
    http://**** .

    I found that 'MapShapeReader_PreviewReadCompleted' which I defined for MapShapeReader never fire on published version

    <my:EmptyProvider MinZoomLevel="3" MaxZoomLevel="20" />

    I use RadControls version 2010.3.1110.1040

    Would you be so kind to help me. I need to show my project next week and this is very urgent to me..

    Best regards



    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://***


    <UserControl x:Class="eProjekt.MainPage" 
                 <my:EmptyProvider MinZoomLevel="3" MaxZoomLevel="20" />
            <my:MapShapeReader ClearLayer="False" 



    Partial Public Class MainPage 
        Inherits UserControl 
        Private uriArray As Uri() = {New Uri("../ShapeFiles/shape1.shp", UriKind.RelativeOrAbsolute),
        New Uri("../ShapeFiles/shape2.shp", UriKind.RelativeOrAbsolute),
        New Uri("../ShapeFiles/shape3.shp", UriKind.RelativeOrAbsolute)} 
    Private Sub MapShapeReader_PreviewReadCompleted(ByVal sender As Object, ByVal eventArgs As Telerik.Windows.Controls.Map.PreviewReadShapesCompletedEventArgs) 
            Dim shapeReader As MapShapeReader = TryCast(sender, MapShapeReader)
            If shapeReader.Source Is uriArray(0) Then
            End If
    End Sub
    End Class



  2. Andrey
    Andrey avatar
    1681 posts

    Posted 08 Feb 2011 Link to this post

    Hello Sasa Grebenar,

    It is very complicated and it is hard to reproduce the problem using just a code snippet you sent.
    Most often this problem occurs in published projects when MIME types for shape and dbf files are not defined on the web server. Please check that MIME types for using shape files are defined:
    Extensions: .shp and .dbf
    MIME type: application/octet-stream

    The version you use does not fire the PreviewReadCompleted event when an error occurs during loading of shape files. You can use the ReadCompleted event to check the eventArgs.Error property that returns the exception when it occurs.

    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>>
Back to Top