maptalks / maptalks/maptalks.js

UAV pose marker 3D

Open
#1,576 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
HTML
Stars
4.5k
Forks
511
Avg merge
3d 58m
Merged PRs (30d)
1

Description

Hey,

is there an optimized marker for 3D usage? I want to visualize the pose of an UAV, which works well, as long as you don't change the point of view.
Also, I'm using a jquery dialog as container and when I change the size of the dialog, the size of the marker changes too and weirdly moves as well. Other layers, like the LineString, are not affected.

This is how I create the marker:
```
this._poses[data.name] = new maptalks.VectorLayer(data.name, [
new maptalks.Marker(
[data.pose.x, data.pose.y], {
properties: {
altitude: 0
},
symbol: {
'markerType': 'path',
'markerPath': this._pose_marker_path,
'markerWidth': 28,
'markerHeight': 40,
'markerDx': 0,
'markerDy': 6,
'markerOpacity': .5,
'markerFill': '#bbb',

'markerRotation': orientation // marker rotation in degree, clock-wise
}
}
),
new maptalks.Marker(
[data.pose.x, data.pose.y],
{
properties: {
altitude: data.pose.z
},
symbol: {
'markerType': 'path',
'markerPath': this._pose_marker_path,
'markerFill': '#000',
'markerWidth': 28,
'markerHeight': 40,
'markerDx': 0,
'markerDy': 6,
'markerOpacity': 1,

'markerRotation': orientation // marker rotation in degree, clock-wise
}
}
)
], {
enableAltitude: true, // enable altitude
altitudeProperty: 'altitude' // altitude property in properties, default by 'altitude'
})
```

with

```
_pose_marker_path: 'M1683 1331l-166 165q-19 19-45 19t-45-19l-531-531-531 531q-19 19-45 19t-45-19l-166-165q-19-19-19-45.5t19-45.5l742-741q19-19 45-19t45 19l742 741q19 19 19 45.5t-19 45.5z',
```

Direct view:
![direct](https://user-images.githubusercontent.com/45623010/152293601-2b5100d7-7f73-4754-a8a9-637fd4387f9f.png)
Opposite side:
![opposite](https://user-images.githubusercontent.com/45623010/152293598-18c5a71f-a443-4204-a4de-dabaab8917a6.png)
Side view:
![side](https://user-images.githubusercontent.com/45623010/152293599-eaf26a76-dc10-4d98-8d00-d43b041b135e.png)
Shrunk dialog window:
![shrunk](https://user-images.githubusercontent.com/45623010/152293597-779cbdf8-ae5f-4666-9f49-10f30331f4fb.png)

Thanks!

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The report uses maptalks.VectorLayer and maptalks.Marker with markerType: path, markerRotation, altitude, and a jQuery dialog; begin by reproducing the direct, opposite, and side views and resizing the dialog. Compare marker rendering with LineString behavior, then verify that the UAV pose marker keeps its position and scale across viewpoint changes and dialog resizing.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, jquery
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.