GeometryEditorReticle

A visual aid displayed on the map view to allow precise editing of a geometry on a touch device, using a GeometryEditor. A GeometryEditorReticle is a visual aid displayed on the map view to help precise targeting on a map, separate to the interaction position. It is ideal for use on touch devices, as it can provide an alternative to a mouse hover, allowing you to see a precise position before you tap the screen. This can be especially useful for snapping (see SnapSettings) to allow you to see visual snapping feedback during vertex addition and moves, without fingers hiding the screen and the snapping feedback.

The GeometryEditorReticle is displayed on a map view when:

The reticle is displayed centered in the map view accounting for the current Insets and attribution bar (GeoView.isAttributionTextVisible). The default GeometryEditorReticle.image shows a crosshair with a rounded square border, with black and white lines to help the reticle be distinguished clearly over a variety of different basemaps and operational layers. To customize the appearance of the reticle in order to suit your specific app style, accessibility requirements, or to suit a specific basemap, call GeometryEditorReticle.setImage(BitmapDrawable), or GeometryEditorReticle.setImage(BitmapDrawable, Float, Float).

To avoid potential confusion, when the GeometryEditorReticle is visible the magnifier will not appear, regardless of the value of MapView.magnifierEnabled. If a magnifier is already visible then it will be hidden when the reticle is displayed.

Since

200.5.0

See also

Constructors

Link copied to clipboard
constructor()

Creates a reticle that can be assigned to ReticleVertexTool.reticle. The reticle will have a default GeometryEditorReticle.image, GeometryEditorReticle.height, and GeometryEditorReticle.width.

Properties

Link copied to clipboard

The height of the GeometryEditorReticle.image displayed on the MapView in device-independent pixels (DIPs). The default value is 135 DIPs. If the GeometryEditorReticle.image has been set using GeometryEditorReticle.setImage(BitmapDrawable), then this property returns a value of null, and the image will be rendered using the size of the image.

Link copied to clipboard

The image representing the reticle to display on the MapView. The default GeometryEditorReticle.image shows a crosshair with a rounded square border, displayed at the current GeometryEditorReticle.height and GeometryEditorReticle.width. You can customize the appearance of the reticle at any point, by calling GeometryEditorReticle.setImage(BitmapDrawable) or GeometryEditorReticle.setImage(BitmapDrawable, Float, Float).

Link copied to clipboard
val width: Float?

The width of the GeometryEditorReticle.image displayed on the MapView in device-independent pixels (DIPs). The default value is 135 DIPs. If the GeometryEditorReticle.image has been set using GeometryEditorReticle.setImage(BitmapDrawable), then this property returns a value of null, and the image will be rendered using the size of the image.

Functions

Link copied to clipboard

Sets the image that should be used to display the reticle at the design size on the MapView. Use this method to change the reticle image to your own choice of image, using the physical pixel size of the given image. If you need to scale the image, use GeometryEditorReticle.setImage(BitmapDrawable, Float, Float) instead.

fun setImage(image: BitmapDrawable, width: Float, height: Float)

Sets the image that should be used to display the reticle at a desired size on the MapView. The center of the image is used as the target position for edits, so bear this in mind when creating your own custom reticle images and ensure the edit position is clear to your users. The image should be designed to avoid obscuring too much of the map and the geometry editor feedback, for example by using large areas of transparent or semi-transparent pixels. This method invokes Bitmap.compress and may be long running.