how to check if a lat long is within a zoomed-in extent?

507
2
07-28-2021 02:25 PM
ChitraKrishnan
New Contributor III

Hi,

I am trying to find a particular lat long is within a zoomed-in extent.

Sample code is highly appreciated!!!

Thanks

Chitra

0 Kudos
2 Replies
BenElan
Esri Contributor

Here is a sample I put together: https://codepen.io/benesri/pen/dyWmRvv?editors=1001

It uses the Extent's contain method and prints true (extent contains point) or false in the console. It rechecks every time after zooming/panning.

ChitraKrishnan
New Contributor III

Thank you very much. I will try it out.

Thanks

Chitra 

 

0 Kudos