Community of VE/MapPoint Users and Developers
This is a discussion on Just wondering how MapPoint knows when a poly is closed. within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hey folks- happy holidays. Everything is working, but I'm just curious... Using Mappoint control and AddPolyline - When the user ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Just wondering how MapPoint knows when a poly is closed. happy holidays. Everything is working, but I'm just curious... Using Mappoint control and AddPolyline - When the user right clicks 'Close Curve' and I save my vertices data ? then reload the shape ? even though the last set of coords lat/lon is NOT the same as the first ? it redraws just fine yet technically, the way I USED to close the poly for the user was through a button where I set the last coord pair lat lon values equal to the first lat lon pair in the poly, without doubt closing it. So, I'm just puzzled, how does MapPoint know the poly is closed when and only when you use Close Curve yet there is no apparent evident marker in the vertice data to suggest the last pair = the first pair values. Seems if I create a poly manually, setting last equal to first - all is well - and yet close curve through mappoint right click also works too anyone know how MapPoint knows a poly shape object is closed ? Tim Miltz |
| |||
| Re: Just wondering how MapPoint knows when a poly is closed.
Hi Tim, I don't see any way, so I'll make a guess: Win32 API function CreatePolygonRgn with no fill might supply the last set of coordinates no matter where the 'break' in the line is. Mike Mattys |
| |||
| Re: Just wondering how MapPoint knows when a poly is closed.
Hey there Mike, Ah, I see your point there. I was using the Mappoint object model in this case, so that I could Set oCurrentShapeFinal = MappointControl1.ActiveMap.Shapes.AddPolyline(oLoc ations) Hey, I was incorrect to post this. I have since realized MP will close the poly TO the first pair of coords in my location object array, this is what I was missing. Sorry on the confusion folks, I screwed up on recognizing my question was in error, without doubt no correct answer could follow. I also realize now that if I want to provide the user with a dedicated 'close poly' button for example, I need NOT add a final pair of coords lat/lon equal to the first pair coords. Just checked indeed the AddPolyline does close it automatically. Oh well, sorry folks, hope this thread doesn't consume anyones time that need not ponder this. AddPolyline DOES close the poly- was just my methodology that was in error. Tim |
![]() |
| Tags |
| closed, mappoint, poly, wondering |
| ||||
| Posted By | For | Type | Date | |
| Microsoft MapPoint 2006 - MP2K Magazine | This thread | Refback | 11-26-2007 06:40 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Re-open Is user drawn freeform Poly Closed thread | tfmiltz | MapPoint 2006/2009 Discussion | 2 | 11-09-2007 01:58 PM |
| Custom Poly Line segment Delete trapping | tfmiltz | MapPoint 2006/2009 Discussion | 2 | 10-23-2007 10:02 PM |
| MapPoint Gets closed on its own | Anonymous | MapPoint 2006/2009 Discussion | 11 | 01-09-2005 05:52 AM |
| I was wondering if Mappoint 2002 had an API that I.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 05-22-2002 02:58 PM |
| Hello, I'm wondering if there is a way to include.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 09-04-2001 12:52 PM |