Currently I am not displaying the vertex symbol, I started looking into that last week but didn't find a solution before the weekend. There will be a set of symbols that our graphics guy will make that represent different types of waypoint markers. I am planning on .png files. Something like this:
I was able to show that I can move a line with the PolylineBuilder object, updating one end of the line in the MouseMoved event handler:
void MissionMap::onMouseMoved(QMouseEvent &mouse)
{
Point point = sceneView_->screenToBaseSurface(mouse.x(), mouse.y());
if (isEditMode_ && mousePressedAndHeld_)
{
qDebug() << "Mouse Moving: (" << point.x() << ", " << point.y() << ")";
lineBuilderFromMouse_.parts()->part(0)->setPoint(0, Point(point.x(), point.y(), point.z(), SpatialReference(WGS84)));
routeOverlay_->graphics()->at(0)->setGeometry(lineBuilderFromMouse_.toGeometry());
mouse.accept();
}
}
I hardcoded the first indices for the part and point that is to be adjusted just so I could see if it moved as I hoped it would. I do not know if this is recommended way of doing this but it does seem to work. The problem I need to solve is being able to know what is being selected on Map so I can modify the correct object and point in the line builder.
For the 3D display of the lines, I'm trying to set it to Absolute and the call to setSurfacePlacement doesn't change the value for some reason:
This is being done in my MissionMap class constructor right after I new up the routeOverlay_ object. Maybe there is something else that needs to be done before the surface placement can set? I have tried both static and dynamic rendering modes but I get the same result.
Any samples of moving a line vertices by dragging around the vertex image would be very helpful.