This project is read-only.

New draw

Dec 1, 2015 at 7:16 AM
I drew a circle that function

int draw_hndl ;
draw_hndl = map60.NewDrawing(MapWinGIS.tkDrawReferenceList.dlScreenReferencedList);
map.DrawCircle(e.x, e.y, 20, 0, false);

how to bind circles to the polygon?
so that when you move the map, they also moved
Dec 1, 2015 at 8:25 PM
I knew how to do this, I use a marker detailed example here link, and now I have one more question, how to link these markers lines
This is an example:

I really hope for your help!
Dec 2, 2015 at 7:30 AM
Can you try dlSpatiallyReferenced instead of dlScreenReferencedList?


Dec 2, 2015 at 8:02 AM
Thank you very much for your answer but if you use a dlSpatiallyReferenced the scale is also changing, as I only need to change the coordinates but does not scale
Dec 2, 2015 at 8:07 AM
OK, then it might be best to recreate the data on your drawing layer on every move or zoom.
Perhaps you can do a combination. Create a dlSpatiallyReferenced so you don't need to worry about panning.
And when you zoom in/out you recreate the drawing layer.
Dec 2, 2015 at 8:14 AM
or I can set the radius of which will not be change when zooming?

double x = 0;
double y = 0;
MapWinGIS.Point pnt = new MapWinGIS.Point();
map.PixelToProj(e.x, e.y, ref x, ref y);
pnt.x = x;
pnt.y = y;
int draw_hndl = map.NewDrawing(MapWinGIS.tkDrawReferenceList.dlSpatiallyReferencedList);
map.DrawCircle(pnt.x, pnt.y, 1, 20, false);
Jan 12, 2016 at 4:10 PM
Please tell me how to build a line between markers?
Jan 13, 2016 at 10:22 AM
Jan 13, 2016 at 12:04 PM
Thanks for the answer. I first place the markers, the markers and then you need to build lines. How do I get the coordinates of the markers?
it will be something like a direct route
Jan 13, 2016 at 12:26 PM
If you placed the markers you know the coordinates, right?
Perhaps you need to convert them from pixels to coordinates:
or the other way:
Jan 13, 2016 at 1:15 PM
All right, but you need to build a line from one marker to another as a click on the marker to get its coordinates?
let's say I have 10 markers and the line should be built from the 7 to 5, from 5 to 3, from 3 to 10, from 10 to 1, and so on. Click on the 7 and then 5 build a line between them.

Thank you.
Jan 21, 2016 at 2:04 PM
I still not understand what you want to do and what is not clear.
Could you try to explain it again?


Jan 26, 2016 at 9:41 AM
Well I'll try to explain again.
I did 10 markers. Can I get the coordinates of any of the markers?
Can I get the coordinates of the marker by clicking on it?

Thank you.
Feb 29, 2016 at 7:09 AM
Edited Feb 29, 2016 at 7:11 AM
I put markpoint of this example
I want to get the shapes that I put, I use this code
private int getSelectedShape(double xCoord, double yCoord, MapWinGIS.Shapefile sf)
                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?
Feb 29, 2016 at 9:24 AM
Could you explain what is not working as expected?
  1. Is sf.SelectShapes returning false?
  2. Does your method trow an exception? If so which one.
  3. Does sf have a the shapes you are looking for?
Mar 15, 2016 at 6:40 PM
Yes, I did it !!! please tell me how to get the distance between two shape GeodesicDistance always shows 0?
Thank you very much!!!
Mar 17, 2016 at 4:18 PM
Do you mean you solved your issue?
Could you please let us know what you did so future users can use it as a reference.

Your question about the distance is a new one. Could you please make a new post?
Did you try Shape.Distance: