EasyGIS.NET icon indicating copy to clipboard operation
EasyGIS.NET copied to clipboard

Drawing Circles on SFMAP

Open u3z opened this issue 3 years ago • 4 comments

Hello, is there a method of drawing circles on the EASYGIS.NET SFMAP Control? I would like to be able to draw a circle with a certain center point (lat/long) and a radius in Kilometers. Is there a way to accomplish this in easygis.net? I haven't seen an example that shows drawing circles with the SFmap.

u3z avatar Jul 29 '21 01:07 u3z

The control does not include a method to do this, but you can add a paint event handler to do this using standard .net graphics operations. these methods will convert pixel coordinates to map gis coordinates. https://easygis.net/api/output/html/M_EGIS_Controls_SFMap_PixelCoordToGisPoint_2_4ac95b2b.htm https://easygis.net/api/output/html/M_EGIS_Controls_SFMap_GisPointToPixelCoord_1_cfca3a5a.htm

wfletcher avatar Jul 30 '21 23:07 wfletcher

Another thing to consider. The SFMap control has functions to select features intersecting a rectangle or circle. Load a shapefile and set it’s RenderSettings.IsSelectable property to true. Then hold the Shift or Ctrl key down and then drag the mouse with the left or right mouse button down. A rectangle/circle will be drawn and features selected when you release the mouse button.

wfletcher avatar Jul 30 '21 23:07 wfletcher

Is there a possibility to convert distance in KM to number of points which can be used on the graphics drawing event?

On Fri, Jul 30, 2021 at 5:41 PM wfletcher @.***> wrote:

Another thing to consider. The SFMap control has functions to select features intersecting a rectangle or circle. Load a shapefile and set it’s RenderSettings.IsSelectable property to true. Then hold the Shift or Ctrl key down and then drag the mouse with the left or right mouse button down. A rectangle/circle will be drawn and features selected when you release the mouse button.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/wfletcher/EasyGIS.NET/issues/23#issuecomment-890254804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVAJ2TZVX4L2LHLAMR3MRKLT2M2DZANCNFSM5BFOABJQ .

u3z avatar Jul 31 '21 04:07 u3z

The circle is a "funny" object. Can not exist in reality as an SHP file. Using Paint to draw something out the scope of SFmap is fine, However, creating a polyline with 360 points works just perfect for me. Circle

dusko23 avatar Mar 11 '22 06:03 dusko23