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

MapPoint Hint

This is a discussion on MapPoint Hint within the MapPoint Desktop Discussion forums, part of the Map Forums category; Hi, is it possible to Show a Hint if the User moves over a Waypoint with the mouse? How to ...

  1. #1
    jasanite is offline Member Yellow Belt
    Join Date
    Jul 2007
    Posts
    45

    MapPoint Hint

    Hi,
    is it possible to Show a Hint if the User moves
    over a Waypoint with the mouse?

    How to display a hint?

    How to get the event?

    Using c# .net, activex.

    2cnd Question, Pushpins show the Balloon on a
    double-click, can i make it a single click.

  2. #2
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    1st question - data tips

    MapPoint will do the Hints or Tooltips only if it is a Dataset - it's called Data tips in the help file, see below.

    Despite what it says about not working with Pushpins, if you have a Multiple Symbol map then the data tip could work for a pushpin.


    - When data tips are activated, they will appear when you rest the mouse pointer over a shaded area or circle for a second or two.

    - Data tips cannot be activated for Pushpin maps.

    - Tip To change the text displayed in data tips, edit your legend labels.

  3. #3
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    SelectionChange Event

    Regarding your second question, I would recommend to look at the SelectionChange event. Although it might seem like one of the Click events is the way to go, that only gives you the X,Y coordinates and you'd have to figure out which pushpin (if any) they are clicking on..

    best,
    Eric

  4. #4
    jasanite is offline Member Yellow Belt
    Join Date
    Jul 2007
    Posts
    45

    Re: MapPoint Hint

    Jep, code:

    Event Handlers:

    Code:
    mappointControl.SelectionChange += new _IMappointCtrlEvents_SelectionChangeEventHandler(this.axMappointControl_SelectionChange);
    mappointControl.MouseMoveEvent += new _IMappointCtrlEvents_MouseMoveEventHandler(this.axMappointControl_MouseMove);
    Selection Change:

    Code:
    private void axMappointControl_SelectionChange(object sender, AxMapPoint._IMappointCtrlEvents_SelectionChangeEvent e)
    {
    MapPoint.Pushpin pPrev = e.pOldSelection as MapPoint.Pushpin;
    MapPoint.Pushpin pCurr = e.pNewSelection as MapPoint.Pushpin;
    if(pPrev != null)
    {
    pPrev.BalloonState = MapPoint.GeoBalloonState.geoDisplayNone;
    }
    if(pCurr != null)
    {
    pCurr.BalloonState = MapPoint.GeoBalloonState.geoDisplayBalloon;
    }
    }
    MouseMove: (not complete)

    Code:
    private void axMappointControl_MouseMove(object sender, AxMapPoint._IMappointCtrlEvents_MouseMoveEvent e)
    {
    MapPoint.FindResults results = CurrentMap.ObjectsFromPoint(x, y);
    IEnumerator items = results.GetEnumerator();
    items.Reset();
    
    while (items.MoveNext())
    {
    object result = items.Current as object;
    if (result is MapPoint.Pushpin)
    {
    (result as MapPoint.Pushpin).BalloonState = MapPoint.GeoBalloonState.geoDisplayBalloon;
    }
    }
    //code to make the balloon disapear if it leaves, own code was to fussy
    }

  5. #5
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: MapPoint Hint

    Rather than using the MouseMove and popping up the balloon, also try the Data Tip. It requires that you make a multiple symbol map which you may not need, but then you can use the built in "hover tip", see screenshot attached. This is just Area in Square miles by zip code but should give you an idea.
    Attached Images Attached Images

  6. #6
    jasanite is offline Member Yellow Belt
    Join Date
    Jul 2007
    Posts
    45

    Re: MapPoint Hint

    What's a multiple symbol map?
    Where do i start from when i make one.
    Is it just an add like the pushpins or
    do i have to fill a new dataset and
    then call a method to show it.
    Already read quite much but nothing like
    a "how to make multiple symbol map".
    (Here and there i heard from them and
    sometimes the word pops up but without
    context)

  7. #7
    Eric Frost's Avatar
    Eric Frost is offline Administrator Black Belt
    Join Date
    Jul 1992
    Posts
    5,094
    Blog Entries
    4

    Re: MapPoint Hint

    Go to Data | Data Mapping Wizard, and you will see the option to create a Multiple Symbol map.

    To do this programmatically you use the DisplayDataMap method, see the help file.

    object.DisplayDataMap([DataMapType], [DataField], [ShowDataBy], [CombineDataBy], [DataRangeType], [DataRangeOrder], [ColorScheme], [DataRangeCount], [ArrayOfCustomValues], [ArrayOfCustomNames], [DivideByField], [ArrayOfDataFieldLabels], [ArrayOfPushpinSymbols])

    The DisplayDataMap method is a bit of a pain, let us know how you get on with it if you decide to go this route. The Programming MapPoint in .NET book has some good examples, I generally refer it it when I need to work with the method rather than the help file.

    Eric

  8. #8
    jasanite is offline Member Yellow Belt
    Join Date
    Jul 2007
    Posts
    45

    Re: MapPoint Hint

    Hi,
    jep help file is like a quick reference with just a few hints.
    A book is too expensive for me because i won't use
    mappoint anymore once i finished this stuff. Letting others
    nibble on the cherry tree. If i go on i will post something
    more, so far i just take a look at the things you sugessted.
    But thanks, at least usefull comments, trying to share some
    of the honey i find.

Thread Information

Users Browsing this Thread

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

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 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 55 56 57 58 59 60 61 62 63 64 65 66