Hi,
In ArcGIS Experience, I try to develop an app with Query. My data has WKID = 2154 and I need to have his geometry with 4326 WKID.
I try many and many things :
getApiModule = () => {
//Va cherche l'API Js pour dessiner
return new Promise(resolve => {loadArcGISJSAPIModules(['esri/Graphic', 'esri/rest/support/Query', 'esri/geometry/Polygon', 'esri/geometry/SpatialReference']).then(modules => {[
this.graphicApi, this.queryApi, this.polygonApi, this.spatialReferenceApi] = modules;
resolve('ok');
});});}
recupRequete = () => {
//Si besoin de cherche l'API de requête
if (!this.queryApi) {
this.getApiModule().then(() => { this.recupRequete() })
} else {
//Construit la requête
const q = new this.queryApi({
where: '1=1',
outFields: ['*'],
returnGeometry: true,
outSpatialReference: { 'wkid': 4326 }
});
console.log(q);
//Stocke la requête dans le state
this.query = q.toJSON();
}
}
I also try with q.outSpatialReference after new. and i try in place of { 'wkid': 4326 }
this.spatialReferenceApi.WGS84 , 4326 .
The URL sent to ArcGIS server didn't have outSR parameter like I enter it directly in ArcGIS Server.
My ArcGIS Server is in 10.6.1
Thanks.
Guillaume ARNAUD