Select to view content in your preferred language

Gray Map on .NET Runtime SDK WPF App on Getac E100

1989
1
05-23-2016 11:12 PM
GiorgioCassina
New Contributor

Hi Everyone,

i'm struggling with this problem.

Have developed a simple base map application in WPF using .NET Runtime SDK 10.2.7 and VS2012.

Everything is working fine on my my developer PC (Win10); tested also on PCs with Win8 and Win7 and all it's OK.

Then I try to deploy the application on a GETAC E100​ (which on paper fullfills all the ArcGIS runtime SDK requirements).

What happens is that the application runs without any error (I mean nowhere, MS event viewer, directX logs, nothing !!!) but the map remain simply GRAY !!! I can move the mouse on the map and I see the coordinates changing; I can even zoom pinching with my fingers: everything works but the map is gray; I don't even see the base grids.

The application loads a simple TPK package I prepared using the ESRI Samples (ExportTileCache sample).

Here is the loading code:

XAML

<esri:MapView x:Name="myMapView" WrapAround="True" Grid.Column="1" BorderBrush="#FF7F7F7F" Margin="0,0,5,5" Style="{StaticResource NoLogoStyle}">
    <esri:MapView.LocationDisplay>
        <esri:LocationDisplay 
            AutoPanMode="Off"
            DefaultSymbol="{StaticResource NotMovingMarkerSym}" CourseSymbol="{StaticResource MovingMarkerSym}"
            IsEnabled="False" IsPingAnimationEnabled="False">
        </esri:LocationDisplay>
    </esri:MapView.LocationDisplay>
    <esri:Map>
        <!--<esri:MessageLayer ID="MyMessageLayer"/>-->
    </esri:Map>
</esri:MapView>

VB.NET behind code

Public Sub New()
    ' This call is required by the designer.
    InitializeComponent()

    ' Force the spatial reference
    myMapView.Map.SpatialReference = SpatialReference.Create(3857)
End Sub

Private Async Sub MainWindow_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
    ' Load the mission map data
    Await LoadMissionMapData()
End Sub

Private Async Function LoadMissionMapData() As Task
    Try
        Dim misDataFile As String = System.AppDomain.CurrentDomain.BaseDirectory + My.Settings.MissionDataFolder + "\" + My.Settings.MissonDataFile
        Dim ltLayer = New ArcGISLocalTiledLayer(misDataFile)
        If ltLayer IsNot Nothing Then
            AddHandler myMapView.LayerLoaded, AddressOf MissionDataLoaded
            myMapView.Map.Layers.Add(ltLayer)
        End If
    Catch ex As Exception
        MessageBox.Show("Error: Could not read file from disk. Original error: " + ex.Message)
    End Try
End Function

Private Async Sub MissionDataLoaded(sender As Object, e As LayerLoadedEventArgs)
    If e.LoadError IsNot Nothing Then
        Utils.WriteException(e.LoadError)
    End If
    If e.Layer IsNot Nothing AndAlso e.Layer.Status = LayerStatus.Initialized AndAlso e.Layer.DisplayName = "Mission Data" Then
        myMapView.MaximumExtent = e.Layer.FullExtent
        If myMapView.Map.SpatialReference Is Nothing Then
            Utils.WriteLog("WKID undefined")
        End If
    End If
End Sub


Please, any help ?

0 Kudos
1 Reply
GiorgioCassina
New Contributor

Just for adding some more info.....

This is very strange !!!!!

If I connect to GETAC E100 via remote desktop and launch the application I can see the map correctly. Then I leave the app open and log back phisically to the Getac regain local control. MAGIC: I can see correctly the map on the application. I can zoom, I can pan and all is fine. If I close the application and rerun it I come back to the gray map !!!

What happens ?????

0 Kudos