defining zoom level with basemaps

6844
10
Jump to solution
04-24-2013 05:37 AM
ErikBlake
Occasional Contributor III
Hello. Is it possible to set the zoom level in the config file to be able to zoom in a lot closer with the base maps. I have developed a few web applications for our water and sewer inspectors. And one issue that we are having is that at some intersections there are multiple valves and you need to be zoomed in pretty close to be able to see how all valves are placed on the water lines. So I guess my question is. I sit possible to overwrite the zoom level in the esri base maps. and if so How do I do that. Thanks in advance with any help with this.
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RhettZufelt
MVP Frequent Contributor
You will just need to add the additional LODs to the config.xml file.  See here: http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Main_configuration_file/01m3000... and scroll down to the <lod> tag.

You can get the current LODs from the REST services for the first basemap loaded (as this is where it is getting the LODs), make sure you copy the existing LODs in there, then add any additional levels that you want to zoom to.

Another way that I have implemented:

I actually needed the option to turn off my basemaps layer, so I just made a blank service, with no displayed data in it.  For this layer, I created a cache and made two additonal cache levels (two more than all my other basemaps), and load this as the first basemap, so it gets the LODs from it.  Since there is really no data in this, it doesn't take too long to generate the cache for it.  So, this gives me the "no basemap" option as well as setting two additional levels of zoom.  It's like getting two birds stoned at once 🙂

R_

View solution in original post

10 Replies
RobertScheitlin__GISP
MVP Emeritus
Erik,

   Sure you define the lods for the map manually. See documentaion here, look for lods:
http://resources.arcgis.com/en/help/flex-viewer/concepts/01m3/01m300000018000000.htm

Here is an example:

    <map wraparound180="false" initialextent="-9598200 3968200 -9500400 4026200" fullextent="-9598200 3968200 -9500400 4026200" top="40" >
        <lods>
            <lod resolution="0.14929107085026672" scale="564.2485881"/>
            <lod resolution="0.29858214164761665" scale="1128.497176"/>
            <lod resolution="0.5971642835598172" scale="2256.994353"/>
            <lod resolution="1.1943285668550503" scale="4513.988705"/>
            <lod resolution="2.388657133974685" scale="9027.977411"/>
            <lod resolution="4.77731426794937" scale="18055.954822"/>
            <lod resolution="9.554628535634155" scale="36111.909643"/>
            <lod resolution="19.10925707126831" scale="72223.819286"/>
            <lod resolution="38.21851414253662" scale="144447.638572"/>
            <lod resolution="76.43702828507324" scale="288895.277144"/>
        </lods>


Don't forget to click the Mark as answer check on this post and to click the top arrow (promote).
Follow these steps as shown in the below graphic:

RhettZufelt
MVP Frequent Contributor
You will just need to add the additional LODs to the config.xml file.  See here: http://resources.arcgis.com/en/help/flex-viewer/concepts/index.html#/Main_configuration_file/01m3000... and scroll down to the <lod> tag.

You can get the current LODs from the REST services for the first basemap loaded (as this is where it is getting the LODs), make sure you copy the existing LODs in there, then add any additional levels that you want to zoom to.

Another way that I have implemented:

I actually needed the option to turn off my basemaps layer, so I just made a blank service, with no displayed data in it.  For this layer, I created a cache and made two additonal cache levels (two more than all my other basemaps), and load this as the first basemap, so it gets the LODs from it.  Since there is really no data in this, it doesn't take too long to generate the cache for it.  So, this gives me the "no basemap" option as well as setting two additional levels of zoom.  It's like getting two birds stoned at once 🙂

R_
ErikBlake
Occasional Contributor III
Thanks guys for the help.
Erik
0 Kudos
ErikBlake
Occasional Contributor III
Ok. Here is my next question. I understand how to put the lods in my config file. But I don't understand how to come up with the resolution and scale numbers. Obviously I can only zoom in as close as the base map coverage will allow, right? for example the first base map in my web application is the esri world Imagery map. I found the levels of details which it says there are twenty of them. So does that mean that the map is only capable of zooming to the last lod listed in the details page? Also does by manually entering lods override my initial extent that I have in my config file. I hope I am asking this the right way. a little confused as to where or how you come up with the lod resolution and scale numbers. Any help would be great. Thanks.
Erik
0 Kudos
RhettZufelt
MVP Frequent Contributor
Erik,

The full and initial extent are set in the <map> tag, and should not be affected by adding LOD's.

As far as the right scale and resolution, maybe someone has  a "good" method of getting them, but here is what I have done in the past to get these values.

I create a new service in the WKID of my map, and add one most basic layer that I have.
Then, create/build cache on service, import from existing service and pick the ESRI basemap you are using.
Then, I add the additional zoom levels that I want and build the cache.

after built, I go to the REST endpoint in my browser and you can see the Level ID, resolution and scale that you need to add to the config.xml.

Like I said, hopefully someone will chime in with a "better" method, but this one works.

R_
0 Kudos
ErwanCaradec
New Contributor II
Hi,
in a flexviewer app, i use a cached mapservice from 1:6.000.000 to 1:2.000 scales as basemap.
My users need to zoom at scales 1:1000, 1:500.

As 1:2000 is the max resolution of the photo i don't want to cache it at highter scales.

I don't wan't to display the photo as a dynamic layer (network performance).

I can add lods for the 1:1000 and 1:500 scales, but is it possible to display the basemap tiles with a lower resolution instead of blank tiles or a no data picture at  highter scales ?
0 Kudos
RobertScheitlin__GISP
MVP Emeritus
Erwan,

You don't want to cache your photos beyond 1:2.000 yet you want to know if you can still have them displayed without making the service dynamic... You can probably guess that the answer is No.

You have these options:


  1. You can turn off your cached service layer all together.

  2. You can Cache your photos at 1500 and 1000 even know their resolution does not go beyond 2000.

  3. You can switch the service to dynamic once beyond 2000.

ErwanCaradec
New Contributor II
Hi robert,
thanks for your reply. I know these 3 options and was looking for another wich probably doesn't exists yet. But could this be an Arcgis for Server cached mapservice enhancement : serving tiles at higher scale level ? or is it a nosense ?
0 Kudos
AnthonyGiles
Frequent Contributor
Erwin,

It was mentioned at the user conference that the ability to zoom in past the lowest zoom level was something that was being looked at for the 3.5 release. Lets see if the team have managed to add this enhancement in time.

Bjorn can you confirm or deny this?

Regards

Anthony
0 Kudos