AnsweredAssumed Answered

Error Accessor#set Assigning an instance of 'esri.geometry.SpatialReference' which is not a subclass of 'esri.geometry.SpatialReference'

Question asked by MichailM8 on May 17, 2019

Hi all, 

 

I have the following error when i use the goTo method in a view: Accessor#set Assigning an instance of 'esri.geometry.SpatialReference' which is not a subclass of 'esri.geometry.SpatialReference'.

 

#The goTo functionality works correct though... The part of the code is here:

 

require([
"esri/layers/FeatureLayer",
"esri/geometry/SpatialReference"
], function (FeatureLayer, SpatialReference) {

if (nodeFilter == "") {return};

var layerNode = new FeatureLayer({
url: synchProperties.queryUrl,
spatialReference: new SpatialReference(31370),
id: "nodeLayer"
});

var query = layerNode.createQuery();
query.where = nodeFilter;
query.returnGeometry = true;
query.outSpatialReference = new SpatialReference(31370);

layerNode.queryFeatures(query).then(function (response) {

if (response.features.length !== 0) {
currentView.goTo({
target: response.features
});
}
});
});

 

The service is not publicly available. The spatial reference is the same for the layer, the view and the query. It does correctly go to the queried features and the behavior is as expected but the console log has this error for all the returned features.

 

 

Any feedback would be very helpful! 

 

Thanks in advance. 

 

Regards,

Michael

Outcomes