QtPositioning QML Type

The QtPositioning global object provides useful functions for working with location-based types in QML. 更多...

import 语句: import QtPositioning 6.2
Since: Qt 5.2

方法

详细描述

import QtPositioning
Item {
    property var coordinate: QtPositioning.coordinate(-27.5, 153.1)
}
					

方法文档编制

geocircle circle ( coordinate center , real radius )

Constructs a geocircle centered at center with a radius of radius meters.

geocircle circle ()

Constructs an invalid geocircle.

另请参阅 geocircle .

[since 5.12] point coordToMercator ( coordinate coord )

Converts a coordinate coord into a mercator coordinate and returns it.

该方法在 Qt 5.12 引入。

另请参阅 mercatorToCoord .

coordinate coordinate ( real latitude , real longitude , real altitude )

Constructs a coordinate with the specified latitude , longitude 和可选 altitude . Both latitude and longitude must be valid, otherwise an invalid coordinate is returned.

另请参阅 coordinate .

coordinate coordinate ()

Constructs an invalid coordinate.

[since 5.12] coordinate mercatorToCoord ( point mercator )

转换 mercator coordinate into a latitude-longitude coordinate.

该方法在 Qt 5.12 引入。

另请参阅 coordToMercator .


[since 5.9] geopath path ( list < coordinate > coordinates , real width )

Constructs a geopath from coordinates and width.

This method was introduced in Qt 5.9.

另请参阅 geopath .

[since 5.9] geopath path ()

Constructs an empty geopath.

This method was introduced in Qt 5.9.

另请参阅 geopath .


[since 5.12] geopolygon polygon ( list < coordinate > perimeter , list < list < coordinate >> holes )

Constructs a polygon from coordinates for perimeter and inner holes.

该方法在 Qt 5.12 引入。

另请参阅 geopolygon .

[since 5.10] geopolygon polygon ( list < coordinate > coordinates )

Constructs a polygon from coordinates.

This method was introduced in Qt 5.10.

另请参阅 geopolygon .

[since 5.10] geopolygon polygon ()

Constructs an empty polygon.

This method was introduced in Qt 5.10.

另请参阅 geopolygon .

georectangle rectangle ( coordinate topLeft , coordinate bottomRight )

Constructs a georectangle with its top left corner positioned at topLeft and its bottom right corner positioned at bottomRight .

另请参阅 georectangle .

georectangle rectangle ( coordinate center , real width , real height )

Constructs a georectangle centered at center with a width of width degrees and a hight of height 度。

另请参阅 georectangle .

georectangle rectangle ()

Constructs an invalid georectangle.

另请参阅 georectangle .

geoshape shape ()

Constructs an invalid geoshape.

另请参阅 geoshape .

[since 5.5] geocircle shapeToCircle ( geoshape shape )

转换 shape to a geocircle.

该方法在 Qt 5.5 引入。

另请参阅 geocircle .

[since 5.9] geopath shapeToPath ( geoshape shape )

转换 shape to a geopath.

This method was introduced in Qt 5.9.

另请参阅 geopath .

[since 5.10] geopolygon shapeToPolygon ( geoshape shape )

转换 shape to a polygon.

This method was introduced in Qt 5.10.

另请参阅 geopolygon .

[since 5.5] georectangle shapeToRectangle ( geoshape shape )

转换 shape to a georectangle.

该方法在 Qt 5.5 引入。

另请参阅 georectangle .