From a52dae6a79c1c19ee2391037cfdc6d557381bb88 Mon Sep 17 00:00:00 2001 From: Paolo Angelelli Date: Wed, 30 Jan 2019 20:59:59 +0100 Subject: Introduce Qt.labs.location QtLocationLabs singleton type This singleton is meant to offer tech-preview map-related API. It starts with a mapObjectsAt invokable, that can be used to probe MapObjects at a specific coordinate of a map. Reference implementation for Q*ObjectQSG, based on QGeoShape::contains, included. Change-Id: Ief692eb5a43115ca02d4642c82023d1b2e217400 Reviewed-by: Alex Blasche --- src/location/maps/qgeomap.cpp | 5 +++++ src/location/maps/qgeomap_p.h | 1 + 2 files changed, 6 insertions(+) (limited to 'src/location/maps') diff --git a/src/location/maps/qgeomap.cpp b/src/location/maps/qgeomap.cpp index 80edac1a..dc8aa2c8 100644 --- a/src/location/maps/qgeomap.cpp +++ b/src/location/maps/qgeomap.cpp @@ -305,6 +305,11 @@ void QGeoMap::removeMapObject(QGeoMapObject * /*obj*/) { } +QList QGeoMap::mapObjectsAt(const QGeoCoordinate &/*coordinate*/) const +{ + return QList(); +} + void QGeoMap::setVisibleArea(const QRectF &visibleArea) { Q_D(QGeoMap); diff --git a/src/location/maps/qgeomap_p.h b/src/location/maps/qgeomap_p.h index c0af9e10..216c8b64 100644 --- a/src/location/maps/qgeomap_p.h +++ b/src/location/maps/qgeomap_p.h @@ -154,6 +154,7 @@ public: virtual void setCopyrightVisible(bool visible); virtual void removeMapObject(QGeoMapObject *obj); + virtual QList mapObjectsAt(const QGeoCoordinate &coordinate) const; void setVisibleArea(const QRectF &visibleArea); QRectF visibleArea() const; -- cgit v1.2.1