MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How to restrict user from changing pushpin information...

This is a discussion on How to restrict user from changing pushpin information... within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; Hi All, I'm working with a desktop C# MapPoint2004 application on Europe map using ActiveX control. I'm showing pushpins on ...


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 03-22-2006
Junior Member
Yellow Belt
 
Join Date: Feb 2006
Posts: 18
Send a message via MSN to Learner Send a message via Yahoo to Learner
How to restrict user from changing pushpin information...

Hi All,
I'm working with a desktop C# MapPoint2004 application on Europe map using ActiveX control. I'm showing pushpins on certain locations on map. Now I've to implement two restrictions on user interaction.
1. User must not be able to change the info shown in balloon of pushpin on selection.
2. User should not be able to change the position of pushpin on map.
Any help is highly appreciated.
Regards
__________________
Learn from cradle to the grave
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 03-22-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Hi,

Just restrict the user to select. Then ou are done
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 03-23-2006
Junior Member
Yellow Belt
 
Join Date: Feb 2006
Posts: 18
Send a message via MSN to Learner Send a message via Yahoo to Learner
Hi Wilfried,
I've restrict user from selecting the pushpin and it solved "moving the pushpin problem" but still user can edit the text in balloon that I wish to restrict. Is there any solution to this text edit restriction problem?
Regards
__________________
Learn from cradle to the grave
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 03-24-2006
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,122
Hi,

I just try and I cannot edit the text balloon. Hmm this is my code. The original is from Fernando Velasquez and you will find it somewhere on this forum.

Code:
        private void unSelectPushPin(object mapSelection)
        {
            try {
                Pushpin pp = mapSelection as Pushpin;
                if (pp != null) {
                    Location loc = mp.ActiveMap.GetLocation(80, 0, 0); // somewhere at the arctic ocean
                    Shape sp = mp.ActiveMap.Shapes.AddShape(GeoAutoShapeType.geoShapeRectangle, loc, 1, 1);
                    sp.Select();
                    sp.Delete();
                }
Then in the class:

Code:
        private bool lastMouseButtonLeft = false;
In the MouseDown event:

Code:
            if(e.button == GeoMouseButtonConstants.geoLeftButton) {
                unSelectPushPin(mp.ActiveMap.Selection);
                lastMouseButtonLeft = true;
            }
And in the SelectionChange:

Code:
            if (lastMouseButtonLeft) {
                unSelectPushPin(e.pNewSelection);
                lastMouseButtonLeft = false;
            }
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
changing, information, pushpin, restrict, user


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
How to get Lat/Long of a PushPin moved by a user Gerhard Faber MapPoint 2006/2009 Discussion 1 03-14-2006 03:48 PM
How to restrict map area in ActiveX? ErikS MapPoint 2006/2009 Discussion 1 07-26-2004 01:34 PM
Exporting pushpin information from territories Anonymous MapPoint 2006/2009 Discussion 1 06-28-2004 09:26 AM
Changing highlight color of a pushpin in VB.net Anonymous MapPoint 2006/2009 Discussion 0 02-29-2004 03:37 PM
I have an app that adds a pushpin (a user selected.... Anonymous MapPoint 2006/2009 Discussion 1 04-19-2002 04:22 PM


All times are GMT -5. The time now is 03:49 AM.


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