JSAPI 4.0 Levels of Detail - how to set?

1062
3
Jump to solution
08-04-2016 10:39 AM
DavidColey
Frequent Contributor

Hi -

I'm trying to figure out how to set the levels of detail at 4.0 to control zoom extents.  Is there a way at this time to set at the map or mapview class?

Thanks

David

0 Kudos
1 Solution

Accepted Solutions
thejuskambi
Occasional Contributor III
3 Replies
thejuskambi
Occasional Contributor III

Are you looking for something like LOD in constraints

MapView | API Reference | ArcGIS API for JavaScript 4.0

DavidColey
Frequent Contributor

Yes Thejus, that's exactly it, I should have been more clear.  I've got my lods var set in an array:

var myLods = [{"level" : 0, "resolution" : 4891.96981024998, "scale" : 18489297.737236},
        {"level" : 1, "resolution" : 2445.98490512499, "scale" : 9244648.868618} . . . ];

then set my view constraints:

view.constraints = {
  effectiveLODs : myLods
  };

can't see seem to get past an accessor type error

0 Kudos
DavidColey
Frequent Contributor

I got it, thanks for the help:

view.constraints = {
  lods : myLods
};