public BitmapSource CreateOSMPictureWithOverLoadsViaKachel(MapKachel RootKachel, List<Marker> MarkersToOverlay, DrawMarkerEvent DrawMarkerHandler, GraphicSize RequestedGraphicSize) { GeometryInfo GeoInfo = new GeometryInfo(); //MapBasics.Instance.DrawMarkerHandler = DrawMarkerHandler; CalcGeometry(GeoInfo, RootKachel.MapBitmapImage.Width, RootKachel.MapBitmapImage.Height, RootKachel.GeographicalTopLeft.X, RootKachel.GeographicalTopLeft.Y, RootKachel.GeographicalBottomRight.X, RootKachel.GeographicalBottomRight.Y, RequestedGraphicSize); List<DrawAbleTrack> Tracks = new List<DrawAbleTrack>(); LoadTracks(MapDataWrapper.Instance.GetAllTracks("OrtsTeil"), "OrtsTeil", Tracks, new Pen(Brushes.Blue, 4)); LoadTracks(MapDataWrapper.Instance.GetAllTracks("Bezirk"), "Bezirk", Tracks, new Pen(Brushes.Red, 7)); MarkersToOverlay.AddRange(GetOrtsTeilDescriptionMarker(RootKachel)); return CreateOSMPictureWithOverLoadsViaGeometryInfo(GeoInfo, Tracks, MarkersToOverlay, DrawMarkerHandler); }
private List<Marker> GetOrtsTeilDescriptionMarker(MapKachel RootKachel) { List<MapKachel> EntriesToHandle = new List<MapKachel>(); if (RootKachel.IsRoot) foreach (MapKachel entry in MapDataWrapper.Instance.MapKachelData) { if (entry.Type == "ROI") EntriesToHandle.Add(entry); } else { EntriesToHandle.Add(RootKachel); } List<Marker> mMarker = new List<Marker>(); foreach (MapKachel MapEntry in EntriesToHandle) { mMarker.Add(new Marker() { Tag = MapEntry, TextToDraw = MapEntry.NameID, TypeToDraw = LogicalAreaType.Text, Lat = MapEntry.GeographicalTextPositionTopY, Lon = MapEntry.GeographicalTextPositionLeftX, ImportanceFactor = MapEntry.TextSizingFactor }); } return mMarker; }