QtMobility Reference Documentation

QML MapRectangle Element

The MapRectangle element displays a rectangle on a map. More...

This element was introduced in Mobility 1.2.

Properties

Detailed Description

The rectangle is specified in terms of the top left and bottom right coordinates.

If topLeft and bottomRight are not specified and valid the rectangle will not be displayed.

An example of one big yellow rectangle:

 MapRectangle {
     color: "yellow"
     topLeft: landmark.coordinate
     bottomRight: Coordinate {
         latitude: landmark.coordinate.latitude - 1
         longitude: landmark.coordinate.longitude + 1
     }
 }

The MapRectangle element is part of the QtMobility.location 1.2 module.

Property Documentation

border.width : int

border.color : color

These properties hold the width and color used to draw the border of the circle.

The width is in pixels and is independent of the zoom level of the map.

The default values correspond to a black border with a width of 1 pixel.

For no line, use a width of 0 or a transparent color.

This property group was introduced in Mobility 1.2.


bottomRight : Coordinate

This property holds the coordinate corresponding to the bottom right corner of the rectangle.

The default value is an invalid coordinate.

This property group was introduced in Mobility 1.2.


color : color

This property holds the color used to fill the circle.

The default value corresponds to a transparent color.

This property group was introduced in Mobility 1.2.


topLeft : Coordinate

This property holds the coordinate corresponding to the top left corner of the rectangle.

The default value is an invalid coordinate.

This property group was introduced in Mobility 1.2.


visible : bool

This property holds a boolean corresponding to whether or not the rectangle is visible.

This property group was introduced in Mobility 1.2.


z : int

This property holds the z-value of the rectangle.

Map objects are drawn in z-value order, and objects with the same z-value will be drawn in insertion order.

This property group was introduced in Mobility 1.2.


X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.