AnsweredAssumed Answered

Projection Error when adding the basemap

Question asked by aazizmajid on Nov 15, 2018


I am facing projection error (As of my thinking), when adding default ESRI basemap to my application


Map: Geometry (wkid: 32637) cannot be converted to spatial reference of the map (wkid: 102100)


I am using Dynamic layer. And this error occurred on following line

var res = results.features[0];
map.setExtent(res.geometry.getExtent());//getting error at this line

Using ESRI JS API 3.26

Any suggestions how to solve this issue?




Update: I solved the issue by the following method


when doing the query for the results, just added the below line and the results/geometry's spatial reference is same as the map's spatial reference


query.outSpatialReference = { "wkid": 102100 };