LocateButton dijit to work with other spatial references?

663
1
Jump to solution
01-23-2014 04:17 AM
MarcusBush
New Contributor
Hello,

I am using the locateButton dijit out of the box, and attempting to get it to work with an app that has a map with spatial reference 102696.

When I hit the button, I get this in my javascript console:  "Map: Geometry (wkid: 4326) cannot be converted to spatial reference of the map (wkid: 102696)"

I am using a Geometry service from the same location as the map.

Any ideas on a fix for this?

Thank you in advance
0 Kudos
1 Solution

Accepted Solutions
LloydHeberlie
Occasional Contributor

Hi Marcus,

Try setting a default geometryService:

require(["esri/config"], function(esriConfig) {

  /* code goes here */

  esriConfig.defaults.geometryService = "http://servername/arcgis/rest/services/Geometry/GeometryServer”;

});

We will be adding this to the docs for 3.12.

-- Lloyd

View solution in original post

1 Reply
LloydHeberlie
Occasional Contributor

Hi Marcus,

Try setting a default geometryService:

require(["esri/config"], function(esriConfig) {

  /* code goes here */

  esriConfig.defaults.geometryService = "http://servername/arcgis/rest/services/Geometry/GeometryServer”;

});

We will be adding this to the docs for 3.12.

-- Lloyd