View Full Version : FindPushpin fails

10-12-2006, 06:27 PM

I'm using the MapPoint 2006 ActiveX control in a .NET 2.0 application. I have a pushpin set of about 800 uniquely named items. Each has a name like this:


After finding about 32 of them, FindPushpin fails quite often but with no discernible pattern except that it fails on the same names each time. The only thing I could find on the web about FindPushpin failing had to do with odd characters or very long names. In another use of FindPushpin that was failing, I tried calling it a second time after it failed once and at least once it succeeded on the second try! Does anyone have any idea what's going on here? Some of the pushpins are physically very close to each other, but as I said, each has a unique name.

David Orenstein

10-13-2006, 01:28 PM

The problem could be the dots. If you try FindResults it will probably work, but I think it will be slower, you can try out.

If you have same format in name then you can replace the dots by other character or leave them out eventually.

10-13-2006, 03:01 PM

You were right as usual. But it boggles the mind that a Microsoft product that was presumably written to .NET or MFC is incapable of doing a string comparison! (On the other hand it is puzzling that sometimes it works.) Unfortunately, I need the dots in the name, so I'll have to use another method.



10-14-2006, 02:31 AM
Hi David,

If you really need to display the dots in the name, then you can hold an array of PushPin in your application and do the search there.