2

It is my first attempt to use JavaScript and the ESRI products. I am using the World Light Gray Base map for my first web GIS application.

I have a question about the map full extent method. I would like to set the full extent size so users can't zoom out no more than my full extent setting. So the map always fully covers the map window. At the moment, if I zoom out the World Light Gray Base Map, the full size of the map is getting smaller so it covers a small part of my map window.

Could anyone helps me how to set up the maximum zoom out size so my map window is always covered by the world light gray map?

Best,

1 Answer 1

2

For Javascript, you need to specify various Levels of detail which restricts zooming to certain levels. However, a user could still pan anywhere they wanted (granted, if they are that dedicated to doing something silly at a close zoom level....) so you could check if the extent has changed beyond your desired values and just snap them back to the original.

2
  • Thank you for the answer. The reason I want to do this is I would think the system should prevent user's silly behaviour. By the way, I have one more question that relateds to this. I am using two monitors:1)15", 2)17". When I launch the code on the 15" monitor the ESRI gray map covers entire the map window. However, when I launch the code on the 17" monitor there are empty spaces both left and right outside of the map. (between the map window edge and the displayed map). Is it normal acting? Thanks in advance.
    – gisking
    Jun 28, 2013 at 14:11
  • Yes, there should be option for that, since there rarely is a reason to give access to the entire world. Re your question, I'm not sure as my dual monitor setup is identical.
    – Paul
    Jun 28, 2013 at 14:17

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.

Not the answer you're looking for? Browse other questions tagged or ask your own question.