MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Just wondering how MapPoint knows when a poly is closed.

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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack (1) Thread Tools Display Modes
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 11-22-2007
Member
Yellow Belt
 
Join Date: Feb 2005
Posts: 48
Just wondering how MapPoint knows when a poly is closed.

Hey folks-

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 11-22-2007
Senior Member
Blue Belt
 
Join Date: Dec 2002
Posts: 251
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 11-22-2007
Member
Yellow Belt
 
Join Date: Feb 2005
Posts: 48
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
closed, mappoint, poly, wondering


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/just-wondering-how-mappoint-knows-when-poly-closed-6788.html

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

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


All times are GMT -5. The time now is 10:12 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55