Community of MapPoint and Virtual Earth Users and Developers
This is a discussion on How to detect a particular pushpin within the MapPoint 2006/2009 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 added with ...
| |||||||
| Today's Posts | Twitter Feed | Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| How to detect a particular pushpin 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 |
| |||
| 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
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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; Code: Pushpin pp = MP.ActiveMap.Selection as Pushpin;
if (pp != null)
if (pp == thePP)
Console.Beep();
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| 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 |
| |||
| Re: How to detect a particular pushpin
Hi Gerhard, Glad it works. Thanks for feedback.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| Tags |
| detect, pushpin |
| ||||
| Posted By | For | Type | Date | |
| Latitude / Longitude DMS -> Decimal Converter - MP2K Magazine | This thread | Refback | 05-05-2008 11:55 PM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 05-05-2008 08:09 AM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Really no way to detect a Pushpin drag, is there? | aroberts | MapPoint 2006/2009 Discussion | 1 | 03-31-2008 06:03 AM |
| How to detect Shape Name on SelectionChange event | tfmiltz | MapPoint 2006/2009 Discussion | 1 | 11-02-2007 01:49 PM |
| Detect presence of pushpin | PMACAFEE | MapPoint 2006/2009 Discussion | 1 | 11-19-2006 01:48 PM |
| Detect a pushpin name change. | Daniel | MapPoint 2006/2009 Discussion | 2 | 08-10-2004 06:27 AM |
| Finding Pushpin Name by clicking on the Pushpin?(MP 2002) | NickSP | MapPoint 2006/2009 Discussion | 4 | 01-10-2003 12:11 PM |
Majorca Holiday
Enjoy a Majorca holiday at a good price when you check out the offers on UlookUbook for this popular destination!
Pubs London
Looking for pubs in London? Qype has all the anwsers!