# QtPositioning QML Type

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

Import Statement: | import QtPositioning 5.12 |

Since: | Qt 5.2 |

## Methods

- geocircle
()**circle** - geocircle
(coordinate**circle***center*, real*radius*) - point
(coordinate**coordToMercator***coord*) - coordinate
()**coordinate** - coordinate
(real**coordinate***latitude*, real*longitue*, real*altitude*) - coordinate
(point**mercatorToCoord***mercator*) - geopath
()**path** - geopolygon
()**polygon** - geopolygon
(list<coordinate>**polygon***coordinates*) - geopolygon
(list<coordinate>**polygon***perimeter*, list<list<coordinate>>*holes*) - georectangle
()**rectangle** - georectangle
(coordinate**rectangle***center*, real*width*, real*height*) - georectangle
(coordinate**rectangle***topLeft*, coordinate*bottomRight*) - geoshape
()**shape** - geocircle
(geoshape**shapeToCircle***shape*) - geopath
(geoshape**shapeToPath***shape*) - geopolygon
(geoshape**shapeToPolygon***shape*) - georectangle
(geoshape**shapeToRectangle***shape*)

## Detailed Description

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

## Method Documentation

geocircle circle(coordinate |

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

point coordToMercator(coordinate |

Converts a coordinate into a mercator coordinate.

This method was introduced in Qt 5.12.

**See also **mercatorToCoord.

coordinate coordinate() |

Constructs an invalid coordinate.

coordinate coordinate(real |

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

**See also **coordinate.

coordinate mercatorToCoord(point |

Converts a mercator coordinate into a latitude-longitude coordinate.

This method was introduced in Qt 5.12.

**See also **coordToMercator.

geopolygon polygon() |

geopolygon polygon(list<coordinate> |

geopolygon polygon(list<coordinate> |

Constructs a polygon from coordinates for perimeter and inner holes.

This method was introduced in Qt 5.12.

**See also **geopolygon.

georectangle rectangle() |

Constructs an invalid georectangle.

**See also **georectangle.

georectangle rectangle(coordinate |

Constructs a georectangle centered at *center* with a width of *width* degrees and a hight of *height* degrees.

**See also **georectangle.

georectangle rectangle(coordinate |

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

**See also **georectangle.

geopolygon shapeToPolygon(geoshape |

georectangle shapeToRectangle(geoshape |