Wpf map : How to make a point feature on mouse click?

2269
1
05-17-2013 01:50 PM
akpagaakpaga
New Contributor
Hi friends,

I am very new to WPF Arcgis for mobile. I am not able to find good resources as well.
I am trying to make new points on my map when a user clicks on it. This is what i have so far. But it just makes on point on the centre of my map extent. Can some one please show me how to create points on mouse click and add the new feature to the feature table.  Thank you in advance

private void map1_MouseDoubleClick(object sender, System.Windows.Input.MouseButtonEventArgs e)
        {

            var mobileCache1 = MobileCacheMap.GetMapLayerFromCache();
            map1.MapLayers.Add(mobileCache1);            

            var myGeometry = new ESRI.ArcGIS.Mobile.Geometries.Point(new ESRI.ArcGIS.Mobile.Geometries.Coordinate(map1.FullExtent.XCenter, map1.FullExtent.YCenter));
            //map1.ExtentChanged += new EventHandler(map1_ExtentChanged);
            GraphicLayer gl = new GraphicLayer();
            map1.MapGraphicLayers.Add(gl); // add graphic layer to the map control
            gl.GeometryBag.Add(myGeometry); // add a geometry to the graphic layer
 
         }
0 Kudos
1 Reply
akpagaakpaga
New Contributor
I got my task completed with help of this thread: http://forums.arcgis.com/threads/28794-data-collection-WPF

Posting it here so that some one seeking the same cause can take note of it.


now i would like to open a feature grid when clicked on a point showing the point attributes ?
Cans someone please suggest few ideas..
Thank You
0 Kudos