Q&A - Question

find the clicked point

JörD asked on August 21, 2018, keyword: Viewer / Editor

I have a shape (for example: line, polygon or multi point) on the map. After click event I got a shape from the GIS:
ptg := aGis.ScreenToMap( Point(aX, aY ));
shp := TGIS_Shape( aGis.Locate( ptg, 5/aGis.Zoom ) ) ;
Is there a way to find out what a shape point was clicked on? 

Thank you in advance.
Tomasz Kosinski (TatukGIS) replied August 17, 2018

Try to use TGIS_LayerVector.LocateEx which provides more information 

You can also use TGIS_ShapeArc.GetDistanceOnLine to find point location relative to shape starting point.
JörD replied August 21, 2018

thank you for your answer.

I think, I need two functions: TGIS_ShapeArc.GetDistanceOnLine and TGIS_ShapeArc.GetPointOnLine.

Where can I find the examples of how to use these features?

Thank you in advance.
Tomasz Kosinski (TatukGIS) replied August 21, 2018
There is no direct sample. However, both methods are used extensively in GisGeocoding unit
If you would like to answer the question please Sign In.
Please review our recent Privacy Policy.
If you have any questions or requests, please contact us.
The Questions and Answers (Q & A) is intended to provide a means of communication between TatukGIS customers.
  1. Licensed users (with active maintenance play) of TatukGIS products may contribute to the Q & A content. Read-only access is available to anyone.
  2. Keep the content positive and professional.
  3. Be courteous to others by posting information when a question or issue asked on the Q & A is answered or resolved by other means (such as with help from TatukGIS technical support). Offer others at least a hint how the posted question was answered or the issue was resolved.
  4. The Q & A is not a replacement for TatukGIS technical support. TatukGIS team may or may not regularly follow or contribute content.