ArcGIS API for JavaScript – Restricting Base Map on Specific Extent

arcgis-javascript-api

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.

Best Answer

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

Related Question