This project is read-only.

Problem with Tutorial #4. Saving the Polygon Shapefile is loading as Polyline Later

Apr 11, 2011 at 7:57 AM

Dear friends,

Anybody can help me to know why, when I use the Tutorial #4 and save the polygon shapefile, if I need to load this shapefile later, it is loaded as polyline?

Thanks in advanced.

Francisco J.

Apr 15, 2011 at 9:42 PM
geofran80 wrote:

A level class variable amIDrawing As Boolean that initialize at the CreatePointShapefile/CreateLineShapefile/CreatePolygonShapefile tool Menu and stop or put to false in the SavePointShapefile/SaveLineShapefile/SavePolygonShapefile function.

Did you resolve the issue? Is a change to the code base recommended?

Apr 18, 2011 at 1:01 PM

Dear friend, I only create a bool variable to get/set when I'm drawing then we can stop the drawing in the map control.

 

The problem now is when you load the polygon shapefile it is loaded in polyline format.

 

Thanks.

Francisco J.

Jun 3, 2011 at 8:55 AM

Dear All,

I met the problem which is as similar as Francisco's,But mine is that i have created and  saved the shapefile already,while i load the saved shapefile to map,there is  a exception by the code:map1.ZoomToMaxExtent(),the exception is overflowexception.

Is somebody knowing why? I even can't load the shapefile i created!

 

Best Wishes

Jun 16, 2011 at 3:04 AM
Edited Jun 16, 2011 at 3:05 AM

Dear all,

I've met the same problem. Following the example, I could creat a new polygon file. However, when I remove the newly created polygon file and reload it again into the map, it becomes a polyline file, as decribed by geofran80.  The LinearRing was used when creating the polygon file. I tried to modify the sample code, to add the first point to the polygonArray to form a closed linearRing when a simple polygon shape finished, but it still didn't work.  The polyon file still kept as a line file when reloaded. So could anyone tell me what's wrong with this?  And where is the level class variable amIDrawing As Boolean mentioned by mudnug? Thanks!

Jun 29, 2011 at 8:12 AM

Dear All:

Can anyone tell us how to  solve the problem? It is a long time I still can't work out the problem!

Best Wishes!