WPF Map

746
1
08-18-2010 07:36 AM
BrianGustafson
New Contributor III
How do I do a select or an identify using the WPF map?  It does not have a current map action property.
0 Kudos
1 Reply
MelindaFrost
Occasional Contributor
I have not yet had to do an identify but I have built a tool for selection by envelope. I just but a WPF button on page and on the Click event used the EnvelopSketchTool. There are other types of Sketch Tools- so I would look at those and see if any of those work better for what you need.

when clicked-
m_lastNavigatioMode = map1.CurrentNavigationMode;
            map1.CurrentNavigationMode = ESRI.ArcGIS.Mobile.WPF.NavigationMode.None;
            envelopeSketchTool = new EnvelopeSketchTool();
            envelopeSketchTool.AttachToSketchGraphicLayer(selectionLayer); //selectionLayer is a MapGraphicLayer
            envelopeSketchTool.SketchCompleted += doneSketch;


the on event firing
 private void doneSketch(object sender, EventArgs e)
        {                  
            Envelope env = envelopeSketchTool.Envelope;
            if (envelopeSketchTool != null)
                envelopeSketchTool.DetachFromSketchGraphicLayer();
             //do something    
}


Let me know if you come up with something else.
0 Kudos