Skip to content

Modules.Map.Polygon

Represents a bounded area on the map.

The Polygon object gives you low-level control over polygons that can be added to a map view. A polygon must have its points property set to appear on a map.

Use the Modules.Map.createPolygon method to create a polygon.

Extends: Titanium.Proxy · Since: 4.1.0, 4.1.0, 4.1.0, 9.2.0 · Platforms: android, iphone, ipad, macos

Properties #

bounds#

Type: MapRegionTypev2

Returns the bounding box of the polygon. Useful to center the region.

fillColor#

Type: String

Color to use when shading the polygon, as a color name or hex triplet.

For information about color values, see the "Colors" section of Titanium.UI.

holes#

creation only

Type: Array<Array<MapPointType>>

Array of points arrays that define holes in the polygon.

points#

creation only

Type: Array<MapPointType>

Array of map points making up the polygon. Can also be an array of longitude (index 0), latitude (index 1) tuples.

strokeColor#

Type: String

Color to use for the border of the polygon, as a color name or hex triplet.

For information about color values, see the "Colors" section of Titanium.UI.

strokeWidth#

Type: Number

Line width in pixels to use when drawing the polygon.

touchEnabled#

Type: Boolean

Determines whether view should receive touch events.

zIndex#

creation only

Type: Number

The order (depth) in which to display the polygons.

For iOS, the polygons are drawn in the order in which they are added.

Titanium SDK Documentation