AnsweredAssumed Answered

y values not honored in initial extent

Question asked by deleted-user-3QvhwBivZdaR on Apr 25, 2017
Latest reply on Apr 26, 2017 by deleted-user-3QvhwBivZdaR

I am trying to set the initial extent of a basemap, but for some reason I cant see, the x values are honored while the y values are ignored.  i am using 3.10 JS API.


var initialExtent = new esri.geometry.Extent({

"xmin":969819.213195 ,

"ymin":187672.422691 ,

"xmax":1035263.657639 ,

"ymax": 225505.756024,

"spatialReference": {
"wkid": 102718


the I add to map constructor:


map = new Map("map", {
zoom: 3,
sliderPosition: "top-right",
sliderStyle: "small",
extent: initialExtent,
infoWindow: infoWindowPopup


and I check it with:


dojo.connect(map, "onExtentChange", showExtent);
function showExtent(extent) {
var s = "";
s = "XMin: "+ extent.xmin.toFixed(6) + " "
+"YMin: " + extent.ymin.toFixed(6) + " "
+"XMax: " + extent.xmax.toFixed(6) + " "
+"YMax: " + extent.ymax.toFixed(6);
console.log('s: ' + s);


on the initial load, the x values are exactly what I have above, but the y values are both lower values.  Even if I move the map, and add the new extent given in console to the code, the map does not set to my y values after refresh.


What is happening here? I know the extent I am trying to set is well within the extent of the basemap.extent calculation javscript api