Skip to content

UAV pose marker 3D #1576

Open
Open
@Janphr

Description

@Janphr

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
Opposite side:
opposite
Side view:
side
Shrunk dialog window:
shrunk

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions