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

PushPin Selection detection in Delphi?

This is a discussion on PushPin Selection detection in Delphi? within the MapPoint Desktop Discussion forums, part of the Map Forums category; When the OnSelectionChange event is fired I would like to be able to determine if the NewSelection is a PuchPin ...

  1. #1
    shadbell is offline Junior Member White Belt
    Join Date
    Dec 2003
    Posts
    4

    PushPin Selection detection in Delphi?

    When the OnSelectionChange event is fired I would like to be able to determine if the NewSelection is a PuchPin Object. Is there a way to figure this out. What I would ultimitely like to do is to display the Street Address in a status bar. I appreciate any help.
    Thanks,
    Shad

  2. #2
    Mossoft is offline Member Yellow Belt
    Join Date
    Feb 2003
    Posts
    48
    Dont do delphi but...

    In VB:
    If TypeOf pNewSelection Is Pushpin Then
    .......................
    end if

    OR

    If TypeName(pNewSelection) = "Pushpin" then
    .....................
    end if


    M.

  3. #3
    lynx is offline Junior Member White Belt
    Join Date
    Oct 2003
    Posts
    5

    Re: PushPin Selection detection in Delphi?

    Quote Originally Posted by shadbell
    When the OnSelectionChange event is fired I would like to be able to determine if the NewSelection is a PuchPin Object. Is there a way to figure this out. What I would ultimitely like to do is to display the Street Address in a status bar. I appreciate any help.
    First off.. a quick note.. anything that returns a IDispatch interface usually means it can be one of many things. You can allways refer to the help at msdn.microsoft.com for a list of the things it can be.

    Now for the solution (assuming the SelectionChange event)

    Code:
    var
      oPushpin: Pushpin;
    begin
      if assigned(pNewSelection) then
      begin
        pNewSelection.QueryInterface(IID_Pushpin, oPushpin);
        if assigned(oPushpin) then
          Showmessage('It's a pushpin!')
        else
          Showmessage('It's NOT a pushpin.');
      end;
    end;

  4. #4
    shadbell is offline Junior Member White Belt
    Join Date
    Dec 2003
    Posts
    4

    Re: PushPin Selection detection in Delphi?

    Thanks a lot! That is exactly what I was looking for.

    Shad
    Thanks,
    Shad

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Pushpin Selection
    By EdB in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 08-14-2005, 10:25 AM
  2. mappoint installed detection
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-29-2004, 04:47 PM
  3. delphi iterate pushpin dataset
    By merlino in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 10-12-2004, 10:20 AM
  4. Vehicle simulation and location detection
    By frenstall in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 02-11-2004, 04:07 PM
  5. Adding custom pushpins to the pushpin selection
    By Anonymous in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 11-28-2003, 04:28 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 26 27 28 29 30 31 32 33 34 35 36