3 Answers, 1 is accepted
0
Hi Jason,
I think this is the correct way, but you can just reassign the provider instead of removing it and adding it again. The sample code is below.
The alternative is to invalidate tiles which are returned from the GetTile method using the InvalidateTileLayer method of the Tiled Map Source. Its implementation is more difficult and it will take more time than the above approach, because the InvalidateTileLayer method should be called for each tile.
Best wishes,
Andrey Murzov
the Telerik team
I think this is the correct way, but you can just reassign the provider instead of removing it and adding it again. The sample code is below.
Private
Sub
Button1_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.Windows.RoutedEventArgs)
Handles
Button1.Click
Dim
loVedaProvider
As
New
VedaProvider
RadMap1.Providers.Item(1) = loVedaProvider
End
Sub
The alternative is to invalidate tiles which are returned from the GetTile method using the InvalidateTileLayer method of the Tiled Map Source. Its implementation is more difficult and it will take more time than the above approach, because the InvalidateTileLayer method should be called for each tile.
Best wishes,
Andrey Murzov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Jason D
Top achievements
Rank 1
Veteran
answered on 08 Aug 2011, 05:17 PM
I've tried re-assigning the layer a couple of times now, but with no success. It would be really nice to have a method to force a provider to refresh. For example, I found a bug (ticket coming later), where the provider wasn't being drawn. They only way I found to force it to redraw was by doing something that caused the layout to change:
moMap.Margin = New Windows.Thickness(1)
moMap.UpdateLayout()
moMap.Margin = New Windows.Thickness(0)
moMap.Margin = New Windows.Thickness(1)
moMap.UpdateLayout()
moMap.Margin = New Windows.Thickness(0)
0
Hi Jason,
Thank you for the feedback. We have created a PITS issue to fix the problem. You can track it using the following link:
http://www.telerik.com/support/pits.aspx#/public/wpf/7298
The map should be drawn automatically. As a workaround you can change the Center property of RadMap to re-draw the map. The sample code is below.
Best wishes,
Andrey Murzov
the Telerik team
Thank you for the feedback. We have created a PITS issue to fix the problem. You can track it using the following link:
http://www.telerik.com/support/pits.aspx#/public/wpf/7298
The map should be drawn automatically. As a workaround you can change the Center property of RadMap to re-draw the map. The sample code is below.
Private
Sub
Button1_Click(
ByVal
sender
As
System.
Object
,
ByVal
e
As
System.Windows.RoutedEventArgs)
Handles
Button1.Click
Dim
loVedaProvider
As
New
VedaProvider
RadMap1.Providers.Add(loVedaProvider)
Dim
center
As
Location = RadMap1.Center
RadMap1.Center =
New
Location(0, 0)
RadMap1.Center = center
End
Sub
Best wishes,
Andrey Murzov
the Telerik team
Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>