const extXY = new Extent({
xmin: topLeftXY[0],
xmax: bottomRightXY[0],
ymin: bottomRightXY[1],
ymax: topLeftXY[1],
spatialReference: {
wkid: 102100,
latestWkid: 3857,
},
});
//Not working
view.goTo({ target: extXY.extent.expand(1.33) }, { duration: 2000 });
//Working
view.extent = extXY.expand(1.33);
Solved! Go to Solution.
Hi there,
It should work! It is hard to tell why it is not working without a reproducible case. In any case, I tested the following code snippet in 4.24 and it works.
view.when(()=>{
const extXY = new Extent({
xmin: -9177811,
ymin: 4247000,
xmax: -9176791,
ymax: 4247784,
spatialReference: {
wkid: 102100
}
});
view.goTo({ target: extXY.expand(1.33) }, { duration: 2000 });
});
Hi there,
It should work! It is hard to tell why it is not working without a reproducible case. In any case, I tested the following code snippet in 4.24 and it works.
view.when(()=>{
const extXY = new Extent({
xmin: -9177811,
ymin: 4247000,
xmax: -9176791,
ymax: 4247784,
spatialReference: {
wkid: 102100
}
});
view.goTo({ target: extXY.expand(1.33) }, { duration: 2000 });
});