Community of VE/MapPoint Users and Developers
This is a discussion on Prevent Pushpin/Waypoint deletion within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I use a list to manage my routes. I want the user to be able to interact with the map ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Prevent Pushpin/Waypoint deletion |
| |||
|
Hi, Yes you can do a lot of things but the most easy one is I think to prevent the user to select an objedt (or select a particular object). I hr cannot selelt he cannot delete eh
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
The won't work for me. In another ? that I believe you answered for me, I needed to be able to respond to them selecting a pushpin and subsequently, identifying the entry in my list. I need the interactive ability. However, what I need does not seem to be there, and that would be a "BeforeDelete" event capture. Any other suggestions? |
| |||
|
Hi, I do not underateand. Is it a problem to prevent a user to select the object that you wants to prevent from deleting ? Please explsin again so that I understeand more clearly.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
I have a tree control that represents the stops on the route. If they remove the item from the routes via the tree control, everything is fine. However, if they delete the pushpin directly, my tree control no longer accurately represents the route. I can capture that they have selected a pushpin on the map, but I do not see any way of determining if they: A) Delete the pushpin B) Move the pushpin C) Add a pushpin I want to prevent these actions while continuing to allow them to select a pushpin (this makes it MUCH easier to find the item in the tree control) and zoom in and out on the map. Does that clarify it? Thanks in advance. Ed |
| |||
|
Hi, What I did concerning that: 1° - Create 2 Public variables in your application representing the Lat and Lon where the user is clicking in the Control ( xCoord, yCoord ) - In the initilalization of your Control, add a BeforeClick function ( Just_Get_X_Y_Coordinates ) to save always the xCoord and yCoord variables //************************************************ PROCEDURE Just_Get_X_Y_Coordonnees(Button, Shift, X, Y,bCancel=Vrai) xCoordonnee = X yCoordonnee = Y //info("Coordonnées du clic : " + x + "," + y) RENVOYER Null //************************************************ 2° Use some function of ReverseGeocoding to get the Lat and Lon of xCoord and yCoord ( a large litterature about that exists in this forum ) 2° For each PushPin Added, you had to save his Lat/Lon somewhere ( for instance in a string in PushPin Note Property where you do a concatenation of Latitude and Longitude;- so each PushPin has a unique value concerning that- and you have to save this information in a file or in a List that the user cannot see directly) 3° When somebody clicks on a PushPin, you have to test if it's a PushPin Object. If Ok, compare the Latitude an Longitude of xCoord+yCoord of clicking with the the Lat an Lon saved in the pushpin Note Property or in the file created and decide what to do ( give a message to the user that deleting or moving is forbidden ) . It's what I did, and it works very well, not to prevent deleting or moving Pushpins but to prevent creating a New PushPin with the same Lat and Lon. But it's the same mechanism. Basically, the idea is to know what are the cooridates where the user in clicking ( to delete, to move or to do something else ), and to compare those coordinates with the ones saved somewhere concerning your objects. Regards |
| |||
|
Hi Mohamed, You are a value to this forum BTW: your English is beter and better ... Also mine
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
|
Mohamed, I follow the logic of storing what I had for pushpins and coordinates. I think the problem I have with that is that if Select a pushpin, it obviously triggers the selection change event. But, if I then press the delete button, it does not. I need something to trigger the fact that that has occurred. Ed |
| |||
|
Hi, If you precise more the question, I will see that tonight. How do you parameter Button, Shift, and bCancel in your Beforeclick function ? You know that you can play with that parameters? Regards |
![]() |
| Tags |
| deletion, prevent, pushpin or waypoint |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| can't prevent MP from optimizing stops ??? | Anonymous | MapPoint 2006/2009 Discussion | 0 | 12-02-2003 12:10 AM |
| Check if a waypoint and a pushpin exist | Anonymous | MapPoint 2006/2009 Discussion | 2 | 08-19-2003 10:27 AM |
| Pause MapPoint Display (prevent close) | Anonymous | MapPoint 2006/2009 Discussion | 0 | 10-29-2002 06:56 PM |
| How to prevent Save map dialog appearing? | Anonymous | MapPoint 2006/2009 Discussion | 1 | 08-21-2002 08:05 PM |
| How do I prevent old/previous entries that I typed.... | Anonymous | MapPoint 2006/2009 Discussion | 1 | 07-11-2002 01:10 PM |