Class
MapCallout

Represents a map callout graphical object that displays a speech bubble-like popup with text and image content at a specific geographic location.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

cs-api-definition
public class MapCallout : MapPathBasedVisualElement, IClusterable, IBorderElement, IBoxStyle, IBoxElement, IFillElement, ITextElement, IShapedElement

Inheritance: objectMapVisualElementMapPathBasedVisualElementMapCallout

Derived Classes: MapHtmlCallout

Implements: IBorderElementIBoxElementIBoxStyleIClusterableIFillElementIShapedElementITextElement

Inherited Members MapPathBasedVisualElement.ViewportChanged(IMapViewport, ViewportChangeAction)MapPathBasedVisualElement.HitTest(PointG, PointL, IMapViewport)MapPathBasedVisualElement.GetVisualElementInfo(IMapViewport)MapPathBasedVisualElement.ResetGraphicsPathCache()MapPathBasedVisualElement.IsInViewportMapPathBasedVisualElement.LocationMapVisualElement.GetGeographicBounds()MapVisualElement.GetCurrentShape()MapVisualElement.GeographicBoundsMapVisualElement.LayerMapVisualElement.IsVisibleMapVisualElement.IsSelectedMapVisualElement.TagMapVisualElement.BackColorMapVisualElement.BackColor2MapVisualElement.BackColor3MapVisualElement.BackColor4MapVisualElement.NumberOfColorsMapVisualElement.GradientAngleMapVisualElement.GradientPercentageMapVisualElement.GradientPercentage2MapVisualElement.GradientStyleMapVisualElement.SizeMapVisualElement.SmoothingModeMapVisualElement.BorderColorMapVisualElement.BorderColor2MapVisualElement.BorderColor3MapVisualElement.BorderColor4MapVisualElement.InnerColorMapVisualElement.InnerColor2MapVisualElement.InnerColor3MapVisualElement.InnerColor4MapVisualElement.BoxStyleMapVisualElement.BorderDrawModeMapVisualElement.BorderDashStyleMapVisualElement.BorderDashPatternMapVisualElement.LeftColorMapVisualElement.LeftShadowColorMapVisualElement.TopColorMapVisualElement.TopShadowColorMapVisualElement.RightColorMapVisualElement.RightShadowColorMapVisualElement.BottomColorMapVisualElement.BottomShadowColorMapVisualElement.BorderWidthMapVisualElement.LeftWidthMapVisualElement.TopWidthMapVisualElement.RightWidthMapVisualElement.BottomWidthMapVisualElement.OffsetMapVisualElement.BorderSizeMapVisualElement.HorizontalWidthMapVisualElement.VerticalWidthMapVisualElement.ForeColorMapVisualElement.FontMapVisualElement.ToolTipTextMapVisualElement.RawResourceMapVisualElement.Shape

Constructors

MapCallout(MapVisualElement)

Initializes a new instance of the MapCallout class that adorns the specified map visual element with automatic entity reference resolution.

Declaration

cs-api-definition
public MapCallout(MapVisualElement element)

Parameters

element

MapVisualElement

The MapVisualElement that this callout will adorn and position relative to.

MapCallout(PointG)

Initializes a new instance of the MapCallout class at the specified geographic location with default appearance settings.

Declaration

cs-api-definition
public MapCallout(PointG location)

Parameters

location

PointG

The PointG geographic location where the callout will be positioned on the map.

Fields

drawText

Declaration

cs-api-definition
protected string drawText

Field Value

string

Properties

Distance

Gets or sets the distance in pixels between the callout bubble and the target element or location, automatically resetting the graphics path cache.

Declaration

cs-api-definition
public int Distance { get; set; }

Property Value

int

Element

Gets the map visual element that this callout adorns, providing context for positioning and entity reference resolution.

Declaration

cs-api-definition
public MapVisualElement Element { get; }

Property Value

MapVisualElement

Image

Gets or sets the image displayed within the callout bubble, positioned to the left of the text content with automatic layout adjustment.

Declaration

cs-api-definition
public virtual Image Image { get; set; }

Property Value

Image

IsOutline

Gets a value indicating whether this callout uses outline rendering mode, always returning false for filled callout display.

Declaration

cs-api-definition
protected override bool IsOutline { get; }

Property Value

bool

Overrides MapPathBasedVisualElement.IsOutline

MaxWidth

Gets or sets the maximum width in pixels for the callout bubble content, used for text wrapping and layout calculations.

Declaration

cs-api-definition
public int MaxWidth { get; set; }

Property Value

int

Padding

Gets or sets the internal padding around the callout content, affecting the spacing between the border and text or image elements.

Declaration

cs-api-definition
public Padding Padding { get; set; }

Property Value

Padding

Text

Gets or sets the text content displayed in the callout, with automatic entity reference resolution for MapPoint extended data properties.

Declaration

cs-api-definition
public override string Text { get; set; }

Property Value

string

Overrides MapVisualElement.Text

Methods

CreateVisualElementInfo(IMapViewport)

Creates the visual element information including the speech bubble graphics path with pointer and positioning offset for the callout display.

Declaration

cs-api-definition
protected override MapVisualElementInfo CreateVisualElementInfo(IMapViewport viewport)

Parameters

viewport

IMapViewport

The IMapViewport used for calculating pixel coordinates and callout dimensions.

Returns

MapVisualElementInfo

A MapVisualElementInfo containing the speech bubble path and offset information for the callout.

Overrides MapPathBasedVisualElement.CreateVisualElementInfo(IMapViewport)

MeasureText(Graphics, IMapViewport)

Measures the text content size for layout calculations, considering the maximum width constraint and font settings.

Declaration

cs-api-definition
protected virtual SizeF MeasureText(Graphics graphics, IMapViewport viewport)

Parameters

graphics

Graphics

The Graphics context used for text measurement.

viewport

IMapViewport

The IMapViewport providing context for measurement calculations.

Returns

SizeF

A SizeF representing the measured text dimensions within the maximum width constraint.

Paint(IGraphics, IMapViewport)

Paints the complete callout including the speech bubble shape, fill, border, image, and text content with wraparound support for world maps.

Declaration

cs-api-definition
public override void Paint(IGraphics graphics, IMapViewport viewport)

Parameters

graphics

IGraphics

The IGraphics context used for rendering the callout.

viewport

IMapViewport

The IMapViewport providing zoom level, pan offset, and wraparound information.

Overrides MapVisualElement.Paint(IGraphics, IMapViewport)

PaintText(IGraphics, IMapViewport)

Paints the text content within the callout bubble with proper positioning relative to any image content and wraparound support.

Declaration

cs-api-definition
protected virtual void PaintText(IGraphics graphics, IMapViewport viewport)

Parameters

graphics

IGraphics

The IGraphics context used for rendering the text.

viewport

IMapViewport

The IMapViewport providing positioning and wraparound information for text rendering.

ResolveEntityReferences(MapPoint)

Resolves entity references in the callout text by replacing placeholders like [$property] with actual values from the MapPoint's extended data.

Declaration

cs-api-definition
protected virtual void ResolveEntityReferences(MapPoint point)

Parameters

point

MapPoint

The MapPoint containing extended data for entity reference resolution, or null if no data is available.