Skip to content

Commit 79bcf25

Browse files
committed
fix variable name and use scratch variable
1 parent 339449c commit 79bcf25

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

packages/engine/Source/Scene/GetFeatureInfoFormat.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,9 @@ function geoJsonToFeatureInfo(json, projection) {
9494
featureInfo.position = Cartographic.fromDegrees(x, y);
9595
} else {
9696
const mercatorPosition = new Cartesian3(x, y, 0);
97-
const cartesian = projection.unproject(mercatorPosition);
98-
featureInfo.position = cartesian;
97+
const cartographic = new Cartographic();
98+
projection.unproject(mercatorPosition, cartographic);
99+
featureInfo.position = cartographic;
99100
}
100101
}
101102

0 commit comments

Comments
 (0)