I'd like to use the VisualizationLayer, in a geocoding application situation. We start with a number of data objects that do not have lat/long data, then add that data, and ideally animate them as they appear on the map.
These data objects are in an observable collection, and are represented with the following data template:
<
DataTemplate
x:Key
=
"MyDataModelTemplate"
DataType
=
"{x:Type models:MyDataModel}"
>
<
Viewbox
x:Name
=
"PART_Shape"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
>
<
telerik:MapLayer.Location
>
<
MultiBinding
Converter
=
"{StaticResource LatitudeLongitudeToLocationMultiConverter}"
>
<
Binding
Path
=
"Latitude"
/>
<
Binding
Path
=
"Longitude"
/>
</
MultiBinding
>
</
telerik:MapLayer.Location
>
<
telerik:MapLayer.HotSpot
>
<
telerik:HotSpot
X
=
"0.5"
Y
=
"0.5"
/>
</
telerik:MapLayer.HotSpot
>
<
Ellipse
Fill
=
"DodgerBlue"
Width
=
"15"
Height
=
"15"
StrokeThickness
=
"1"
Stroke
=
"Black"
ToolTip
=
"{Binding DisplayName}"
>
</
Ellipse
>
</
Viewbox
>
</
DataTemplate
>
The converter returns Location.Empty when the latitude or longitude are null (they are nullable doubles), otherwise it just returns the Telerik Location object that correspondes to those properties.
Here's my problem:
When a location moves from a valid location to another valid location, the ellipse moves accordingly based on the above binding. But when a location changes from Location.Empty to a valid location, it does not immediately appear. The user must change zoom levels in order for the location to appear.
Is this a bug in the RadMap control or am I doing something wrong?
Thank you,
Alan