Change Spatial Reference

216
1
11-24-2021 03:36 AM
benchikh
New Contributor III

Hi,

Actually Im working with Directions widget under  Arcgis api 3.38, and I have noticed that the points generated by the widget by default have a special format (Lat: -295814.2467043314 Long :4036503.8700564974 I think used esri Spatial reference latestWkid3857 wkid102100

So what I want is to change it to use my own spatial reference Spatial Reference: 32629  

I have tried the below instructions but didn't worked with me

 

 

var sr = new SpatialReference({ wkid: 32629});
var map = new Map("map", {
                basemap: "streets",
                center: [-7.603869, 33.589886],
                zoom: 7,
                spatialReference: sr
            });

 

 

 

 

0 Kudos
1 Reply
CourtneyMenikheim
Occasional Contributor

When you create the map, you can only use the properties available for the options object, not just any property from the map.

You can view the list available options for the properties here. Setting the spatial reference isn't one of them. This is essentially a "read-only" property for the map.

Courtney Menikheim | Application Developer | @thecmenikheim