MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Prevent Pushpin/Waypoint deletion

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


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 Thread Tools Display Modes
  #1 (permalink)  
Old 08-14-2005
EdB EdB is offline
Member
Green Belt
 
Join Date: Aug 2002
Posts: 56
Prevent Pushpin/Waypoint deletion

I use a list to manage my routes. I want the user to be able to interact with the map (click on pushpins, zoom, etc...) But I do not want the user to be able to delete pushpins or waypoints. Is there any way to do that?
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 08-14-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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
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 08-14-2005
EdB EdB is offline
Member
Green Belt
 
Join Date: Aug 2002
Posts: 56
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?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 08-15-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5 (permalink)  
Old 08-15-2005
EdB EdB is offline
Member
Green Belt
 
Join Date: Aug 2002
Posts: 56
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6 (permalink)  
Old 08-16-2005
Member
Green Belt
 
Join Date: Mar 2005
Posts: 96
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
__________________
Mohamed
www.AtlasCouscous.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7 (permalink)  
Old 08-16-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Hi Mohamed,

You are a value to this forum
BTW: your English is beter and better ... Also mine
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8 (permalink)  
Old 08-17-2005
EdB EdB is offline
Member
Green Belt
 
Join Date: Aug 2002
Posts: 56
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9 (permalink)  
Old 08-17-2005
Member
Green Belt
 
Join Date: Mar 2005
Posts: 96
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
__________________
Mohamed
www.AtlasCouscous.com
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
deletion, prevent, pushpin or waypoint


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


All times are GMT -5. The time now is 11:32 PM.


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