Skip To Content ArcGIS for Developers Sign In Dashboard

EnvelopeBuilder QML Type

Helper type for building immutable Envelope geometries. More...

Import Statement: import Esri.ArcGISRuntime 100.6
Since: Esri.ArcGISRuntime 100.0
Inherits:

GeometryBuilder

Properties

Signals

Methods

Detailed Description

Envelopes are straightforward geometries to define, and therefore Envelope type constructors provide many of the same options as available on this builder.

This QML type supports the following default properties. A default property may be declared inside another declared object without being assigned explicitly to a property.

TypeDefault Property
SpatialReferencespatialReference

You can declare an EnvelopeBuilder and specify its spatial reference.

EnvelopeBuilder {
    id: envelopeBuilderWGS84
    spatialReference: SpatialReference { wkid: 4326 }
}

You can use this EnvelopeBuilder to create new Envelopes. You can set the EnvelopeBuilder's internal state to represent an existing Envelope, and then create a new Envelope that is a modified version of the existing one.

// move up and right by 50
envelopeBuilderWGS84.geometry = envelopeWGS84;
envelopeBuilderWGS84.offsetBy(50.0, 50.0);
var newEnvelope = envelopeBuilderWGS84.geometry;

Property Documentation

center : Point

The center point.


depth : double

The depth (zMax - zMin) (read-only).

A 2D envelope builder has zero depth.

This QML property was introduced in Esri.ArcGISRuntime 100.1.


height : double

The height.


mMax : double

The maximum m-value.


mMin : double

The minimum m-value.


width : double

The width.


xMax : double

The maximum x-coordinate.


xMin : double

The minimum x-coordinate.


yMax : double

The maximum y-coordinate.


yMin : double

The minimum y-coordinate.


zMax : double

The maximum z-coordinate.


zMin : double

The minimum z-coordinate.


Signal Documentation

geometryChanged()

Emitted when any of these properties change: envelope, width, height, center, or when setXY(), setZ() or setM() are called.


mMaxChanged()

Emitted when the mMax property changes.


mMinChanged()

Emitted when the mMin property changes.


xMaxChanged()

Emitted when the xMax property changes.


xMinChanged()

Emitted when the xMin property changes.


yMaxChanged()

Emitted when the yMax property changes.


yMinChanged()

Emitted when the yMin property changes.


zMaxChanged()

Emitted when the zMax property changes.


zMinChanged()

Emitted when the zMin property changes.


Method Documentation

void centerAtPoint(point center)

Moves the envelope to be centered at a specified center point.


void expandByFactor(double factor)

Expands the builder's envelope geometry, keeping the center in the same place.

A factor < 1.0 shrinks the envelope and > 1.0 expands it. The envelope's center remains unchanged, but its corners change. This is the same as calling expandByFactor(double factor, Point center).


void expandByFactorWithAnchor(double factor, Point anchorPoint)

Expands the builder's envelope geometry, while not moving specified anchor point.

A factor < 1.0 shrinks the envelope and > 1.0 expands it. A specified anchorPoint remains unchanged, but its corners change around it.


void offsetBy(double offsetX, double offsetY)

Move the builder's geometry in the x/y plane.

Returns this EnvelopeBuilder so you can easily chain method calls.

  • offsetX - The offset along x-axis (negative value moves the point west).
  • offsetY - The offset along y-axis (negative value moves the point south).

void reaspect(double width, double height)

Reaspect the builder's envelope geometry to match the given aspect ratio.

The envelope's center remains unchanged, but its corners change so the Envelope has the given width and height.


void setCorners(Point corner1, Point corner2)

Constructs the envelope of this builder from the corners specified.


void setM(double mMin, double mMax)

Set the m values of the Envelope.

  • mMin - Minimum m-value
  • mMax - Maximum m-value

void setXY(double xMin, double yMin, double xMax, double yMax)

Set the x,y-coordinates of the Envelope.

  • xMin - Minimum x-coordinate
  • yMin - Minimum y-coordinate
  • xMax - Maximum x-coordinate
  • yMax - Maximum y-coordinate

void setZ(double zMin, double zMax)

Set the z-coordinates of the Envelope.

  • zMin - Minimum z-coordinate
  • zMax - Maximum z-coordinate

string toText()

Returns a text representation of this Envelope.

The string has this format: Envelope(<minimum-x>, <minimum-y>, <maximum-x>, <maximum-y>) WKID: <wkid-value>


void unionWithEnvelope(Envelope envelope)

Unions the builder's envelope with the given envelope.

The input envelope's spatial reference must be the same as the builder's.


void unionWithPoint(Point point)

Unions the builder's envelope with the given point.

The input point's spatial reference must be the same as the builder's.



Feedback on this topic?