Select to view content in your preferred language

How to increase Zoom in level?

2502
7
Jump to solution
08-28-2018 04:16 AM
MuhammadHammad
Emerging Contributor

Dear all,

I have map containing plus and minus buttons for zooming. 

When pressing plus button, it zooms into a certain level, and pressing again will further zoom into the map.

But I would like to increase the zoom in level more.

How could I increase it? Do I need to control it by using Arcmap tool? or should I need to write a java script code to increase the zoom in level of map?

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
7 Replies
RobertScheitlin__GISP
MVP Emeritus

Muhammad,

   The ability to zoom in and out is controlled by the LODs (Levels of Display) that you basemap contains So if you are using one of esri basemaps like the Streets basemap then you have 24 LODs ranging from scales 5.91657527591555E8 (world view) to 70.5310735 (street level detail). So adding the ability to zoom in further will involve adding more LODs to your map object (but that does not mean that the basemap will draw at those scales as it has not been cached for those). You can add LODs to your map object in the maps constructor:

    var lods = [{
      "level": 0,
      "resolution": 0.43402777777777773,
      "scale": 500
    }, {
      "level": 1,
      "resolution": 0.8680555555555555,
      "scale": 1000
    }, {
       ...
    }];

    map = new Map("map", {
      lods: lods,
      ...
    });
MuhammadHammad
Emerging Contributor

Thanks Robert for your reply.

 

I would like to ask that by using LOD, I can be able to see a map at level 7, but for other levels I can see a empty back ground. Why is this happened?

Secondly, as you mentioned scales between 5.91657527591555E8 (world view) to 70.5310735 (street level detail). Why are you using 500 and 1000 values in scale variable. Finally, what is the meaning of resolution variable in the code?


Please let me know about it.


I am using the following code:

 

var lods = [{
"level": 0,
"resolution": 0.43402777777777773,
"scale": 500
}, {
"level": 1,
"resolution": 0.8680555555555555,
"scale": 1000
},
{
"level": 2,
"resolution": 1.302,
"scale": 1500
},
{
"level": 3,
"resolution": 1.736108,
"scale": 2000
},
{
"level": 4,
"resolution": 2.17013577,
"scale": 2500
},
{
"level": 5,
"resolution": 2.60416,
"scale": 3000
},
{
"level": 6,
"resolution": 3.0382,
"scale": 3500
},
{
"level": 7,
"resolution": 3.472218,
"scale": 4000
},
{
"level": 8,
"resolution": 3.90624,
"scale": 4500
},
{
"level": 9,
"resolution": 4.34027357,
"scale": 5000
},
{
"level": 10,
"resolution": 4.77430127,
"scale": 5500
}];
 

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Muhammed,

   So my first question is what are you using as your maps basemap? Is it a custom tiled layer?

My example of 500 and 1000 scale is just me not wanting to take the time to type the actual numbers for the scale. If you are using esri basemaps then the scales and resolutions are predetermined and if you want to add more scales then they have to be half of the previous scale (if trying to get a more zoomed in scale) or twice the last scale (if trying to increase).

Resolution in map units of each pixel in a tile for each level.

The LODs you define have to match the scales your tiled basemap service is set to.

0 Kudos
MuhammadHammad
Emerging Contributor

Thanks Robert for your response.

I am using "myDelorme" as basemap. I am new in GIS, can you please confirm about where can I define LODs in service?

Following is the image of scale settings appear in Arcmap. Do I need to define scales and then use those exact values such as 400, 500, 1000 etc  in "lod" variable at javascript file? and where can I get resolution values from service?

 

Similarly, there are settings appeared in the Layer properties->Source tab as follows:

Scale_Factor: 0.99960000
Latitude_Of_Origin: 0.00000000
Linear Unit: Meter

Do I need to consider them? Please let me know about it.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Muhammad,

   If you are using the esri Delorme base map them the tiling scheme can be found here (i.e scales and resolutions)

Specialty/DeLorme_World_Base_Map (MapServer) 

The only way you can define even scales like you have 400, 500, 1000, etc is if you are actually creating and hosting your own tiled (cached) MapService on your ArcGIS Server.

0 Kudos
MuhammadHammad
Emerging Contributor

Thanks Robert for your response,

Can you please guide me how can "Create and host my own tiled (cached) MapService on my ArcGIS Server" in order to increase Zoom in level? Is there any demo available?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Muhammad,

Here is a tutorial link on doing that:

Tutorial: Creating a cached map service—Documentation | ArcGIS Enterprise