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
Results 1 to 4 of 4

How to restrict user from changing pushpin information...

This is a discussion on How to restrict user from changing pushpin information... within the MapPoint Desktop 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 ...

  1. #1
    Learner is offline Junior Member Yellow Belt
    Join Date
    Feb 2006
    Posts
    18

    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

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

  3. #3
    Learner is offline Junior Member Yellow Belt
    Join Date
    Feb 2006
    Posts
    18
    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

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    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;
                }

Thread Information

Users Browsing this Thread

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

Similar Threads

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