Hey,
I'm trying to build an application which contains one tiled and one dynamic map service. The tiled map service has the following tile levels:
1:80000
1:40000
1:20000
1:10000
1:5000
1:2500
So, the service's MaxScale property is 2500.
For larger scales (e. g. 1:500), I want to use the dynamic map service. Unfortunately, within my JavaScript application I can only zoom in up to 1:2500, further zooming either with the buttons or the mouse wheel is not possible and results in panning the map.
Why is this happening? Is it a limitation of the JavaScript API?
Regards and thanks in advance
PS: I've used the JS APIs 3.17 and 4 - same behaviour.
Here is an example of custom LODs Set visible scales | ArcGIS API for JavaScript 3.17
Thanks a lot for your quick responses! But sorry, I don't understand why I should overwrite the defined tile levels!? I don't want to make the job twice: I have already defined my tile levels within the map service. For every larger scale, I don't want to use the flexibility of free zooming.
In fact, I want to achieve the same behaviour like in ArcMap or WPF.
With LOD's you can zoom in closer than 1:2500 and with that you should be able to see the dynamic map service,
Okay, your approach is working. But with this, I would have to extract the LODs of the tiled map service (to preserve the initial levels) and extend those levels for some hard-coded levels for a "dynamic behaviour". Correct?
To line them up, yes.
Do you know whether there are some enhancements in the newer API v4? For this special purpose (combination of tiled and dynamic data), the API seems to me very impractical and not "dynamic".
M U
Please note the following bugs/enhancement requests . You might want to check if they affect you.
BUG-000086266-The resampling and resamplingTolerance property of ArcGIS TiledMapService layer does not display layers beyond its defined LODs.
BUG-000085544-Cached Map Service doesn't resample consistently in all scales in ArcGIS Online
ENH-000088462 : The ArcGIS API for JS documentation does not state that for resampling option for published tiled map service on ArcGIS Online custom LODs can not be used.
The above issues has really affected us as we use our own custom state plane based tiling scheme and we are unable to zoom in between or beyond LODs even if they have been defined in the tiling scheme. We were developing in JSAPI 3.1X.
OK - I had a similar issue a few year's back. I wanted to a basemap that was tiled at zooms of 1:lots to about 1:5,000. Then after that freshly produced mapping from the vector source.
The high level stuff doesn't change that much and is used for quick location purposes. The detailed stuff is OS MasterMap that updates every two months.
I didn't want my users to have only a fixed number of zooms - my users want to print out to scale at all sorts of scales - I cannot second guess the scales they would want.
So, this is what I did
The result is that the users may get a slightly odd looking map at scales between the tiled map levels, but this isn't important. The important thing is getting freshly produced basemapping, straight from the vector source at ALL scales below 1:5000.
A hack - but it works for me
ACM