Quantcast
Viewing all articles
Browse latest Browse all 2341

New Post: New draw

I put markpoint of this example http://www.mapwindow.org/documentation/mapwingis4.9/_mark_points_8cs-example.html
I want to get the shapes that I put, I use this code
private int getSelectedShape(double xCoord, double yCoord, MapWinGIS.Shapefile sf)
        {
            try
            {
                List<object> nn = new List<object>(); 
                MapWinGIS.Extents boundBox = new MapWinGIS.Extents();
                boundBox.SetBounds(xCoord -20, yCoord - 20, 0.0, xCoord + 20, yCoord + 20, 0.0);
                object selectedShapes = new object();
                if (!sf.SelectShapes(boundBox, 0, MapWinGIS.SelectMode.INTERSECTION, ref selectedShapes))
                    return -1;
                int[] shapes = (int[])selectedShapes;
               boundBox = null;
                return shapes[0];
            }
            catch (Exception ex)
            {
                throw new Exception("Error in getSelectedShape: \n" + ex.ToString());
            }
        }
but I can not please help
Can I get an array of objects?

Viewing all articles
Browse latest Browse all 2341

Trending Articles