我是 arcgis 的新手,我想做一件简单的事情,但我不明白为什么它的行为不像预期的那样。我正在尝试在我的 mapView 上添加一个点。它被添加,但在错误的地方。
// I have longitude and latitude saved as strings
// x = 53.230
// y = 20.398
Point result = new Point(Float.parseFloat(x),Float.parseFloat(y));
Point mapPoint = (Point) GeometryEngine.project(Double.parseDouble(x), Double.parseDouble(y), SpatialReference.create(4326));
Geometry resultLocGeom = mapPoint;
Geometry resultLocGeom = result; // using mapPoint or result, both gets placed in same place.
SimpleMarkerSymbol resultSymbol = new SimpleMarkerSymbol(
Color.BLACK, 20, SimpleMarkerSymbol.STYLE.CROSS);
Graphic resultLocation = new Graphic(resultLocGeom,
resultSymbol);
locationLayer.addGraphic(resultLocation);
TextSymbol resultAddress = new TextSymbol(12, list2.get(i)[3], Color.BLACK);
resultAddress.setOffsetX(10);
resultAddress.setOffsetY(50);
Graphic resultText = new Graphic(resultLocGeom, resultAddress);
locationLayer.addGraphic(resultText);
我知道纬度和经度都是正确的,但由于某种原因,我的观点在大西洋的某个地方得到了体现……