Select to view content in your preferred language

Set zoom limit - maximal minimal

1960
6
11-08-2010 10:05 PM
MarcelKleinmann
Emerging Contributor
Given a map containing dynamic layers, how does one control the map scales upper and lower limit?

From what I have seen a map that only contains ArcGISDynamicMapServiceLayers can scale from epsilon to infinity but as soon as tiled layers are present the levels of detail (lods) set the scales and with this the limits.
How can I constrain the zoom then, when there are no tiled layers in my map?

Where does one find this sort of information? The online documentation and samples that I know of do not provide such detailed information.

Cheers
0 Kudos
6 Replies
JianHuang
Deactivated User
0 Kudos
MarcelKleinmann
Emerging Contributor
Hi Jian,

thank you for your example.

Though your handling still bases on the onExtentChange event:
dojo.connect(map, "onExtentChange", YOURFUNCTION); 


I did the same, not to constrain the extent but the zoom. The problem is, each time the user zooms in by mousewheel, there will be:

- a zoom in beyond the allowed zoom limit
- a onExtentChange event
- my function, zooming back to the allowed zoom level

I would like to directly access the zoom function of the API to change it. Is this possible?

Cheers
0 Kudos
DaveHighness
Deactivated User
Hi, I would like to do the oposite of this. In my app I load the "World Street Map" tiled map service from ArcGIS Online and my ArcServer service above it. I need to be able to zoom in further on my service than the "World Street Map" will allow. I would like to remove the "World Street Map" at the higher scales and add it again when the scale zooms back out. I can do this easy enough using the onExtentChange event but the Javascript API will still not let me zoom in any further than allowed by the tiled map service. How do I remove this limit when I remove the "World Street Map"? If never load the "World Street Map" I do not have this problem. I can zoom in at will.

Thanks, Dave
0 Kudos
MarcelKleinmann
Emerging Contributor
Hi Dave,

I didn't work with tiled layers yet. Isn't it possible to zoom beyond the limit, by setting the zoom steps through lods? If this doesn't work out, try a workaround by adding another (empty) tiled layer, which allows the zoom in.

Cheers
0 Kudos
MarcelKleinmann
Emerging Contributor
Has any one another idea for the initial zoom problem?
0 Kudos
AxelSchaefer
Emerging Contributor
...


Grab it as an esri.layers.ArcGISDynamicMapServiceLayer.
0 Kudos