This project is read-only.

cannot not draws polyline and polygon

May 27, 2011 at 3:20 PM

Dear guys,

I am working my project using Dotspatial. I want to draw points, polylines and polygons on my map interface.

 I programed all the code based the provided tutorial. However, for my software, the point drawing is perfect, but when i draw the polygon and polylines, a dialog pop up and show

"Column 'ID' does not belong to table .", it said argument exception was unhandled.

Did anybody encounter such kinds of problem? I have to say, i have checked the code according on the tutorial for several times...

Thanks for you helps.

May 31, 2011 at 1:11 AM

Have you tried your solution on another computer? If you refer to tutorial 4, the concept should work if you followed the code and instructions exactly. But that tutorial is mainly(but not only) to draw objects by using mouse, and I noticed some problems there that would prevent me to use that code(as it is) in real-life application. But you will get rough idea how to draw objects by using mouse, if that is what you want your application to do.

May 31, 2011 at 12:43 PM

Hello Anziga,

Many thanks for your reply. Yes, I did try my solution on my laptop in order to test the GPS functions in the field.

But, what I need is a polygon area on my map which is non-related with GPS function. I need to set a boundary of area to trigger the GPS recording. Then I need to draw the polygon area by learning the tutorial. Actually the situation is that I have done my codes based on tutorial 4. When I click the “Drawing point” it is still all right, but if I draw polyline and polygon, it doesn't work and a alert message now popped up and shown

“Entering break mode failed for the following reason: Source file xxxx does not belong to the project being debugged”

And it also told me

“usually, this condition occurs when the project was not rebuilt prior to starting the debugging session, when the assembly file for the project is out of data, or when the project source file were moved to a different disk location between the time the project was built and the debugging session was started”

“Edit and continue will be disabled for this debugging session”

I am not sure why this happened. I even cannot draw polygon again if I delete the codes and rewrite. Could you please give me some suggestions? Many thanks.

Regards


This message and any attachment are intended solely for the addressee and may contain confidential information. If you have received this message in error, please send it back to me, and immediately delete it. Please do not use, copy or disclose the information contained in this message or in any attachment. Any views or opinions expressed by the author of this email do not necessarily reflect the views of the University of Nottingham.

This message has been checked for viruses but the contents of an attachment may still contain software viruses which could damage your computer system: you are advised to perform your own checks. Email communications with the University of Nottingham may be monitored as permitted by UK legislation.

May 31, 2011 at 8:49 PM

Without seeing/testing your code it is a bit difficult to say what could be the problem, at least for me. You didn't download source code together with DLLs? Depending on your VS package, the debugger should try to open that particular source code file and point to the line that is causing an error. This way you have a better idea what is the problem and how to rectify it. This(debugger checking the C# source code) will work even if you use VB.

Jun 1, 2011 at 4:53 PM

Hi Anziga,

Many thanks. I have checked the code. It is all right. I found that if I run once of my code, wait the mistake poped up, then I click the" ignore "and I could draw the  polyline and polygon!!! I dont know why actually for this strange problem. But I will learn more for this, hope it could undertand and solve this in future. Many thanks

Jun 3, 2011 at 4:37 AM

If that debugger hasn't indicate the line which is causing that error message, you could start putting breakpoints into that particular function and see at which point the error message will pop out, I would also download the source code, in this way you might have a better idea what is going on... not only in this case but other projects as well.