0

I want to move the zoom to an extent.

I have this var:

var extentGeo = esri.geometry.webMercatorToGeographic(map.extent);
console.log('extentGeo', extentGeo);
// { cache: undefined
// spatialReference: {wkid: 4326}
// type: "extent"
// xmax: -70.60487747064096
// xmin: -70.67328452935668
// ymax: -33.42183884025852
// ymin: -33.48435589231657 }

Is there a way to move the map using those extent.xmin, extent.ymin, extent.xmax, and extent.ymax ?

2
  • 2
    Which api version are you using? V3 and v4 has different methods for that
    – NettaB
    Oct 5, 2019 at 21:04
  • Getting extent from the map and setting it to the same extent will not show any change. Can you explain more about what you are trying to do?
    – neogeomat
    Nov 27, 2019 at 11:31

1 Answer 1

1

You can try with map.setExtent

Not the answer you're looking for? Browse other questions tagged or ask your own question.