Saturday, 21 November 2015

Restricting base map on specific extent in ArcGIS API for JavaScript 3?


Currently I am using ArcGIS JS API ver 3.3/3.5 in my application.


I want to restrict the basemap for US only .For example one can use default navigation features like zoom in, zoom out for the US Country only.


Trying following things:





  1. I have set the US extent code in my application but when I zoom out then I can see the whole world map I want to restrict it to certain extent only




  2. Going through this question: Restrict pan and zoom in ArcGIS Javascript API?




  3. Restricting the streets basemap using this question, but unable to restrict the map: Using own basemap with ArcGIS API for Javascript?





  4. I am using this sample map in my application.





Answer




Here is an example of one way to do this: http://jsfiddle.net/gh/gist/library/pure/6050806/


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...