POST
|
Graphic 1 (dashed line, failure case) Graphic Spatial ref = SpatialReference[Wkid=4326], Map spatial ref = SpatialReference[Wkid=102100] The Graphic Geometry is a Polyline with 1 parts, and 20+ points Graphic 2 (triangle, working case) Graphic Spatial ref = SpatialReference[Wkid=4326], Map spatial ref = SpatialReference[Wkid=102100] The Graphic Geometry is a MapPoint
... View more
10-25-2017
11:17 AM
|
0
|
1
|
160
|
POST
|
I'm getting the exception below when calling ShowCalloutForGeoElement. I assume I'm doing something incorrectly but I'm unable to figure out what. If I click on the dashed line in the screenshot I receive the exception at the bottom. However, if I click on the triangle I do not get the exception. I'm using v100.1 with WPF. Any guidance would be appreciated. Thank you. Code Sample: private async void MyMapViewOnGeoViewTapped ( object o , GeoViewInputEventArgs geoViewInputEventArgs ) { MyMapView . DismissCallout ( ) ; foreach ( var graphicsOverlay in MyMapView . GraphicsOverlays ) { var result = await MyMapView . IdentifyGraphicsOverlayAsync ( graphicsOverlay , geoViewInputEventArgs . Position , 10 , false , 1 ) ; if ( result . Graphics . Count >= 1 ) { // Create a new callout definition using the formatted string var myCalloutDefinition = new CalloutDefinition ( "Title" , "Detailed text" ) ; // Display the callout MyMapView . ShowCalloutForGeoElement ( result . Graphics [ 0 ] , geoViewInputEventArgs . Position , myCalloutDefinition ) ; geoViewInputEventArgs . Handled = true ; break ; } } } Screenshot: Exception: Exception : [ 10 / 25 / 2017 2 : 22 : 23 PM ] [ High ] System . ArgumentException : Value does not fall within the expected range . at Esri . ArcGISRuntime . Geometry . GeometryUtils . ValidateSpatialReference ( SpatialReference inSR1 , SpatialReference inSR2 , Boolean ignoreNulls ) at Esri . ArcGISRuntime . Geometry . GeometryEngine . NearestCoordinate ( Geometry geometry , MapPoint point ) at Esri . ArcGISRuntime . UI . Controls . GeoView . < ShowCalloutForGeoElement > d__65 . MoveNext ( ) -- - End of stack trace from previous location where exception was thrown -- - at System . Runtime . ExceptionServices . ExceptionDispatchInfo . Throw ( ) at System . Windows . Threading . ExceptionWrapper . InternalRealCall ( Delegate callback , Object args , Int32 numArgs ) at System . Windows . Threading . ExceptionWrapper . TryCatchWhen ( Object source , Delegate callback , Object args , Int32 numArgs , Delegate catchHandler ) at System . Windows . Threading . DispatcherOperation . InvokeImpl ( ) at MS . Internal . CulturePreservingExecutionContext . CallbackWrapper ( Object obj ) at System . Threading . ExecutionContext . RunInternal ( ExecutionContext executionContext , ContextCallback callback , Object state , Boolean preserveSyncCtx ) at System . Threading . ExecutionContext . Run ( ExecutionContext executionContext , ContextCallback callback , Object state , Boolean preserveSyncCtx ) at System . Threading . ExecutionContext . Run ( ExecutionContext executionContext , ContextCallback callback , Object state ) at MS . Internal . CulturePreservingExecutionContext . Run ( CulturePreservingExecutionContext executionContext , ContextCallback callback , Object state ) at System . Windows . Threading . DispatcherOperation . Invoke ( ) at System . Windows . Threading . Dispatcher . ProcessQueue ( ) at System . Windows . Threading . Dispatcher . WndProcHook ( IntPtr hwnd , Int32 msg , IntPtr wParam , IntPtr lParam , Boolean & handled ) at MS . Win32 . HwndWrapper . WndProc ( IntPtr hwnd , Int32 msg , IntPtr wParam , IntPtr lParam , Boolean & handled ) at MS . Win32 . HwndSubclass . DispatcherCallbackOperation ( Object o ) at System . Windows . Threading . ExceptionWrapper . InternalRealCall ( Delegate callback , Object args , Int32 numArgs ) at System . Windows . Threading . ExceptionWrapper . TryCatchWhen ( Object source , Delegate callback , Object args , Int32 numArgs , Delegate catchHandler ) at System . Windows . Threading . Dispatcher . LegacyInvokeImpl ( DispatcherPriority priority , TimeSpan timeout , Delegate method , Object args , Int32 numArgs ) at MS . Win32 . HwndSubclass . SubclassWndProc ( IntPtr hwnd , Int32 msg , IntPtr wParam , IntPtr lParam ) at MS . Win32 . UnsafeNativeMethods . DispatchMessage ( MSG & msg ) at System . Windows . Threading . Dispatcher . PushFrameImpl ( DispatcherFrame frame ) at System . Windows . Application . RunDispatcher ( Object ignore ) at System . Windows . Application . RunInternal ( Window window ) at EdgeTech . OperatorConsole . App . Main ( ) An unhandled exception of type 'System.ArgumentException' occurred in mscorlib . dll Value does not fall within the expected range .
... View more
10-25-2017
07:26 AM
|
0
|
5
|
754
|
POST
|
Can someone please explain the major differences between Callouts and Popups and when they should be used? Thank you. I'm using v100.1 WPF
... View more
10-25-2017
07:07 AM
|
0
|
11
|
1285
|
POST
|
Jennifer, I was able to use INotifyPropertyChanged instead of dependency properties. Thank you.
... View more
09-09-2017
07:18 AM
|
0
|
0
|
16
|
POST
|
Jennifer, The IdentifyGraphicsOverlayAsync method only allows for a square to be specified where GraphicsOverlay.HitTestAsync Method (ViewBase, Rect, Int32) allows a rectangle. Our use case is allowing the user to drag a selection rectangle on the map to select objects.
... View more
09-08-2017
11:46 AM
|
0
|
3
|
18
|
POST
|
Jennifer, I have a wrapper class around esri Layer that was binding to the dependency properties in Layer. I think I can do something similar by forwarding the properties and listening to change notifications. I'll investigate.
... View more
09-08-2017
10:07 AM
|
0
|
1
|
16
|
POST
|
Is there a replacement for GraphicsOverlay.HitTestAsync Method (ViewBase, Rect, Int32) in runtime 100.1?
... View more
09-08-2017
09:25 AM
|
0
|
5
|
359
|
POST
|
The Layer dependency properties seem to be gone in 100.1? Was that intentional? Is there an alternative approach for binding to Layer properties? Thanks. 10.2.7 Layer Class 100.1 Layer Class
... View more
09-08-2017
06:07 AM
|
0
|
4
|
193
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|