Story Map Zoom Level

4628
3
Jump to solution
03-08-2016 09:45 AM
TotranMai
New Contributor II

Hi,

I’ve downloaded a shortlist ESRI story map codes and try to set the fixed min/man map zoom level,

Some posts here advise to add minZoom and maxZoom properties to the core.js, however the shortlist story map code only came with MAIN.JS

\shortlist-storytelling-template-js-1.4.7\app\js\main.js

I tried to add the minzoom and maxzoom properties in the main.js but it didn’t work

var mapDeferred = esri.arcgis.utils.createMap(WEBMAP_ID, "map", {

mapOptions: {

slider: false,

wrapAround180:false

minZoom: 10,

maxZoom: 12

},

ignorePopups: true

});

Did I do something wrong? Please help!!!

Thanks

0 Kudos
1 Solution

Accepted Solutions
WilsonLee
Occasional Contributor

hi mark,

i found a solution, setting the var lod works for me.

            [ 

                {

                      "level": 13,

                      "resolution": 19.1092570712683,

                      "scale": 72223.819286

                    }, {

                      "level": 14,

                      "resolution": 9.55462853563415,

                      "scale": 36111.909643

                    }, {

                      "level": 15,

                      "resolution": 4.77731426794937,

                      "scale": 18055.954822

                    }, {

                     "level": 16,

                      "resolution": 2.38865713397468,

                      "scale": 9027.977411

                    }

            ]; 

  var mapDeferred = esri.arcgis.utils.createMap(WEBMAP_ID, "map", {

  mapOptions: {

  slider: false,

  wrapAround180:false,

  lods: lods

  },

  ignorePopups: true

  });

View solution in original post

3 Replies
MarkCooney
Occasional Contributor III

Hi Totran,

That should do the trick.  Have you tried clearing your browser cache and reloading?

Mark

0 Kudos
WilsonLee
Occasional Contributor

Hi Mark,

I cleared the browser cache and reloaded the site, but it's still not working (i can zoom in/out at all levels)

is it the api version issue?

thanks,

Wilson (I work with Totran)

0 Kudos
WilsonLee
Occasional Contributor

hi mark,

i found a solution, setting the var lod works for me.

            [ 

                {

                      "level": 13,

                      "resolution": 19.1092570712683,

                      "scale": 72223.819286

                    }, {

                      "level": 14,

                      "resolution": 9.55462853563415,

                      "scale": 36111.909643

                    }, {

                      "level": 15,

                      "resolution": 4.77731426794937,

                      "scale": 18055.954822

                    }, {

                     "level": 16,

                      "resolution": 2.38865713397468,

                      "scale": 9027.977411

                    }

            ]; 

  var mapDeferred = esri.arcgis.utils.createMap(WEBMAP_ID, "map", {

  mapOptions: {

  slider: false,

  wrapAround180:false,

  lods: lods

  },

  ignorePopups: true

  });