Search results in different projection than map

1542
1
10-26-2015 01:44 PM
wcESRI
by
New Contributor

 

 

Hello,

I have a Search object and event with the following code

var myEntryX = myEntryGeometry.x;
var myEntryY = myEntryGeometry.y;

'<!>Your coords are \n' + myEntryX + ', ' + myEntryY + ', ' + myEntryGeometry.spatialReference.wkid);

 

This yields

<!>Your coords are

I noticed my spatial reference for this data is 102100, which is WGS 1984.  However, this data is being returned with coordinates in meters.

 

I have data available in 4326, which is WGS 1984 in decimal degrees.  This is also the reference for my layers and map.

 

Can I get the search object results in 4326, which has the xy coordinates in decimal degrees?

 

Thanks in advance!

0 Kudos
1 Reply
RobertScheitlin__GISP
MVP Emeritus

Christopher,

   WKID 102100 is web mercator the standard for all esri basemaps. the JS API has simple classes to convert 102100 to 4326 it is called webMercatorUtils

0 Kudos