MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




How to detect a particular pushpin

This is a discussion on How to detect a particular pushpin within the MapPoint 2006 Discussion forums, part of the Map Forums category; Hi, I want to hold a list of all MP-pushpins in memory. What criteria of the PushPin-Object I ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read
  2 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 6 Days Ago
Junior Member
Yellow Belt
 
Join Date: Jan 2006
Posts: 12
How to detect a particular pushpin

Hi,
I want to hold a list of all MP-pushpins in memory. What criteria of the PushPin-Object I added with "AddPushPin" do I have to store in my list, so that I can find the right listentry in "OnSelectionChange"?
I dont' want to use some strings in "Name" or "Note" because the user can change this things.
I tried to store the address of the PushPin-Object, but this didn't work. In "OnSelectionChange" I didn't get the same address as in "AddObject".
greetings
Gerhard
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 6 Days Ago
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 1,952
Re: How to detect a particular pushpin

Hi,

Store the address should be the right thing. Are you sure you get 2 different addresses? I try to do a test later today and come back
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 6 Days Ago
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 1,952
Re: How to detect a particular pushpin

Hi,

I tryed the following code in a button click:

Code:
Location loc = MP.ActiveMap.GetLocation(lat, lon, alt);
Pushpin pp  = MP.ActiveMap.AddPushpin(loc, "Wilfried");
thePP = pp;
Then add a few more Pushpins. Then this code in selectionChange:

Code:
Pushpin pp = MP.ActiveMap.Selection as Pushpin;
if (pp != null)
    if (pp == thePP)
        Console.Beep();
It beeps when pp is the same one as the one assigned to thePP with AddPushpin, and it does not when I select others. So this comparistion works good.
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 5 Days Ago
Junior Member
Yellow Belt
 
Join Date: Jan 2006
Posts: 12
Re: How to detect a particular pushpin

Hi Wilfried,
I stored the PushPin in a var with type "IDispache". Now I tried "MapPoint.PushPin" (wich is defiend as "Pushpin = interface(IDispatch)") and my first test was succesfull. (It's Delphi 2006)
At the moment I have to do some other work, so I can't do a complete test. I will come back when i have done this testing...
Thanks
Gerhard
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 3 Days Ago
Junior Member
Yellow Belt
 
Join Date: Jan 2006
Posts: 12
Re: How to detect a particular pushpin

Hi Wilfried,
It works ok if I store the MP-Pbjects (PushPin, Shape) directly without a Typecast.
Thank you very much.
greetings
Gerhard
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 2 Days Ago
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 1,952
Re: How to detect a particular pushpin

Hi Gerhard,

Glad it works. Thanks for feedback.
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


LinkBacks (?)
LinkBack to this Thread: http://www.mapforums.com/how-detect-particular-pushpin-7643.html

Posted By For Type Date
Latitude / Longitude DMS -> Decimal Converter - MP2K Magazine This thread Refback 5 Days Ago 11:55 PM
The Magazine for MapPoint - MP2K Magazine This thread Refback 6 Days Ago 08:09 AM

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
Really no way to detect a Pushpin drag, is there? aroberts MapPoint 2006 Discussion 1 03-31-2008 06:03 AM
How to detect Shape Name on SelectionChange event tfmiltz MapPoint 2006 Discussion 1 11-02-2007 01:49 PM
Detect presence of pushpin PMACAFEE MapPoint 2006 Discussion 1 11-19-2006 01:48 PM
Detect a pushpin name change. Daniel MapPoint 2006 Discussion 2 08-10-2004 06:27 AM
Finding Pushpin Name by clicking on the Pushpin?(MP 2002) NickSP MapPoint 2006 Discussion 4 01-10-2003 12:11 PM


All times are GMT -5. The time now is 08:51 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5
MP2K Magazine
Visitor Map

Ski Holidays Norway
Whether you are looking for a well-earned rest or just great Ski holidays, Norway is undoubtedly a great place to visit. Book online.

Greece Weather
Check Turkey Weather before you travel. We provide information on Turkey including weather, flights and accommodation.

Holidays Cuba
When you book holidays in Cuba you will find a fascinating country with a heady combination of Spanish, African and Caribbean influences. Check our great deals.

Maldives Holidays
If you are looking for a serene, laid back break in the sunshine, Maldives holidays are the choice for you. Be enchanted by the Maldives!

Holiday
Searching for the perfect holiday? Well check out ULookUBook online to find out all about your destination and also to book a great value holiday.

Cheap Inclusive
Make use of our service at Travel.co.uk to help you to research cheap inclusive holidays.

Cheap Cyprus Holidays
Rejuvenate mind and body! Visit the Mediterranean! Cheap Cyprus holidays can be viewed at On The Beach!


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