views:

82

answers:

2

I am using the latest Phone 7 RTM tools ( downloaded it today, October 7 2010).

I am trying to do a simple thing here:

when the user taps once on the map control, i want to put a pushpin there. also, i want to keep the regular built-in behavior of the map control ( tap twice to zoom).

(If it's not possible to keep both behaviors , then maybe a long press on the map to put pushpin).

When trying figuring this out, i came across this documentation of the changes made to the control map for Phone7: http://msdn.microsoft.com/en-us/library/ff955762.aspx

Then i saw the new class MapInputEventArgs, which has a ViewportPoint member.

When looking at code examples on the regular SilverLight map control i saw something like this:

private void OnMouseClick(object sender, MapMouseEventArgs e)
    {
        Point clickLocation = e.ViewportPoint;
        Location location = x_Map.ViewportPointToLocation(clickLocation);

        Pushpin pushpin = new Pushpin(); 
        m_PushpinLayer.AddChild(pushpin, new Location(latitude, longitude));
    }

But in Phone7 case, I can't find the appropriate event handler, and I could not find who uses MapInputEventArgs in the map control. Searching it on google gets me only 1 result !!

So , where is the appropriate event for "Tap once", and how can i get a ViewportPoint after this event has been fired ?

Thanks in advance.

A: 

I am having exactly the same problem. I can not find the right event handler.

Nevin