Select to view content in your preferred language

JS Api Zoom Out Problem on MapView

781
3
02-25-2018 09:56 PM
TubaKumbara
Regular Contributor

Could you try to maximum zoom out with mouse please. as you can see viewdiv area shrink. Do you have any solution?

Here is the link

https://developers.arcgis.com/javascript/latest/sample-code/views-switch-2d-3d/index.html

thanks inadvance

0 Kudos
3 Replies
RichardReinicke
Frequent Contributor

Hello Tuba Kumbara‌,

I think this behaviour is normal. There are natural bounds on your projection and basemap. What you can do is to set a minimum scale on your view to set a limit for the user to zoom out. You can do this in the View() object:

var view = new MapView({
  container: "viewDiv",
  spatialReference: { wkid: 31463 },
  map: map,
  zoom: 8,
  constraints: {
    minScale: 100000
  }
});
0 Kudos
TubaKumbara
Regular Contributor

Thanks for the answer.


But actually i mean white spaces of top and bottom of map. There is no problem with left and right side. White spaces appears even you define minscale. Please try to move map with mouse to top or bottom continuously.

You can see white space after a while.

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Tuba,

   As Richard explained that is normal behavior the map with wrap around the dateline east and west but the map does not wrap around north and south. So you will encounter a bank map with you beyond the North Pole or South Pole.

0 Kudos