Hello,
I used a plugin in ArcGIS Pro 3.2, and after migrating it to ArcGIS Pro 3.3, my esriaddinx plugin no longer worked. When I examined the source code, I noticed a new error message:
Error message : "Gravité Code Description Projet Fichier Ligne État de la suppression
Erreur CS0508 'ShowCoordinatesTool.HandleMouseDownAsync(MapViewMouseButtonEventArgs)' : le type de retour doit être 'Task' pour correspondre au membre substitué"
in English (translated) : "Severity Code Description Project File Line Deletion Status Error CS0508 'ShowCoordinatesTool.HandleMouseDownAsync(MapViewMouseButtonEventArgs)': return type must be 'Task' to match overridden member."
Did you notice the same issue ?
protected override Task HandleMouseDownAsync(MapViewMouseButtonEventArgs e) { ....//Get the instance of the ViewModel ....var vm = OverlayEmbeddableControl as EmbeddedControlViewModel; ....if (vm == null) ........return Task.FromResult(0); //changé le 23/05/2024 pour test ........//return Task.CompletedTask; ....//Get the map coordinates from the click point and set the property on the ViewModel. ....return QueuedTask.Run(() => ....{ ........var mapPoint = ActiveMapView.ClientToMap(e.ClientPoint); ........var coords = GeometryEngine.Instance.Project(mapPoint, SpatialReferences.WGS84) as MapPoint; ........if (coords == null) return; ........var camera = ActiveMapView.Camera; ........var sb = new StringBuilder(); .... ........var zoom = calculateZoom(96,Convert.ToInt32(camera.Scale),(float)coords.X,1); ........zoom = 100; ........vm.Text = sb.ToString(); ........string YXZcoordinates = coords.Y.ToString().Replace(",", ".") + "," + coords.X.ToString().Replace(",", ".") + "," + zoom.ToString()+"m"; ....}); .... |
