ThinkGeo.com    |     Documentation    |     Premium Support

Build 391

Hello,


I am noticing as I upgraded to Interim Build 391 to fix a few WFS related bugs that it seems like the AutomaticCache system is either no longer working or is behaving very different now. Also, Zoom behavior seems to be snappier but panning is very bad and when removing a layer or zooming to a particular extent, the map usually doesn't refresh correctly. Is there something up with this build? I restored back to 385 and my normal behavior is fine but it is unfortunately because I have to lose the fixes I desperately need.


Thanks,


Nelson



Nelson,


Following is the main changes since 3.0.392 or later versions compare to previous public release 3.0.362.
 
        1)      Automatic Tile Cache system
Now we have turn off the tile cache system by default in 3.0.392, while it is on in previous email. If you want, you can turn it on by setting TileCache in overlay.
 
We have provided some kinds of TileCache system for use as following:

staticOverlay.TileCache = new FileBitmapTileCache(@"C:\temp");
staticOverlay.TileCache = new InMemoryBitmapTileCache();
staticOverlay.TileCache = new HybridBitmapTileCache(@"C:\temp","StaticOverlay");

 
2)     Preview Tile cache
This is exactly the same with Automatic Tile Cache system.

staticOverlay.PreviewTileCache = new FileBitmapTileCache(@"C:\temp");
staticOverlay.PreviewTileCache = new InMemoryBitmapTileCache();
staticOverlay.PreviewTileCache = new HybridBitmapTileCache(@"C:\temp", "StaticOverlay");

 

                 3)   No delay by default . 


In original versions, the delay is on , while in latest version(3.0.392), the default delay is 0, while you can turn any of them on if you want

winformsMap1.DebugParameters["PanDelay"] = "100";
winformsMap1.DebugParameters["MouseWheelDelay"] = "100";
winformsMap1.DebugParameters["MouseDoubleClickDelay"] = "100";

 
4) Single threaded by default

           We change the default threading mode from MultiThreaded to SingleThreaded.
 
5)  build index
Now we have added the Index for the in memory features to enhance its performance. We suggest using the Edit transaction system to add features to internal features.While when you add the internal features directly, you have to call the BuildIndex to enhance its performance

InMemoryFeatureLayer inMemoryLayer = new InMemoryFeatureLayer();
inMemoryLayer.InternalFeatures.Add("Polygon", new Feature(BaseShape.CreateShapeFromWellKnownData("POLYGON((10 60,40 70,30 85, 10 60))")));
inMemoryLayer.InternalFeatures.Add("Multipoint", new Feature(BaseShape.CreateShapeFromWellKnownData("MULTIPOINT(10 20, 30 20,40 20, 10 30, 30 30, 40 30)")));
inMemoryLayer.InternalFeatures.Add("Line", new Feature(BaseShape.CreateShapeFromWellKnownData("LINESTRING(60 60, 70 70,75 60, 80 70, 85 60,95 80)")));
inMemoryLayer.InternalFeatures.Add("Rectangle", new Feature(new RectangleShape(65, 30, 95, 15)));
inMemoryLayer.BuildIndex();


Any more questions just let me know.




Thanks.
 

Yale



 



I am waiting to get my hands on what I think you are saying is build 392. With 391, I am seeing there is no hybrid option so I will wait to try that out. I tried both the FileBitmapTileCache and InMemory and experienced really bad performance compared with build 385 which is nearly perfect for our application. 
  
 There are supposed to be a couple of important fixes in today’s build though so I am hoping the HybridBitmapTileCache is the equivalent of default behavior to what MapSuite has been doing in 385. 
  
 As soon as I get my hands on the latest build I’ll share some more thoughts… 
  
 One thing I am noticing at least with 391 is that I am unsure if the new caching system is used with a layer using GeoCache if when the user pans to an area outside of the extents already drawn, it is slow enough to seem like Map Suite is ignoring the GeoCache and going straight to the featuresource for anything missing. I am not sure that this is happenign but the performance drop suggests it’s possible.

I am seeing no HybridCache object with build 392 received today… 
  
 With using the InMemoryBitmapTileCache, I am noticing very laggy pan and zoom compared to build 385. This is unfortunate as I am needing certain additions from this build.  
  
 Is it possible to use the old caching method? Is there any way to recreate / reenable it? I would appreciate help with this very much. 
  
 Thank you!

Nelson, 
  
 As I said in my previous post that the cache system is off by default, you can turn it on by setting it. 
  
 Any more questions feel free to let me know. 
 Thanks. 
  
 Yale 


Yale, I am clearly not experiencing this or I would have never posted to begin with… 
  
 There is NO HYBRIDCACHE object for me to create in build 392. Only A File and InMemory version.  
  
 So, to make clear what I mean to say, I tried a FileBitmapTileCache and an InMemoryBitmapTileCache. There was NO HybridBitmapTileCache to try. Surely, not all three of those can be the old caching method. Which one would it be? I am suspecting Hybrid, but without your input it is really just a guess which is what I was trying to find out so that I could develop using this build today.

Nelson,


Sorry for the misunderstanding!
 
We messed something up in 3.0.392 so we missed the HybirdTileCache, it will be included in 3.0.396, sorry for the inconvenience!
 
Currently for the package of 3.0.392, please set it by using the InMemoryBitmapTileCache which will be fast or FileBitmapTileCache which will be obvious to see those tiles in the disk.
 
Feel free let me know if any more questions.
 
Thanks.
 
Yale

With build 396, I do see the HybridgeCache now but I am noticing it is not exactly like the behavior before.  
  
 In particular, Zooming behavior is very awkward now, with a large noticable delay taking place before the map is drawn despite any delay setting being set with MouseWheelDelay. Before the zooming was very quick. How can I restore this? Otherwise, I will have many users wondering why the map has not drawn yet when there is no visible cue to show that the map is even waiting to be drawn. 
  
 Thanks.

I am also now receiving the following error on map.refresh seemingly randomly after having applied a HybridCache to my main overlay and a few layers after the fact and doing some panning and zooming: 
  
 IOException: The directory is not empty. 
  
 Is there no way to use the old caching system exactly as it was, with the zooming behavior being quick and no random exceptions? Our product is due to go live late next week and I need certain changes that have been incorporated into these builds but now am struggling with this cache type issues… I just want Map Suite to perform and behave the way it had with build 385 while also incorporating the missing column fix for WFS as well as the slimmed out version of GetBoundingBox for WFS as well. Build 385 was really solid IMO. 
  
 Thanks.

Posted By Nelson on 08-25-2009 10:22 AM 

With build 396, I do see the HybridgeCache now but I am noticing it is not exactly like the behavior before. 



In particular, Zooming behavior is very awkward now, with a large noticable delay taking place before the map is drawn despite any delay setting being set with MouseWheelDelay. Before the zooming was very quick. How can I restore this? Otherwise, I will have many users wondering why the map has not drawn yet when there is no visible cue to show that the map is even waiting to be drawn. 



Thanks. 

Nelson,
 
About the Zooming behavior, you talked about the large noticeable delay. I think the main reason for this is you did not set the preview while it is off by default, so please try setting the preview tile cache to see its effects.
 
The drawing logic should basically identical with previous versions, and the performance for drawing should be enhanced somehow.
 
Any more questions just let me know.
 
Thanks.
 
Yale





 



Posted By Nelson on 08-25-2009 12:50 PM 

I am also now receiving the following error on map.refresh seemingly randomly after having applied a HybridCache to my main overlay and a few layers after the fact and doing some panning and zooming: 



IOException: The directory is not empty. 



Is there no way to use the old caching system exactly as it was, with the zooming behavior being quick and no random exceptions? Our product is due to go live late next week and I need certain changes that have been incorporated into these builds but now am struggling with this cache type issues… I just want Map Suite to perform and behave the way it had with build 385 while also incorporating the missing column fix for WFS as well as the slimmed out version of GetBoundingBox for WFS as well. Build 385 was really solid IMO. 



Thanks. 

Nelson,
 
About the exception, it is a bug in latest version (3.0.396), we have fixed it. And if you want, we can send you a version with this fixed.
 
Thanks very much for reporting!
 
Please feel free let me know if any more questions.
 
Thanks.
 

Yale



 



Yes that would be nice. Also, what about the zoom behavior? 


Also, I am noticing using the very straightforward means provided by ThinkGeo to remove a layer from a map, even though I am using (to my knowledge) proper syntax my layers are removed, but the map is NOT refreshed unless I think manually refresh the layer myself after the fact. This seems to be a bug to me. This bug also seems to happen with InternalFeatures.Clear when using an InMemoryFeatureLayer that you would not like to remove from the map, just clear its features. Please advise.


 


Thanks.


 


 


                Dim overlayStatic As LayerOverlay = DirectCast(mapViewer.Overlays("Main"), LayerOverlay)
                Dim overlayStatic_Locus As LayerOverlay = DirectCast(mapLocus.Overlays("Main"), LayerOverlay)

                overlayStatic.Lock.EnterWriteLock()
                overlayStatic_Locus.Lock.EnterWriteLock()

                Try
                    overlayStatic.Layers.Remove(treTOC.SelectedNode.Text)
                    overlayStatic_Locus.Layers.Remove(treTOC.SelectedNode.Text)

                Catch ex As Exception
                    GeoMaps.ErrorHandler(ex, "Layer not found in main or locus map.")
                Finally
                    overlayStatic.Lock.ExitWriteLock()
                    overlayStatic_Locus.Lock.ExitWriteLock()
                End Try

                mapViewer.Refresh()
                mapLocus.Refresh()


I just got a chance to try out the new build and both of these issues have been addressed so I think we are all set. 
  
 Thanks!

Nelson, 
  
 Thanks for letting us know your status! I appreciate it very much! 
  
 Any more problems please feel free to let us know. 
  
 Thanks. 
  
 Yale 


Sorry to bring this up again, but with the HybridCache I am rarely getting the SystemIO Directory not empty error when zooming out. 
  
 I have no idea if this is related or not, but I have a very simple track zoom out function I have been using and I am noticing that if I do not drag out the track box I zoom out not once but twice… It seems like the TrackEnded event fires off twice quite often when it never used to. Why is this?

Nelson,


Can I understand as following?
So your current problem is about the events TrackEnded fired twice when you track a shape?

winformsMap1.TrackOverlay.TrackEnded += new EventHandler<TrackEndedTrackInteractiveOverlayEventArgs>(TrackOverlay_TrackEnded);
winformsMap1.TrackOverlay.TrackMode = TrackMode.Rectangle;

Any more information would be appreciated.


Thanks.
 Yale

Yes. You can see this most clearly and consistantly by using a Trackmode.Point but it happens with Rectangle also when you do not drag the rectangle out.



Imports ThinkGeo.MapSuite.Core
Imports ThinkGeo.MapSuite.DesktopEdition

Public Class Form1

    Public WithEvents overlayTrack As New TrackInteractiveOverlay

    Private Sub map_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles map.Click

    End Sub
    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        map.MapUnit = GeographyUnit.Feet

        Dim shp_layer As New ShapeFileFeatureLayer("C:\Program Files\ThinkGeo\Map Suite Desktop Full Edition 3.0 (BETA)\Samples\SampleData\Data\countries02.shp")
        shp_layer.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.Transparent, GeoColor.SimpleColors.Black)
        shp_layer.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20

        Dim overlayStatic As New LayerOverlay
        overlayStatic.Name = "Static"
        overlayStatic.Layers.Add(shp_layer)

        Dim overlayDynamic As New LayerOverlay
        overlayDynamic.Name = "Dynamic"

        Dim layerHighlight As New InMemoryFeatureLayer
        layerHighlight.ZoomLevelSet.ZoomLevel01.DefaultAreaStyle = AreaStyles.CreateSimpleAreaStyle(GeoColor.SimpleColors.BrightBlue, GeoColor.SimpleColors.Yellow)
        layerHighlight.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20


        shp_layer.Open()
        map.CurrentExtent = shp_layer.GetBoundingBox
        shp_layer.Close()


        overlayDynamic.Layers.Add("Highlight", layerHighlight)

        map.TrackOverlay = overlayTrack
        map.TrackOverlay.TrackMode = ThinkGeo.MapSuite.DesktopEdition.TrackMode.Point
        map.Overlays.Add("Static", overlayStatic)
        map.Overlays.Add("Dynamic", overlayDynamic)
        map.Refresh()
    End Sub

    Private Sub overlayTrack_TrackEnded(ByVal sender As Object, ByVal e As ThinkGeo.MapSuite.DesktopEdition.TrackEndedTrackInteractiveOverlayEventArgs) Handles overlayTrack.TrackEnded
        Dim pointToZoomOut As PointShape = e.TrackShape
        map.ZoomOutToCenter(15, pointToZoomOut)
        map.Refresh()
    End Sub
End Class


Also, I want to be more clear that the TrackEnded event firing twice is not my only problem. I am also still occasional getting the SystemIO error mentioned above. Additional, I recieved this error for the first time today: 
  
 Could not find a part of the path ‘C:\Documents and Settings\nsoto\Local Settings\Temp\TileCache\47470.0595800056\94519’. 
  
 This was on a zoom in.

Are there no answers or feedback to this? I have been waiting for days and I really have not one second to spare…