Hi Fatma - thank you for your message.
If you would like to apply an offset in the x and y directions, you could use the moveGeodetic method twice, once in the x-direction and then again in the y-direction. Please find an example of this using the C++ api below, where:
- An initial point initialPoint is created.
- initialPoint is converted from a Point object into a QList<Point> called initialPointList for compatability with the GeometryEngine::moveGeodetic method arguments.
- initialPointList is offset by 1000m in the y-direction to create a new QList<Point> called yOffsetPoint.
- yOffsetPoint is offset by 500m in the x-direction to create a new QList<Point> called offsetPointList.
- The offset point is converted from the QList<Point> into a Point called offsetPoint.
// Define initial point.
Point initialPoint(7.65851, 45.97661, SpatialReference::wgs84());
// Apply 1000m offset in the y-direction (i.e. azimuth = 0 deg).
QList<Point> initialPointList{initialPoint};
QList<Point> yOffsetPoint = GeometryEngine::moveGeodetic(initialPointList, 1000, LinearUnit::meters(), 0.0f, AngularUnit::degrees(), GeodeticCurveType::GreatElliptic);
// Apply 500m offset in the x-direction (i.e. azimuth = 90 deg).
QList<Point> offsetPointList = GeometryEngine::moveGeodetic(yOffsetPoint, 500, LinearUnit::meters(), 90.0f, AngularUnit::degrees(), GeodeticCurveType::GreatElliptic);
// Convert offsetPointList from QList<Point> to Point.
Point offsetPoint = offsetPointList.at(0);
I hope this helps you achieve your desired result. Let us know if we can provide you with any further information.