ESRI Toolkit Compass not visible in Release mode

256
3
09-15-2021 10:45 PM
KrishnaShinde
New Contributor II

We are running a Xamarin Forms application targeting UWP and on one of the map screens we display the Compass from ESRI Toolkit. The compass appears on the map but is not displayed when we launch the application in Release mode.

Debug mode:

KrishnaShinde_0-1631771061962.png

 

Release mode:

KrishnaShinde_1-1631771119135.png

 

 

0 Kudos
3 Replies
NathanCastle1
Esri Contributor

I'm sorry you're experiencing this problem.

Can you please share some more details about your project?

  • Which versions of Xamarin.Forms, ArcGIS Runtime, and Toolkit are you using?
  • What is the XAML you are using to show the compass? Is the AutoHide property on the compass set?
  • Which architecture (x86, x64, ARM) are you using to build the project?
  • Which version of Visual Studio are you using to build?

Those details will help me reproduce and hopefully fix the issue.

0 Kudos
KrishnaShinde
New Contributor II

Hi @NathanCastle1 

Thanks for replying.

Sorry I should have included them when I created the post.
Following are details

  • Xamarin Forms - 4.8.0.1269
  • ArcGIS Runtime - 100.9.0
  • Toolkit - 100.9.0
  • Visual studio - 16.11.2
  • Architecture used to build project - x64

 

XAML code: AutoHide property is set to false

<esriTK:Compass Margin="20"
                GeoView="{x:Reference MyMapView}" 
                WidthRequest="30" 
                HeightRequest="30"
                AutoHide="False" 
                x:Name="compass" />

 

0 Kudos
NathanCastle1
Esri Contributor

Apologies for the late response, it took me longer than expected to narrow down the issue.

If you open App.xaml.cs in your UWP project (not the shared project) you should see a line like the following in the OnLaunched method:

Xamarin.Forms.Forms.Init(e,  new Assembly[] { typeof(global::Esri.ArcGISRuntime.Xamarin.Forms.MapView).GetTypeInfo().Assembly });

Replacing that line with the following should solve the problem.

Xamarin.Forms.Forms.Init(e,  new Assembly[] { typeof(global::Esri.ArcGISRuntime.Xamarin.Forms.MapView).GetTypeInfo().Assembly, typeof(global::Esri.ArcGISRuntime.Toolkit.Xamarin.Forms.Compass).GetTypeInfo().Assembly });

 Let me know if that works for you.

0 Kudos