ThinkGeo.com    |     Documentation    |     Premium Support

Map not visible on first startup

Hello ThinkGeo-Team,


we use WinformMap-Control and Developer-Express components in our application. If I load a form that has Developer Express toolbars and WinformMap added the map is not visible when form is show at first time.



When I change size of form or  - click on map and zoom in or out - or - minimize the window in taskbar and afterwards maximize it - then the map gets visible.



If I delete the toolbars from form I didnt get those issue.


Do you have an idea how I can solve my problem? Is there an event MapControl needs to paint?


Thomas



Hi, Thomas, 
  
 Thanks for your post! 
  
 Which version are you trying to now now? 
  
 That is a very strange issue, could you send us a very simple sample application(with the data attached in the package would be great) to recrete your problem? I guss there are some properties in the ToolBar not set correctly. 
  
 Any more questions just feel free to let me know. 
  
 Thanks. 
  
 Yale 


Hello Yale,


I have send you (by Mail to support@thinkgeo.com)  a small sample application to check out my problem. To run the demo you need to install Developer Express Winform Components v 9.2.x.


Here you can download the components devexpress.com/Downloads/NET/index.xml


Contact me if you have any questions.


Thank you, Thomas



Thomas, just as an aside… we are using the DevEx components in our applications.   We have embedded the ThinkGeo map in a DevEx UserControl, in a dockable panel, and directly on a main form with a toolbar and bar manager, etc.   We have to call Refresh to get the map to display, but I assumed that would be the case on any scenario after loading the data?   And, we typically don’t load the data until in the form shown event, because we like to get the form up before we do anything that takes a little time.  That we we can provide feedback to the user that the program has started and is indeed loading. 
  
 Not sure if any of this helps, or applies to you, but thought it might be useful to know that you are not alone in your use of the DevEx components and ThinkGeo, simultaneously.

All, 
  
 We are also using devexpress here and I confirm the issue. 
  
 the only thing you have to do is 
 - either load layers after the toolbar is displayed 
 - or call refresh manually once. 
  
 Patrick.

Thomas,


 
I can recreate your problem by using the sample which you sent to us, it’s very obviously that show different effects with toolbar or without toolbar.
You can call Refresh after tool bar display like Patrick said
 
Private Sub fMapWithToolbar_Shown(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Shown
        WinformsMap1.Refresh()
End Sub


 
 
And also thank Ted and Patrick, your information is really helpful.
 
Please let me know if you have more questions
 
James

Hello, 
  
 thanks to all. You did it. 
  
  
 Thomas

Thomas, 
  
 I think we are happy that you solve your problem. 
  
 Please let me know if you have more questions 
  
 James