contact down on added shape in MS surface

Apr 20, 2009 at 4:15 PM
Edited Apr 20, 2009 at 4:27 PM

I have added a shape representing a region on the map in virtual earth (using the AddShape method inside the VEMap class); now I want the possibility, when touching this shape with a
finger (on the ContactDown event), to have the raising of an event in order to perform some actions; I've checked on the virtual earth SDK but I've found the BindingsManager class but
I don't know if it could be the right approach (is the ContactDown manageable inside a bind tag?) for my case.

Apr 21, 2009 at 3:54 AM
VE doesn't know about ContactDown/Up events and will only respond to mouse click events.  Unfortunately, when you touch the Surface it does not make a click event as well.

I haven't looked into this in depth but one thing you could try is handling ContactDown on the VEMap, transforming the screen position to a VELatLong (there are helper methods on VEMap) and then checking to see if that Lat/Long is inside your regions.  You could either do the processing yourself (it would involve some math in the case of concave regions) or there might be a function in VE to intersect with your polygon.  Look at how IsBehindEarth works for some ideas, maybe.