Community of VE/MapPoint Users and Developers
This is a discussion on Unique pushpin object identifier? within the MapPoint 2006/2009 Discussion forums, part of the Map Forums category; I'm writing a Windows Forms app in .NET 2.0 that helps our routers and call center staff plot services stops ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Re: Unique pushpin object identifier?
Andre, Since no answers have been put forth, I'd like to say that I think the invoice number are most appropriate - though you might rather put them in the Note property or define the SetFieldsVisibleInBalloon property for .ImportData. Mike Mattys |
| ||||
| Re: Unique pushpin object identifier?
Is .ImportData something that's exposed in the Active-X object through .NET 2.0? I thought it was somehow used for importing addressess from an Excel file, not for adding properties when coding through .NET. My attempts to build a hash table around the pins' GetHashCode() method have been a miserable failure - for whatever reason, after the active map's _SelectionChange has been invoked a few times some or all of the pins' hash values change. Andre Ranieri |
| |||
| Re: Unique pushpin object identifier?
Hi, Another possibilitie is that you hold an array of objects containing all the pushpins in your code. Another member of the object can be the number you wants.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
| |||
| Re: Unique pushpin object identifier?
Forgive me if I'm missing something, but I believe that your situation doesn't really require unique identifiers, since you have already "uniquely" selected a single pushpin object? Also, isn't it possible that multiple pushpins would represent a single invoice number? This being the case, you should simply store the invoice number in the pushpin's Name property, or more effectively as a field in the DataSet.Fields collection just as Mike Mattys suggests. In the latter method, you can easily find the pushpin's field data by using the Recordset.MoveToPushpin() method, and then accessing the recordset's underlying field data to "pop-up" the invoice information. If this is unclear or you have questions, please post back. I'd be happy to provide some sample code. HTH Paul |
| ||||
| Re: Unique pushpin object identifier?
Paul, Mike, Willfired: Thanks so much for the help - I might just need a nudge in the right direction to get me started. In our lawn and tree care corporation, each unique invoice number represents a stop that the truck makes. A customer might have two invoices on a given day, if the truck is servicing both lawn and tree care for the customer. But the invoices have a one-to-one relationship with pushpins on the map. Currently, I've populated the pins' Name field with the invoice number but the users find this cumbersome since the seven digit invoice number is not human-intuitive, especially when two or more invoices are at the same location and MapPoint brings up the "select a place" menu and shows a bunch of invoice numbers. I need some way to uniquely identify each pushpin in code so when the axMap's SelectionChanged event is fired I can sync the selection with what other controls on the form are displaying. I've been trying to do that with the pins' GetHashCode() method but it hasn't worked as the has code seems to change after a few clicks. I would love to take you up on your offer for a few lines of sample code to show how to effectively create and populate a dataset's fields property. Thanks again, Andre |
| |||
| Re: Unique pushpin object identifier?
Hi, I was thinking on a separate class, something like this: Code: public class MyPushpin
{
public Pushpin pp;
public string invoice;
}
When user select a pushpin you parse your array to find the right one and you have the invoice number. Of course you have to maintain the object list when added but also if user delete a pushpin on the map, unless you make deletion impossible for the user.
__________________ rgds, Wilfried Mestdagh www.mestdagh.biz MapPoint coding demo Order MapPoint 2009 with Routing and User Tools Spreadsheet |
![]() |
| ||||
| Posted By | For | Type | Date | |
| MapPoint For Dummies - MP2K Magazine | This thread | Refback | 06-01-2007 06:15 PM | |
| MapPoint Forum Evolution - MapPoint News - MP2K Magazine | This thread | Refback | 05-29-2007 03:57 AM | |
| The Magazine for MapPoint - MP2K Magazine | This thread | Refback | 05-21-2007 05:15 PM | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Unique Identifier Property of a Pushpin? | avxflyer | MapPoint 2006/2009 Discussion | 0 | 10-17-2006 05:42 PM |
| 8 unique data ranges | virgilar | MapPoint 2006/2009 Discussion | 0 | 08-22-2005 12:05 PM |
| Cannot see the Symbol ID from the Pushpin object after searc | fedir | MapPoint 2006/2009 Discussion | 0 | 11-25-2003 07:06 PM |
| Hi, and RoadClass for pushpin object | andrem | MapPoint 2006/2009 Discussion | 0 | 04-04-2003 02:00 AM |
| Numbered Pushpins (unique identifier) | linawms | MapPoint 2006/2009 Discussion | 1 | 04-01-2003 05:02 AM |
Flights Lanzarote
Volcanic landscapes to explore and warm white sandy beaches to relax on. For flights to Lanzarote search Holiday Hypermarket.
Flights to Portugal
Find and book flights to Portugal. Travel Counsellors can help with travel to Portugal including flights and accommodation.
Flights to Cape Town
Before booking flights to Cape Town visit dealchecker.co.uk to make sure you are getting the best deal in town. Visit online today and try the holiday search for free.
Dubai Holidays
Dubai holidays provide you with exotic sights, desert safaris and superb cuisine. There is an extensive range of things to do and see!
Cheap Egypt Holidays
Pick up a bargain cheap Egypt holiday online when you visit ulookubook.com. Just check out our tips to make sure you book at the right time to get a great holiday for a great price. Finding cheap Egypt holidays can be simple when you know how.
All inclusive holidays
To plan all inclusive holidays, use Travel.co.uk to explore all the possibilities.
Cheap Goa Holidays
Experience the world famous Wednesday Flea Market at Anjuna! Book cheap Goa holidays at On The Beach!