Over zoom beyond maximum zoom level doesn't work in MapView

379
0
08-28-2019 09:06 AM
FlavieMoraux
New Contributor III

According documentation it is possible to allow user to over zoom beyond maximum zoom level by defining maxScale constraint on MapView to 0.

 

const mapView = new MapView({

      container: "containerDiv",

      map: map

});

mapView.when(lang.hitch(this, function(event){

      mapView.constraints.maxScale = 0;

}));

But it doesn't work, MapView is always locked at basemap's maximum zoom level.

If I set zoom levels on the view by adding extra levels it works.

mapView.when(lang.hitch(this, function(event){

      mapView.constraints.lods = [

         // basemap's maximum zoom level

         // extra zoom level

      ];

}));

Has anyone ever implemented this behavior ?

Regards,

Flavie

.

0 Kudos
0 Replies