I just received eval copies of Desktop Edition version 7 and World Map Kit SDK. Compiling with Visual Studio 2012.
Successfully loaded Desktop Edition and made it through the Getting Started tutorial.
Next, I loaded the World Map Kit SDK Sample Desktop Edition project for Visual Studio 12 and tried to open a design view of WorldMapKitSample to look t the GUI design. I got tow instances of the following error:
"Events cannot be set on the object passed to the event binding service because a site associated withthe object could not be located"
The error stems from thee two lines in WorldMapSample.Designer.cs:
this.Map.ExtentOverlay.MapMouseDown += new System.EventHandler<ThinkGeo.MapSuite.DesktopEdition.MapMouseDownInteractiveOverlayEventArgs>(this.ExtentOverlay_MapMouseDown);
this.Map.ExtentOverlay.MapMouseUp += new System.EventHandler<ThinkGeo.MapSuite.DesktopEdition.MapMouseUpInteractiveOverlayEventArgs>(this.ExtentOverlay_MapMouseUp);
I am still able to build and run the project but can’t modify the GUI because of this error.
What am I missing?
Thanks in advance
Neil
Sample from WorldMapKit Error with Map.ExtentOverlay.MouseUp
Hi Neil,
Thanks for your post, and welcome to MapSuite World. We tried to recreate your problem, but it didn’t show up, Following is a test vedio on our end for your information:screencast.com/t/WUks2vaxiG. attahced is our test code, would you please check it and tell what we missed, and If possible, a self-contained sample would be highly appreciated.
Wating for your further information
Best Regards
Summer
The sample does run on my PC but I can’t open WorldMapDesignerKit.vb in designer view.
I had hopes that I would be able to use the sample code as a starting point and tailor it to my application. As soon as I try to look at the main form in designer view to add a button or other item, I immediately get the error “Events cannot be set on the object passed to the event binding service because a site associated with the object could not be located”, associated with ExtentOverlay_MapMouseUp and ExtentOverlay_MapMouseDown.
I have a screen shot illustrating the error but don’t know how to get it to you.
Neil
Hello Neil,
I did some investigations on Google and seems it is like a bug in VS. A workaround seems to be adding the event in the Form_Load event instead of in the constructor, which means we don’t register those events in Designer view but in the WorldMapDesignerKit.vb file by manually. Like this:
private void Form1_Load(object sender, EventArgs e){
…
winformsMap1.ExtentOverlay.MapKeyDown+=ExtentOverlay_MapKeyDown;
winformsMap1.ExtentOverlay.MapKeyUp+=ExtentOverlay_MapKeyUp;
…}
As for how to insert images in the reply, after you submit a pure text answer successfully, please click the Edit button to do more operations in a Editor Tool area.
Please let us know if the issue persists.
Thanks,
Johnny