Select to view content in your preferred language

Story Maps : Spyglass App : Control the maximum scale level

3178
3
11-09-2014 07:53 PM
MarkChilcott
Occasional Contributor III

Hi Peoples,

I have created a web map in ArcGIS Online that has two layers.  The top layer is a cached map service, which goes down to level 18, and the basemap is a cached image service that goes down to level 19.

When I create a Spy Glass app from the map, the app allows me to zoom down to level 18, at which point all is good, but then it allows me to zoom to level 19, in which case I have data in the basemap, but not in the top layer.  The result is there is no data in the spy glass, which looks a bit average.

I need to be able to tell the app that level 18 is the most it should zoom into.

Anyone know how to achieve this with the app hosted in ArcGIS Online?

Cheers,

Mark

0 Kudos
3 Replies
CONABIONC_for_Knowledge_and_Us
Occasional Contributor

Hi Mark,

in the swipe app, which builds on the same application as the spyglass app, you can add a "maxZoom" parameter in the mapOptions of Core.js. I guess the same should work in the spyglass-code.

E.g.:

arcgisUtils.createMap(webmapId, divId, {

                                                               mapOptions: {

                                                                              slider: divId != "lensMapNode",

                                                                              autoResize: false,

                                                                              infoWindow: app.popup[index],

                                                                              showAttribution: divId != "lensMapNode",

                                                                              minZoom: 1,

                                                                              maxZoom: 11,

                                                                              usePopupManager: true

                                                               },

kind regards,

Flo

MarkChilcott
Occasional Contributor III

Hi Flo,

I am hosting in ArcGIS Online, and thus I don't think I have access to the code.

In this case, the level looks to be determined by the basemap, and you are not able to alter the value in the online app provided.

Cheers,

Mark

0 Kudos
CONABIONC_for_Knowledge_and_Us
Occasional Contributor

Hi Mark,

as far as I know you are right - you need to download the app´s code and host it on our own.

best regards,

Flo

0 Kudos