2

I'm using ArcGIS JavaScript API 3.24 and im displaying the location of a lat/long and displaying features of a feature layer with 50 miles of that lat/long. Is there way to limit the extent to a 100 mile radius of the lat/long. I have seen ways of limiting the extent for US but how to limit the extent dynamically based on location. I'm now sure how to calculate the extent on the fly for a 100 mile radius and then use those values to limit the navigation.

4
  • 2
    By "limit the extent" do you mean only show features within a particular extent, or do you mean not allow the user to pan outside a particular extent?
    – GavinR
    Jun 23, 2018 at 13:04
  • I mean to not allow the user to pan out of the extent. This application will be used both in desktop and mobile environment and its easy for an user to just swipe on a mobile and navigate far out of the required map.
    – Ravi
    Jun 25, 2018 at 18:12
  • 4
    Possible duplicate of Restricting base map on specific extent in ArcGIS API for JavaScript 3?
    – GavinR
    Jun 25, 2018 at 23:06
  • As i explained clearly in my question, restricting the extent to US is easy as you know what the values of the extent are but when a random location is entered how to determine the extend for a 200 mile radius around that random location?
    – Ravi
    Jun 26, 2018 at 15:34

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.