AnsweredAssumed Answered

problem in conversion of extent object

Question asked by burton449 on Jan 17, 2014
Latest reply on Jan 17, 2014 by JUihlein-esristaff
Hi,

I am trying to do a map.setExtent(extent, true) but I got this error in the console:
"Map: Geometry (wkid: GEOGCS["Longitude / Latitude (WGS 84)",DATUM["WGS 84",SPHEROID["WGS 84",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Decimal_Degree",0.0174532925199433]]) cannot be converted to spatial reference of the map (wkid: 4326)"


the extent object seems to be good and in the same spatial reference of the map

extent object:

spatialReference: Object
   wkt: "GEOGCS["Longitude / Latitude (WGS 84)",DATUM["WGS 84",SPHEROID["WGS 84",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Decimal_Degree",0.0174532925199433]]"
type: extent
xmax: -72.54337729099996
xmin: -74.16215098199996
ymax: 46.45532899700004
ymin: 45.35837900300004

           var extent = esri.graphicsExtent(result.featureSet.features);            console.log(extent)            map.setExtent(extent.expand(1.5, true);

Outcomes