Skip to content

Rectangle

Category Requires Version
Maps API 19, Android 4.4 - 4.4.4 KitKat 2

Overview

A visible component that draws a rectangle on a Map component bounded by north, south, east, and west edges.

Events

Click

The user clicked on the feature.

Drag

The user dragged the map feature.

Long Click

The user long-pressed on the feature. This event will only trigger if Draggable is false.

Start Drag

The user started a drag operation.

Stop Drag

The user stopped a drag operation.

Methods

Bounds

Returns: List

Returns the bounding box of the Rectangle in the format ((North West) (South East)).

Center

Returns: List

Returns the center of the Rectangle as a list of the form (Latitude Longitude).

Distance To Feature

Returns: Number

Compute the distance, in meters, between two map features.

Params
map Feature Component
centroids Boolean

Distance To Point

Returns: Number

Compute the distance, in meters, between a map feature and a latitude, longitude point.

Params
latitude Number
longitude Number
centroid Boolean

Hide Infobox

Hide the infobox if it is shown. If the infobox is not visible this function has no effect.

Set Center

Moves the Rectangle so that it is centered on the given latitude and longitude while attempting to maintain the width and height of the Rectangle as measured from the center to the edges.

Params
latitude Number
longitude Number

Show Infobox

Show the infobox for the feature. This will show the infobox even if

Properties

Description

Text ➖ Read Write - Designer Blocks

The description displayed in the info window that appears when the user clicks on the map feature.

Draggable

Boolean Default: False ➖ Read Write - Designer Blocks

The Draggable property is used to set whether or not the user can drag the Marker by long-pressing and then dragging the marker to a new location.

East Longitude

Number Default: 0 ➖ Read Write - Designer Blocks

Enable Infobox

Boolean Default: False ➖ Read Write - Designer Blocks

Enable or disable the infobox window display when the user taps the feature.

Fill Color

Color Default: #F34336FF  ➖ Read Write - Designer Blocks

The paint color used to fill in the map feature.

Fill Opacity

Number Default: 1.0 ➖ Read Write - Designer Blocks

The opacity of the interior of the map feature.

North Latitude

Number Default: 0 ➖ Read Write - Designer Blocks

South Latitude

Number Default: 0 ➖ Read Write - Designer Blocks

Stroke Color

Color Default: #000000FF  ➖ Read Write - Designer Blocks

The paint color used to outline the map feature.

Stroke Opacity

Number Default: 1.0 ➖ Read Write - Designer Blocks

The opacity of the stroke used to outline the map feature.

Stroke Width

Number Default: 1 ➖ Read Write - Designer Blocks

The width of the stroke used to outline the map feature.

Title

Text ➖ Read Write - Designer Blocks

The title displayed in the info window that appears when the user clicks on the map feature.

Type

Text ➖ Read - Blocks

The type of the feature. For rectangles, this returns the text "Rectangle".

Visible

Boolean Default: True ➖ Read Write - Designer Blocks

Specifies whether the component should be visible on the screen. Value is true if the component is showing and false if hidden.

West Longitude

Number Default: 0 ➖ Read Write - Designer Blocks


Last update: January 27, 2020