I am new on thinkgeo. I am trying to zoom the map based on image resolution. I am using the following code for getting minimum & maximum zoom scale & current extent.
I used the modified code you provided. The problem still exists. If I try to click the middle of the navigation tool multiple times. the application crashes.
Currently I can't re-produce your issue "The application crashes after clicking the middle of the navigation tool multiple times.". Maybe you could provide us a self-contained sample to track the root cause.
Besides, I attach the whole code snippet ("T9192_CodeSnippet.txt") I used for your reference.
I am attaching the code. If you click the middle of the navigation tool multiple times, it is crashing.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows; using System.Windows.Controls; using System.Windows.Data; using System.Windows.Documents; using System.Windows.Input; using System.Windows.Media; using System.Windows.Media.Imaging; using System.Windows.Shapes; using ThinkGeo.MapSuite.Core; using ThinkGeo.MapSuite.WpfDesktopEdition; using System.IO;
namespace ThinkGeoTest { /// <summary> /// Interaction logic for ThinkGeoMap.xaml /// </summary> public partial class ThinkGeoMap: Window { public ThinkGeoMap() { InitializeComponent(); this.Loaded += new RoutedEventHandler(ThinkGeoMap_Loaded); }
Thank you for your code snippet. I have recreated your issue, the application crashed because some bugs in GdiPlusRasterSource related to Multi-Thread, we're researching how to fix it, will let you know if we have any progress.
Besides, if you set TileType to SingleTile, this issue will not appear.
I also meant to ask if ThinkGeo provides source code for the MapSuiteCore and WpfDesktopEdition assemblies? I see that the source is provided for the third party code that ThinkGeo uses. Read-only source would be wonderful; I'm sure we could determine if we're using your product incorrectly or whether there's a possible bug if we had the source.
For source code we have the Map Suite Source Kit which contains source to many but not all of the classes for a detailed list of what it contains you can check out:
I’m still working on a sample app but am having trouble reproducing the issue. We’re having trouble when the CurrentScale on a GdiPlusGeoCanvas is below 50. I found this post: gis.thinkgeo.com/Support/DiscussionForums/tabid/143/aff/13/afv/topic/aft/5874/Default.aspx that looks related. Can you tell me if there is a lower boundary on CurrentScale? Our production application throws an Overflow Error exception when the CurrrentScale is about 31. The exception bubbles up from the GdiPlusGeoCanvase DrawWorldImageWithoutScaling method. Other observations are that the CurrentWorldExtent on the canvas and the Height and Width properties are very small. Also, any insight into how I can set the current scale on a GdiPlusGeoCanvas would be helpful.