I am trying to make use of the MapView's goTo function when adding a new layer to a map, but it does not seem to work. When the layer is added, itThe wkid of the layer is 26917 (NAD83), and I have tried others that correspond to that (4326, 4269, etc.), but they don't work either. I have used my code on layers that use wkid 3857 and that works fine, but for some reason can't get it to work with this one (Note:
For more context, here is my code:
var mapExtent = new Extent(extent.xmin, extent.ymin, extent.xmax, extent.ymax, new SpatialReference({ wkid: 4326, latestWkid: 4326 }));
view.goTo(mapExtent);
Output:
My MapView's spatial reference is set to 3857, but as far as I am aware, that cannot be changed. Any help or tips would be great!