Community of VE/MapPoint Users and Developers
This is a discussion on Disable Just 'Select a Place' within the MapPoint 2006/2009 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 ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Disable Just 'Select a Place' 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 |
| |||
|
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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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. |
| |||
|
Hi, Euh, I'm not following anymore. I dont think it is my brain, because I do think it is still functioning Once I have understood it then I can probably give a solotion if there is any.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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 |
| |||
|
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.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
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 |
| |||
|
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 |
| |||
| 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 |
![]() |
| Tags |
| disable, elect, place |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to close "Select a place" dialog programmatica | Bed007 | MapPoint 2006/2009 Discussion | 1 | 06-29-2006 04:49 PM |
| I need to select from more than eight colors | BobFromBoston | MapPoint 2006/2009 Discussion | 2 | 03-01-2006 06:58 PM |
| Select a place | jimsirv | MapPoint 2006/2009 Discussion | 1 | 07-29-2004 09:04 PM |
| Is this possible to SELECT ALL the pushpins ? | Vincent BENNER | MapPoint 2006/2009 Discussion | 2 | 12-04-2002 08:51 PM |
| Add a new Place to MapPoint with MapPoint "Place Icon&q | Anonymous | MapPoint 2006/2009 Discussion | 0 | 09-30-2002 10:28 PM |