Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Marker Angle rotation #1273

Open
1232Ga opened this issue Mar 28, 2024 · 3 comments
Open

Marker Angle rotation #1273

1232Ga opened this issue Mar 28, 2024 · 3 comments

Comments

@1232Ga
Copy link

1232Ga commented Mar 28, 2024

In our application, the marker is currently only moving in one direction along the given flight path without rotating to reflect its angle. This behavior contrasts with the expected rotation, as demonstrated in the attached screenshot of the DJI Mavic 2 Enterprise.
i was using this code for marker rotation:-

droneLocation = mapFragment.addMarker(latLng1, R.drawable.
ic_direction
, 0.5f, 0.5f, droneRotation);
Image

@dji-lyt
Copy link

dji-lyt commented Mar 29, 2024

You can achieve the changes indicated by the arrow by updating the marker, for example, using marker.setRotation(rotation). The logic for updating the airplane icon in the MSDK V5 sample code is attached.
image

@1232Ga
Copy link
Author

1232Ga commented Apr 1, 2024

I need the sample code for MSDK V4. how to implement this code for mavic 2 Enterprise ??

@dji-dev
Copy link
Contributor

dji-dev commented Apr 1, 2024

Agent comment from yating.liao in Zendesk ticket #103808:

The map control of the UXSDK you are using encapsulates this logic internally. If you need a reference, there is also an open-source version of the V4 example code available here: https://github.com/dji-sdk/Mobile-UXSDK-Beta-Android/blob/master/android-uxsdk-beta-map/src/main/java/dji/ux/beta/map/widget/map/MapWidget.java#L670 You can search for aircraftMarker to find all relevant code.

°°°

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants