I've seen this post: http://www.telerik.com/forums/hotspot-for-pushpin-image-w-info-bubble but it doesn't quite meet my needs. The example uses InformationLayer but I want to use Visualization Layers - do hotspots work the same in both layer types?
I'm trying display a collection of images on a map (on a VisualizationLayer). I also want to display a "label" for each image, and the label has various properties I can set (font size, color, offset, offset, enclosed by border, with line from border to image). The attached image gives an idea of what I'm trying to do.
I've tried binding the hotspot offsets to values in my viewmodel, but it seems like they get ignored, but it works if I put constant values for the hotspot in the xaml
e.g. this works:
<
telerik:MapLayer.HotSpot
>
<
telerik:HotSpot
x:Name
=
"hotSpot"
XUnits
=
"Pixels"
YUnits
=
"Pixels"
X
=
"200"
Y
=
"200"
ElementName
=
"LabelText"
/>
</
telerik:MapLayer.HotSpot
>
but this doesn't:
<
telerik:MapLayer.HotSpot
>
<
telerik:HotSpot
x:Name
=
"hotSpot"
XUnits
=
"Pixels"
YUnits
=
"Pixels"
X
=
"{Binding LabelOffsetX}"
Y
=
"{Binding LabelOffsetY}"
ElementName
=
"LabelText"
/>
</
telerik:MapLayer.HotSpot
>
I need a way to dynamically change the offsets for individual items. What am I doing something wrong? I've attached a sample app to show this problem.
Thanks,
Pete