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
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Disable Just 'Select a Place'

This is a discussion on Disable Just 'Select a Place' within the MapPoint Desktop Discussion forums, part of the Map Forums category; is it possible to JUST disable 'Select a Place' feature when clicking? I capture the BeforeClick event to prevent the ...

  1. #1
    jnarissi is offline Junior Member White Belt
    Join Date
    Apr 2006
    Posts
    5

    Disable Just 'Select a Place'

    is it possible to JUST disable 'Select a Place' feature when clicking?

    I capture the BeforeClick event to prevent the user from moving things around:

    Private Sub MyMap_BeforeClick(ByVal sender As Object, ByVal e As
    AxMapPoint._IMappointCtrlEvents_BeforeClickEvent) Handles
    AxMappointControl1.BeforeClick

    If e.button = GeoMouseButtonConstants.geoLeftButton Then

    Dim mapSelection As Object =
    AxMappointControl1.ActiveMap.Selection
    If Not mapSelection Is Nothing Then

    If TypeOf (mapSelection) Is MapPoint.Pushpin Then
    ChangeFocus()
    End If

    If TypeOf (mapSelection) Is MapPoint.Route Then
    ChangeFocus()
    End If

    If TypeOf (mapSelection) Is MapPoint.Shape Then
    ChangeFocus()
    End If

    Else
    'e.cancel = True
    End If

    End If ' If e.button = GeoMouseButtonConstants.geoLeftButton Then

    End Sub


    Is there anyway to determine when the 'Select a Place' is being clicked? I
    need to have the ability to let the user click so that they can use the
    drawing and measureing tools, but want to be able to determine WHAT is being
    click that way I can canel as needed.

    Thanks in advance,
    Joe

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

    The Selection property can only return a DataSet, Direction, Location, Pushpin, Shape, or Waypoint object that is selected. So as far as I know not a place or country.

  3. #3
    jnarissi is offline Junior Member White Belt
    Join Date
    Apr 2006
    Posts
    5
    Thanks for the reply.

    Yeah I got that... thats not the issue. The issue is that if the user selects a location that is ambigious, the stupid "Select A Place" dialog pops up. If I disable the event completely, then I cannot give access to drawing on the map. If I allow the event, then I cannot prevent the "Select A Place". I need to be able to enable the MapPoint events so that I can obtain object references to PushPins, Shapes, etc... but without the stupid "Select A Place" firing.

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

    Euh, I'm not following anymore. I dont think it is my brain, because I do think it is still functioning but I do think it is the language. I'm not English spoken, so please tell me in simple English what I shoul do to understeand what should be prevented or not.

    Once I have understood it then I can probably give a solotion if there is any.

  5. #5
    jnarissi is offline Junior Member White Belt
    Join Date
    Apr 2006
    Posts
    5
    Well basically I am capturing the BeforeClick event of MapPoint... this is done so that I can allow the user to use the drawing objects from the drawing toolbar... I am also preventing the user from moving around any pushpins, routes, etc, that I draw progammatically...

    Now to completely cancel the MapPoint events, in the BeforeClick you would set e.cancel = True to prevent all MapPoint events... but if you do this then the user cannot use the drawing tools... if you do not cancel the event then I can keep track of the objects they create (and they can modify those) and the ones I create programmatically (and can prevent them from interacting with them)... the problem is that the stupid "Select A Place" keeps firing when the user selects certain parts of the map.

    What I need to be able to do is capture the BeforeClick event, do the normal processing, and prevent the "Select a Place" from firing without completely disabling the MapPoint event.

    Thanks,
    Joe

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

    You can easy do that a user cant move a pushpin. I'm not sure for routes (I was even aware that you could move a route). I'm not sure if what you try to do is easy to do if it _can_ be done.

  7. #7
    jnarissi is offline Junior Member White Belt
    Join Date
    Apr 2006
    Posts
    5
    thanks for your help, but you dont seem to know the MapPoint API very well... users can move pushPins around all they want.

    Again thanks, but I need someone with experience programming with the MapPoint API.

    Joe

  8. #8
    Dazzer is offline Senior Member Green Belt
    Join Date
    Sep 2003
    Posts
    103
    Actually using MapPoint API it is very easy to prevent a user moving a pin which I think is what Wilfred was implying. Its not that difficult to use the API to code something whereby pins appear to be imovable.

    Back on topic,

    Your trying to prevent the 'Select a place' as you call it, window from coming up when someone clicks on a map, however you don't want to cancel the beforeclick event because you still want them to be able to draw.

    Am I not right in thinking that if a drawing tool is selected the 'select a place' window wont appear anyway

  9. #9
    jnarissi is offline Junior Member White Belt
    Join Date
    Apr 2006
    Posts
    5
    Thanks for the reply.

    Yes, you are right.. the "Select a Place" does not pop up when the user is drawing something...

    But I need to ALWAYS disable the "Select a Place" feature... we have it that when then double click on the map, it draws some lines for you related to our program... so they need to be able to draw as needed (this works fine) and double-click as needed, but without the "Select a Place" from poping up... I cannot cancel the event, cause then i loose all mappoint functionality (like allowing them to draw).... so I need the events enabled, so i can do what i got to do, but need to be able to prevent the "Select a Place"

    thanks again for the time and effort....

    Joe

  10. #10
    MR Marcus is offline Junior Member White Belt
    Join Date
    Jan 2008
    Posts
    1

    Re: Disable Just 'Select a Place'

    Hi, did you ever get this issue resolved? If so, can you tell me how you did it? I am having the same issue where I am capturing the BeforeDblClick event and would like to disable the "Select a Place" dialog from appearing. Thanks

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. How to close "Select a place" dialog programmatica
    By Bed007 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 06-29-2006, 04:49 PM
  2. I need to select from more than eight colors
    By BobFromBoston in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 03-01-2006, 06:58 PM
  3. Select a place
    By jimsirv in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 07-29-2004, 09:04 PM
  4. Is this possible to SELECT ALL the pushpins ?
    By Vincent BENNER in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 12-04-2002, 08:51 PM
  5. Add a new Place to MapPoint with MapPoint "Place Icon&q
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 0
    Last Post: 09-30-2002, 10:28 PM

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 26 27 28 29 30 31 32 33 34 35 36