Hello, I would like to immediately apologize for my English.
I am having the following problem.
I use FileBitmapTileCache and it works, but..
However, when I add new features to the map, there is no refreshing. A redrawing occurs after a change of scale. I called the main function such as mainLayer.Refresh(), but it isn't work. All features added to map when scale is changing((
Samples:
private void Window_Loaded(object sender, RoutedEventArgs e)
{
WorldMapKitWmsWpfOverlay worldMapKitOverlay = new WorldMapKitWmsWpfOverlay();
wpfMap1.Overlays.Add(worldMapKitOverlay);
this.mainOverlay = new LayerOverlay();
bitmapTileCache = new FileBitmapTileCache();
bitmapTileCache.CacheDirectory = @"..\..\SampleCache;
bitmapTileCache.CacheId = "CacheTiles";
bitmapTileCache.TileAccessMode = TileAccessMode.ReadAddDelete;
bitmapTileCache.ImageFormat = TileImageFormat.Png;
this.mainOverlay.TileCache = bitmapTileCache;
wpfMap1.Overlays.Add("InmemoryOverlay", this.mainOverlay);
wpfMap1.Refresh();
}
private void LoadNewDataAndRefresh()
{
#region House Data Load
if (this.mainOverlay.Layers.Contains(ResourceLayerName.HouseLayer))
{
InMemoryFeatureLayer houseLayer = this.mainOverlay.Layers[ResourceLayerName.HouseLayer] as InMemoryFeatureLayer;
//Here I get a layer that was previously added to the main layer and add some new features from BD to this layer.
wpfMap1.Refresh();
}
#endregion
}
This sample is using cache, but refreshing the map (maybe use cache files), but files are updated after that scale changed(((
If the issue was not clear, you can send me an email a working apllication of Wpf Desktop Edition using FileBitmapTileCache.
Thank you very much