Unfortunately i cant send the whole code because im using postgresql database for my layers, but i can send the partial code.
protected override Task DrawTileAsyncCore(GeoCanvas geoCanvas)
{
geoCanvas.DrawingQuality = DrawingQuality.HighSpeed;
bool show_pointer = false;
if (!mainWindow.IsNewFeatureActive)
{
return base.DrawTileAsyncCore(geoCanvas);
}
if (mainWindow.GetLayerActive().ShapeType is PointShape)
{
if (Point_feature != null)
{
if (mainWindow.GetLayerActive().Input.InputType == "SimplePoint")
{
foreach (FeatureCollection featureCollection in mainWindow.TempFeatureCollection)
{
if (featureCollection.IsSelected)
{
geoCanvas.DrawEllipse(featureCollection.BaseShape.GetCenterPoint(), 3.0f, 3.0f, new GeoPen(new GeoColor(255, GeoColors.BrightYellow), 4.0f), DrawingLevel.LevelOne);
}
else
{
geoCanvas.DrawEllipse(featureCollection.BaseShape.GetCenterPoint(), 3.0f, 3.0f, new GeoPen(new GeoColor(255, GeoColors.Aqua), 3.0f), DrawingLevel.LevelOne);
}
geoCanvas.DrawTextWithScreenCoordinate($"{featureCollection.FeatureLabel}", new GeoFont("Segoe UI", 10.0f, DrawingFontStyles.Bold), GeoBrushes.DarkRed, new GeoPen(GeoColor.FromHtml("#FFFFFF"), 1.5f), (float)MapUtil.ToScreenCoordinate(featureCollection.BaseShape, mapView.CurrentExtent, (float)mapView.ActualWidth, (float)mapView.ActualHeight).GetCenterPoint().X, (float)MapUtil.ToScreenCoordinate(featureCollection.BaseShape, mapView.CurrentExtent, (float)mapView.ActualWidth, (float)mapView.ActualHeight).GetCenterPoint().Y - 10, DrawingLevel.LevelOne);
}
geoCanvas.DrawEllipse(Point_feature, 3.0f, 3.0f, new GeoPen(new GeoColor(255, GeoColors.BrightRed), 3.0f), DrawingLevel.LevelOne);
}
if (mainWindow.GetLayerActive().Input.InputType == "Image")
{
foreach (FeatureCollection featureCollection in mainWindow.TempFeatureCollection)
{
geoCanvas.DrawTextWithScreenCoordinate($"{featureCollection.FeatureLabel}", new GeoFont("Segoe UI", 10.0f, DrawingFontStyles.Bold), GeoBrushes.DarkRed, new GeoPen(GeoColor.FromHtml("#FFFFFF"), 1.5f), (float)MapUtil.ToScreenCoordinate(featureCollection.BaseShape, mapView.CurrentExtent, (float)mapView.ActualWidth, (float)mapView.ActualHeight).GetCenterPoint().X, (float)MapUtil.ToScreenCoordinate(featureCollection.BaseShape, mapView.CurrentExtent, (float)mapView.ActualWidth, (float)mapView.ActualHeight).GetCenterPoint().Y - 10, DrawingLevel.LevelOne);
}
if (!is_edit)
{
geoCanvas.DrawWorldImage(new GeoImage(@"Assets/DT_RIGHT_CYAN.png"), Point_feature.GetShape().GetCenterPoint().X, Point_feature.GetShape().GetCenterPoint().Y, 24, 24, DrawingLevel.LevelFour, 0, 0, 0);
}
else
{
geoCanvas.DrawEllipse(Point_feature, 3.0f, 3.0f, new GeoPen(new GeoColor(255, GeoColors.BrightRed), 3.0f), DrawingLevel.LevelOne);
}
}
}
return base.DrawTileAsyncCore(geoCanvas);
}
return base.DrawTileAsyncCore(geoCanvas);
}