Map Overlay Items
- 3 minutes to read
The map overlay items are containers that allow you to provide a content that should be displayed over the map using Map Overlays.
This topic consists of the following sections.
#Overview
There are two types of map items.
Image Items allow you to display images over the map. The following image demonstrates a map overlay with an image item. These items are represented by the MapOverlayImageItem class.
The following table contains the Image Item specific properties.
Group Properties Content Map Overlay , MapImage Item. Image Overlay , MapImage Item. Image Uri Overlay Image Item. Image Index Text Items allow you to display text over the map. The following image demonstrates a map overlay with a text item.
The following table contains the Text Item specific properties.
Group Properties Appearance Map Overlay , MapText Item. Text Style Overlay Text Item. Text Alignment Content Map Overlay Text Item. Text
#Overlay Item Layout
For overlay items of all types their layout can be customized. At the first, overlay items can be arranged automatically. For this, specify the MapOverlayItemBase.Alignment property to align items. If several items have the same alignment, the MapOverlayItemBase.JoiningOrientation property configures how to stack items. The following table demonstrates this property in action.
Important
The Map
The Property Value | The Resulting Image |
---|---|
Joining |
![]() |
Joining |
![]() |
If it is required to locate an item to the specific position with specific size manually, configure the MapOverlayItemBase.Location and MapOverlayItemBase.Size properties.
Moreover, the MapOverlayItemBase.Padding and MapOverlay.Margin properties allows you can specify required values of margin and padding.
Note
If the item size is specified manually, then the total size is calculated as size plus padding. In the same way, if location is specified manually, the actual location of an item is dependent on the location and margin.
Also, the location of an item is dependent on the alignment. For example, if Map
#Overlay Item Appearance
To customize item appearance, use the MapOverlayItemBase.BackgroundStyle property. In addition it is possible to specify the background style when an item is hit tested. To do this, modify the MapOverlayItemBase.HotTrackedStyle property.
The following image demonstrates hot tracked style applied to the text item.
To hide or show the item, specify the reqired value to the MapOverlayItemBase.Visible property.