Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 3 of 3

Re-open Is user drawn freeform Poly Closed thread

This is a discussion on Re-open Is user drawn freeform Poly Closed thread within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi folks Just checked the forum before posting for this problem Using vb6 + MapPointControl I let the user draw ...

  1. #1
    tfmiltz is offline Member Green Belt
    Join Date
    Feb 2005
    Posts
    52

    Re-open Is user drawn freeform Poly Closed thread

    Hi folks

    Just checked the forum before posting for this problem

    Using vb6 + MapPointControl

    I let the user draw a polygon - and I have them NOW use the right click functionality of Close Curve.

    I observe the thread Anonymous posted - and it closed (the thread) with 'there does not seem to be a way to determine if the poly is closed other than assuming'

    Anonymous had a neat point there that if the user Closes a poly - using Close Curve, indeed the last vertice is not the first - as I USED to do - requiring the user to click a 'Close' button I added - where I did come up with the same solution myself - use the first Location object array item as the last -

    So, here I let the user draw their poly - and I let them 'Close Curve'

    I need a way to 'stop collecting' mouse clicks.

    and I'd prefer NOT to have them press a button, for - they just clicked ' Close Curve ' and I don't want them to have to go through the same hoop twice.

    Anyone ever resolve or find a way to determine if a poly is closed ?

    PolyHitTest ? some method like that ?
    IsClosed ?

    I don't see these - and need a way to stop collecting mouse clicks.

    I do say - it might be my methodology.

    I DO build an array of Location Objects on Mousedown

    it may be I need to TRULY formally set a FreeForm shape object on the form

    then - MP control takes care of itself -

    Maybe this is the problem ? Has anyone ever created a freeform shape object with MP Control ? I just maintain my own Location object array - and then use .AddPolyLine - that's a step up from my older approach of using .AddLine heh - that was a nightmare, before I started to 'get' the MP OM better.

    It may be I'm about to make a paradigmatic shift in MP OM to ludicrous speed ! and realize- oh, sheesh, I've STILL been re-inventing the wheel, MP can just drop a freeform shape object on the form and the control can manage auto line segmenting etc... instead of me collecting clicks - assigning from GetLocation then CalcPos -t hen Add PolyLine with that location object array.

    Any insights ?

    Tim Miltz
    I'd drive a Fed-X truck, but I don't have a truck driving license !

  2. #2
    tfmiltz is offline Member Green Belt
    Join Date
    Feb 2005
    Posts
    52

    Re: Re-open Is user drawn freeform Poly Closed thread

    By the way folks

    I HAD a real nice solution to this.

    I mandated CTRL be pressed (you get the Button value on Mousedown) to 'count' as a poly click.

    this prevented more poly lines showing up as they went to edit their poly.

    My client thought it would be counter-intuitive to the user to have to press CTRL to make a poly segment addition count.

    I am playing with this without the CTRL mandate - and it's a mess.

    I can trap the right click atleast to say - hey - don't add that as a new line.

    But - without feedback on when Close Curve was selected ?

    there is no way I can see to stop collection clicks on Left click to 'add a new poly segment' I mean, it re-opens the poly and adds a point.

    I went to explore dropping a dedicated freeform 'shape' object on the form - MP doesn't like that.

    Seems .AddPolyline is the only means to drop or present a custom poly on the form.

    Sometimes I wish the app control was in my hands - heh, I'd say - the user will hold CTRL down and this will free up any other distractive left clicks -

    I am more or less saying, once a custom poly creation is selected, I HAVE to collect the left clicks to know to extend my Location object array and recreate my shape with .AddPolyline

    BUT - if the user right clicks and selects Close Curve, I have no way of knowing this

    so if they left click again to go to 'move' their segment lines around ? I end up adding yet a NEW line segment - because there was no notification they are done.

    I liked my use 'CTRL' button to make poly additions count.

    really worked nice - but - since my offerings are put aside here - for 'the way things must be' ? for my client ?

    any way to know if Close Curve was selected ?

    Seems MP is a work in progress from MS, I wish they'd put more into MP, they do, but I wish they'd put as much as they put into re-inventing the Word Processor with Office what is it now ? 13 ? what could possibly be new in office ? oh yes, I forgot, it's 'live' now ? oh well.

    Any thoughts ?

    Tim Miltz

  3. #3
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433

    Re: Re-open Is user drawn freeform Poly Closed thread

    Hi,

    Trap the mouseclicks as you already do but draw the poly yourself. then you have complete control.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Custom Poly Line segment Delete trapping
    By tfmiltz in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 10-23-2007, 10:02 PM
  2. pushpins in manually drawn shape
    By chupax in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 12-02-2006, 02:34 PM
  3. Can't GetActiveMap from a Thread
    By discostu in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-08-2005, 08:25 AM
  4. is Mappoint thread safe
    By Wilfried in forum MapPoint Desktop Discussion
    Replies: 5
    Last Post: 04-06-2005, 02:50 PM
  5. Selecting a prviously drawn shape
    By CSG in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 03-24-2004, 11:08 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


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