I'm writing a Windows Forms app in .NET 2.0 that helps our routers and call center staff plot services stops on a MapPoint 2006 Active-X map.
The trick is when a user clicks on a pushpin on the map, the axMapPoint_SelectionChange event is supposed to figure out the invoice number of the selected pushpin, the associated invoice number then highlight the corresponding node in a treeview adjacent to the map and display information about that stop.
I'm trying to figure out the best way to uniquely identify the pin objects on the map. I've tried capturing the pin.GetHashCode() values to a ADO.NET data table as the pins are created, however, I've noticed that sometimes these numbers don't stay the same even if I don't update the map. If any of the pushpin has code values change, I have no way of looking up which pin has been selected.
Right now I'm stuck setting the pin.Name property to the corresponding stop's invoice number but this is really awkward because I'd like to name the pin something more intuitive than the invoice number of the stop.
Does anybody have any recommendations for uniquely identifying pushpins on a map?