Identify Popup - Windows Mobile 10 (UWP)

1584
5
Jump to solution
08-24-2017 05:06 AM
Stefan_Jung
Esri Contributor

Hi,

currently I am trying to implement popups for an Windows Mobile 10 UWP Application.

I saw the simple popup sample Popups in ArcGIS Runtime SDK for .NET  from Antti Kajanus‌.

This is working fine, when starting the application on the mobile emulator. But when deploying the applicaton to the Windows 10 Mobile the popup is not shown at all. 

The Identify works fine, the feature will be selected, there is no error at all, but the popup is not shown. 

Any idea what could be the reason? Maybe problems with z-value, but why is it working fine on the emulator.

Regards

Stefan

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
dotMorten_esri
Esri Notable Contributor

Thanks. I finally managed to track this down after lots of head-scratching. It turns out this is a bug in the ARM JIT compiler: https://github.com/dotnet/coreclr/issues/12503

This specific bug breaks LocationToScreen which the callout logic relies on.

On the up-side: If you build in release build (which uses the .NET Native compiler instead of JIT), the problem goes away. So this is really only an issue while debugging a debug version of your app.

View solution in original post

5 Replies
dotMorten_esri
Esri Notable Contributor

Does the new 100.1 built-in callout work for you? It's a much simpler way to display popups:

            mapView.ShowCalloutAt(
                new MapPoint(0, 0, SpatialReferences.Wgs84),
                new UI.CalloutDefinition("Center of the world"));

0 Kudos
Stefan_Jung
Esri Contributor
What I want to show is a popup with more information that just a single text.
From the IdentifyLayerResult I am reading the PopupDefinition to display only the Fields that are configured to be shown within a popup.
I also tried to just use the GeoElement from the IdentifyLayerResult to display the Callout, but it does show an empty Popup.
Should this display all Attributes within the CallOut?
MapView.ShowCalloutAt(p, new CalloutDefinition(geoElement));
0 Kudos
Stefan_Jung
Esri Contributor
First of all I was trying to test the ShowCalloutAt on the Mobile Device with a simple Text Message:
MapView.ShowCalloutAt(p, new CalloutDefinition("Hallo"));
This works fine on the Emulator but also does not work on the Mobile Device.
When moving around the map i was able to see, that it is a problem with the positioning of the popup. The anchor point of the popup is always the left upper corner of the map and not where the the feature is located.
The MapPoint (p) has a correct coordinate and spatial reference.
Any Idea what could cause the problem with the anchor point?
0 Kudos
Stefan_Jung
Esri Contributor

The behavior is reproducible:

[BUG-000107699 : MapView.ShowCalloutAt doesn't place the Callout at the defined MapPoint when running on Windows Phone]

0 Kudos
dotMorten_esri
Esri Notable Contributor

Thanks. I finally managed to track this down after lots of head-scratching. It turns out this is a bug in the ARM JIT compiler: https://github.com/dotnet/coreclr/issues/12503

This specific bug breaks LocationToScreen which the callout logic relies on.

On the up-side: If you build in release build (which uses the .NET Native compiler instead of JIT), the problem goes away. So this is really only an issue while debugging a debug version of your app.