2D

Create and Edit

The Create and Edit sample illustrates how to create vector shapes on the map or modify existing ones via (freehand) map drawing. LuciadRIA supports points, polylines, polygons, circles, ellipses, circular arcs, elliptical arcs, arc bands, geo buffers and extruded shapes.

There are 2 themes in this sample:

  • The "Default" theme: This theme demonstrates the out-of-the-box editing capabilities of LuciadRIA.
  • The "Custom" theme: This theme demonstrates how you can customize editing and creation in LuciadRIA.

Functionality in both themes

Select an object to start editing it.

When editing the shape, you can drag the entire shape or move individual vertices by moving the handles. To insert vertices in a polyline, polygon or geo buffer, select the small handle in the middle of the line segment. To delete vertices in a polyline, polygon or geo buffer, press down and hold one editing handles of the shape's points. You can also hold down the Ctrl button, and click on a point's handle to delete it. To finish the editing, click on the map outside the shape.

When editing an extruded shape, a panel opens that shows the shape's minimum and maximum height. This panel is synchronized with edits you do on the map.

You can undo and redo shape edits by pressing the undo/redo buttons at the bottom of the page. Alternatively, you can press CTRL+Z and CTRL+Y to undo and redo shape edits. On Mac machines, you can also use CMD+Z to undo and CMD+SHIFT+Z to redo.

Default theme

Click one of the buttons in the toolbar at the bottom to start creating a new shape. You can create and edit the following shapes: a point, polyline, polygon, circle by 3 points, circle by center point, ellipse, circular arc by 3 points, circular arc by center point, circular arc by bulge, elliptical arc, arc band, geo buffer, as well as quadratic and cubic Bézier curves. To finish creating the object, click on the map outside the shape. For polylines, polygons, and geo buffers, double-click to finish.

While editing or creating shapes, you can revert back to the initial state by pressing the Escape key. If you already are in the initial state, pressing the Escape key will stop the edit or creation process. Alternatively, you can use the new buttons at the bottom when working on a touch-screen device. The left-most button will bring you back in the initial state, the selection button will stop the edit or creation process.

For polylines and polygons you can drag the mouse over the map for freehand drawing. After releasing the mouse, you can continue freehand drawing if you start to drag in the vicinity of the point where you finished.

Right-click on an object to show a context menu that allows you to:

  • Edit the shape (similar to selecting the object)
  • Delete the object
  • Create a geo buffer based on the shape (for polylines and polygons)
  • Create an extruded shape based on the shape (for all line and area shapes)

The features you create and edit are stored on the server. A CustomJSONCodec is used to exchange the features with a server. This codec encodes shapes as GeoJSON except for the shapes that are not covered by the GeoJSON standard. For these shapes the CustomJSONCodec defines a custom encoding and decoding mechanism.

Custom theme

The custom theme shows some examples of how you can customize creation and editing in LuciadRIA. It shows the following customizations:

  • 3D polyline (3D map only). Click on this line to edit it. You can change the height of each point individually by dragging the point that's floating in mid-air. The 3D polyline is also projected on terrain. Editing the projected line works just like the default 2D polyline editing behavior. You can move points, insert points and delete points on the line that's projected on terrain. You can also move the entire polyline by dragging the projected line.
  • Star. Click on the star shape to edit it. You can only move the entire polygon, and not its individual points.
  • Trajectory. Click on the "Trajectory" line to edit it. The start and end points of the line are always fixed. These represent the departure and arrival of a plane. You can not move the entire trajectory, and you can only edit intermediate points. You can create a trajectory from the toolbar at the bottom.
  • Boundary. Click on the "boundary" shape to edit it. You can only edit individual points. Moving the entire shape is not allowed.
  • Arrow. Click on the arrow shape to edit it. This arrow shape is not available out-of-the-box in the LuciadRIA API. This is a polygon that is edited as if it is an arrow. Drag the start and end points of the arrow to move them. The arrow can also be moved in its entirety. Dragging the corner of the tip of the arrow, changes its width. By holding SHIFT while changing the arrow width, the width snaps to multiple of 100. You also see helper lines and a label when changing the width. The arrow width is constrained to a minimum and maximum. You can create a new arrow shape from the toolbar at the bottom.
---°--'--",----°--'--"
0.0m
100 m
LAYERS
Grid
Vector data
THEME
compass

Create and Edit

The Create and Edit sample illustrates how to create vector shapes on the map or modify existing ones via (freehand) map drawing. LuciadRIA supports points, polylines, polygons, circles, ellipses, circular arcs, elliptical arcs, arc bands, geo buffers and extruded shapes.

There are 2 themes in this sample:

Functionality in both themes

Select an object to start editing it.

When editing the shape, you can drag the entire shape or move individual vertices by moving the handles. To insert vertices in a polyline, polygon or geo buffer, select the small handle in the middle of the line segment. To delete vertices in a polyline, polygon or geo buffer, press down and hold one editing handles of the shape's points. You can also hold down the Ctrl button, and click on a point's handle to delete it. To finish the editing, click on the map outside the shape.

When editing an extruded shape, a panel opens that shows the shape's minimum and maximum height. This panel is synchronized with edits you do on the map.

You can undo and redo shape edits by pressing the undo/redo buttons at the bottom of the page. Alternatively, you can press CTRL+Z and CTRL+Y to undo and redo shape edits. On Mac machines, you can also use CMD+Z to undo and CMD+SHIFT+Z to redo.

Default theme

Click one of the buttons in the toolbar at the bottom to start creating a new shape. You can create and edit the following shapes: a point, polyline, polygon, circle by 3 points, circle by center point, ellipse, circular arc by 3 points, circular arc by center point, circular arc by bulge, elliptical arc, arc band, geo buffer, as well as quadratic and cubic Bézier curves. To finish creating the object, click on the map outside the shape. For polylines, polygons, and geo buffers, double-click to finish.

While editing or creating shapes, you can revert back to the initial state by pressing the Escape key. If you already are in the initial state, pressing the Escape key will stop the edit or creation process. Alternatively, you can use the new buttons at the bottom when working on a touch-screen device. The left-most button will bring you back in the initial state, the selection button will stop the edit or creation process.

For polylines and polygons you can drag the mouse over the map for freehand drawing. After releasing the mouse, you can continue freehand drawing if you start to drag in the vicinity of the point where you finished.

Right-click on an object to show a context menu that allows you to:

The features you create and edit are stored on the server. A CustomJSONCodec is used to exchange the features with a server. This codec encodes shapes as GeoJSON except for the shapes that are not covered by the GeoJSON standard. For these shapes the CustomJSONCodec defines a custom encoding and decoding mechanism.

Custom theme

The custom theme shows some examples of how you can customize creation and editing in LuciadRIA. It shows the following customizations: