Create Envelope from selected point features

3751
4
Jump to solution
05-28-2013 08:14 PM
GakuminKato
New Contributor III
Hi all,

I have a question on Envelope. What I want to do is to create Envelope from selected point features.
The features are originally ArcGISFeatureLayer. Then, I select a point with attribute query.
As far as I know, Envelope can be created from either Point object or  XY coordinates, correct?
I cannot figure out either how I can pull XY coordinates out of the selected features (Graphic or Featureset) or somehow convert selected features to Point...

I would be very grateful if you could help me out...
Any thoughts, ideas and comments are more than welcome.

Thank you in advance,
Gakumin
0 Kudos
1 Solution

Accepted Solutions
ThomasBinu
New Contributor III
I am not sure I understand your question but, I think you are looking for the method

featurelayer.getGraphicIDs(pointX, pointY,
                    Constants.TOLERANCE, Constants.N0_OF_GRAPHICS_TO_BE_DETECTED);

View solution in original post

0 Kudos
4 Replies
GakuminKato
New Contributor III
Let me add comments for my question.

What I want to do ultimately is to check if a single tap XY point is near to pre-selected point(s). My current approach was to create envelope(s) from the pre-selected point(s), if this is possible, then check if the tap point is included in the envelope(s) by using .contains(Point p) method.

I would be very happy if there were any good ideas to realize what I want to do...
Thanks,
Gakumin
0 Kudos
ThomasBinu
New Contributor III
I am not sure I understand your question but, I think you are looking for the method

featurelayer.getGraphicIDs(pointX, pointY,
                    Constants.TOLERANCE, Constants.N0_OF_GRAPHICS_TO_BE_DETECTED);
0 Kudos
GakuminKato
New Contributor III
Hi tmsbn90,

Thank you for your advice!
I see, I think I can use your approach... Let me try this, and I will report the result.
Thank you so much,
Gakumin

I am not sure I understand your question but, I think you are looking for the method

featurelayer.getGraphicIDs(pointX, pointY,
                    Constants.TOLERANCE, Constants.N0_OF_GRAPHICS_TO_BE_DETECTED);
0 Kudos
GakuminKato
New Contributor III
Hi tmsbn90,

I have tested your approach. It worked! Thank you so much!
Here is my updated workflow;
1. Select points from ArcGISFeatureLayer (query with attribute value)
2. get x,y from single tap
3. Check if there are any selected points of step1 around the single point of step2, by using "featurelayer.getGraphicIDs(pointX, pointY,
                    Constants.TOLERANCE, Constants.N0_OF_GRAPHICS_TO_BE_DETECTED)"

I really appreciate your help..
Gakumin

I am not sure I understand your question but, I think you are looking for the method

featurelayer.getGraphicIDs(pointX, pointY,
                    Constants.TOLERANCE, Constants.N0_OF_GRAPHICS_TO_BE_DETECTED);
0 Kudos