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.
Asked
Active
Viewed 308 times
2
-
2By "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 '18 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 '18 at 18:12
-
4Possible duplicate of Restricting base map on specific extent in ArcGIS API for JavaScript 3? – GavinR Jun 25 '18 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 '18 at 15:34