locked
Collision Detection? RRS feed

  • Question

  • Is there a way to have the control recognize when two pushpins are on top of each other and draw them with a temporary offset so both pins could be seen?  Thanks.
    Wednesday, June 28, 2006 2:31 PM

Answers

All replies

  • I don't think there is anything built in yet. I had to build custom handling for this in my application, but it only works when loading a batch of points, and won't detect collisions if I add pushpins one at a time.
    Thursday, June 29, 2006 12:42 PM
  •  ghamm wrote:
    ... I had to build custom handling for this in my application...

    Any chance you could share some of your solution?

    I'm hoping this becomes part of Virtual Earth proper. I'm sure they could dig the algorithm out of MapPoint easily.

    Glenn

    Friday, June 30, 2006 3:45 AM
  • Well as I originally stated, this only works for loading a batch of points at once.

    MY logic was fairly simple, I sorted my batch of points by latitude/longitude, and as I looped through my data and plotted each point, I compared the last coordinate pair to the current one, and if they were the same, I created a list of sorts. Then, once I get a point that is different from the previous point, if a list exists, I create a default pushpin and put the list I created into the mouseover.

    I've thought about ways to do this outside of a batch, or in a non-sorted order, but my ideas would require a handful of array management and looping, and for the sake of my application, just wasn't necessary.

    Thursday, July 6, 2006 12:57 PM
  • Friday, July 7, 2006 7:38 AM