Select to view content in your preferred language

Stop zomming in behind certain scale - Level 19 - Using world topo basemap

2034
3
Jump to solution
03-17-2016 12:35 PM
GabiVoicu
Occasional Contributor

Is there a way to stop/block zooming in behind a certain scale - Level 19 - while using the word topo as a basemap ?

here is an example where we would like to stop at an earlier level than the world topo

Collin County Interactive Maps

Thank you

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RobertScheitlin__GISP
MVP Emeritus

Gabi,

  Sure you just specify the "lods" for your basemap topo when you define your map constructor.

Go to this link and then scroll down till you find lods:

Map | API Reference | ArcGIS API for JavaScript

There is some example syntax there.

View solution in original post

3 Replies
RobertScheitlin__GISP
MVP Emeritus

Gabi,

  Sure you just specify the "lods" for your basemap topo when you define your map constructor.

Go to this link and then scroll down till you find lods:

Map | API Reference | ArcGIS API for JavaScript

There is some example syntax there.

GabiVoicu
Occasional Contributor

Thank you so very much Robert that worked beautifully !

0 Kudos
ReneRubalcava
Frequent Contributor II

You can set the maxZoom of the map to prevent it from zooming past a certain level.

var map = new Map("map", {
  basemap: "topo",
  center: [-122.45, 37.75],
  zoom: 13,
  maxZoom: 15
});

sample app

JS Bin - Collaborative JavaScript Debugging