laptop and a wrench

Bogue

In ArcGIS Maps SDK for .NET in a .NET MAUI app, labels for polylines display upside down when rotating the map

ArcGIS Maps SDK for .NET
Numéro d’ID de bogue BUG-000175276
EnvoiMarch 24, 2025
Dernière modificationApril 17, 2025
S’applique àArcGIS Maps SDK for .NET
Version trouvée200.6
Système d’exploitationWindows OS
Version du système d’exploitation10.0 64 Bit
StatutIn Review

Solution de contournement

Calculate the centroid of the polyline and label the point graphics instead of the polyline using the methods below:

public MapPoint GetPolylineCenterPoint(Polyline polyline)

{

  // Ensure the polyline has points

  if (polyline.Parts.Count == 0 || polyline.Parts.First().Points.Count == 0)

  {

    return null;

  }

  // Flatten all points in the polyline

  var allPoints = polyline.Parts.SelectMany(part => part.Points).ToList();

  // Calculate the average of the X and Y coordinates

  double avgX = allPoints.Average(point => point.X);

  double avgY = allPoints.Average(point => point.Y);

  // Create and return the center point

  return new MapPoint(avgX, avgY, polyline.SpatialReference);

}

Étapes pour reproduire

ID de bogue: BUG-000175276

Logiciel:

  • ArcGIS Maps SDK for .NET

Recevoir une notification lorsque le statut d’un bogue change

Télécharger l’application Esri Support

En savoir plus sur ce sujet

Obtenir de l’aide auprès des experts ArcGIS

Contacter le support technique

Télécharger l’application Esri Support

Accéder aux options de téléchargement