Thank you very much for your reply, but in that case, it`s not the solution.
In my case I use an adress-search with an own REST-Service. After searching for an adress I have a code like...
getResults: (params) => {...
....
I get results there and later on in the code
I successfully get them by:
return searchResult;
But: In the "gettingResults-area" I have to reproject some coordinates.
As far as I can see the only possibility in using the "projection.project"-function is within an:
projection.load().then(function() {
punkt2=projection.project(punkt1, cs2);
alert ("1:"+punkt2.x);
});
....so far so good. But I have to do some other things with the result outside of that function, like:
alert ("2:"+punkt2.x);
var x_koordinate=punkt2.x;
var y_koordinate=punkt2.y;
const graphic = new Graphic({
geometry: new Point({
x: x_koordinate,
y: y_koordinate
})
,attributes: feature.attributes
});
const buffer = geometryEngine.geodesicBuffer(
graphic.geometry,
100,
"meters"
);
....but I don`t get the value out of the projection.load().then(function() { }. That is the problem.