Questions tagged [qtlocation]

The Qt Location API helps to create viable mapping solutions using the data available from some of the popular location services.

The Qt Location API enables the user to:

  • access and present map data,
  • support touch gesture on a specific area of the map,
  • query for a specific geographical location and route,
  • add additional layers on top, such as polylines and circles,
  • and search for places and related images.

The module provides both a C++ API as well as a QML API.

70 questions
6
votes
3 answers

QT QML QtLocation map plugin

I have my own local Z/X/Y map tile server and want to use it as a map background in a QML application. Looking at sample code it appears that this is done by:- Plugin { id: osmPlugin name: "osm" } So I need to write my own plugin. But the…
CF-GISRAW
  • 73
  • 1
  • 5
4
votes
0 answers

Qt Location Editing a MapPolyLine

My objective is to allow a user to edit a MapPolyLine using the mouse to drag and drop points on the line. I have implemented this by creating a C++ model that exposes a path() method for dumping all points to draw the line. I then used this model…
CitizenFish
  • 312
  • 2
  • 13
4
votes
1 answer

QML MapPolygon from C++ model

I want to dynamically add/remove/edit MapPolygon in QML Map application. I have some others jobs with created polygons (file export/import etc.) so I think that I should use MapItemView with C++ model sotirng Polygons data. I tried to create my own…
Sajmplus
  • 262
  • 4
  • 18
3
votes
1 answer

QT add Map QML Items via C++

I try to add QML map items like MapQuickItem or MapCircle from C++ to my map. Unfortunately, they don't show up on the map. The same code with just a QML rectangle works. rect v1 is the rectangle for testing which works. rect v2 is the mapCircle…
MrCheesecake
  • 33
  • 1
  • 5
3
votes
2 answers

Writing a custom Qt Location GeoServices plugin to use geo-referenced image file as map source

I'm currently working on a Qt Quick application that will provide a map viewer for a smallish area (1 square KM or so), the map details for which will be provided in a single geo-referenced image file (GeoTIFF, geo-referenced PDF, ESRI Shape file…
Richard Lang
  • 456
  • 4
  • 15
3
votes
1 answer

AbstractItemModel to QML Route

I have a set of QPointF in MarkerModel which subclasses from AbstractListModel. Each such marker have a status, depending on which they are colored. I want to draw all these markers on the map along with a polyline that connects all the points that…
Neel Basu
  • 12,638
  • 12
  • 82
  • 146
2
votes
1 answer

QtLocation QML: MouseArea stop Updating on hover

I have a qml map application and I added a marker as MapQuickItem. I have a lat lon display connected to map Mousearea, when I move the mouse on the map i read lat/lon in realtime, and all works well. marker.qml is a mapquickItem with its Mousearea,…
Gab74
  • 45
  • 5
2
votes
3 answers

QtLocation OSM API Key required

I am using OSM and here map plugins for QML app. I use map.activeMapType = map.supportedMapTypes[currentIndex] in ComboBox to display supported map types from map providers on the map area. Here map plugin works with "here.app_id" and "here.token"…
Edip Ahmet
  • 465
  • 8
  • 18
2
votes
1 answer

Getting positions from gpsd in a Qt quick program

I have a computer with a GPS connected to a serial port that is running gpsd with a pretty basic configuration. Here is the contents of /etc/default/gpsd: START_DAEMON="true" USBAUTO="false" DEVICES="/dev/ttyS0" GPSD_OPTIONS="-n…
charles
  • 192
  • 1
  • 14
2
votes
1 answer

Why QDeclarativeGeoMap::visibleRegion is non-NOTIFYable in QtLocation Map?

I'm using QtLocation QML Map to display a big amount of items on a map. As with the number of items visible on the map the performance decreases, i would like to set visible only the items actually visible on the viewport. For this it would be handy…
zgyarmati
  • 1,135
  • 8
  • 15
2
votes
0 answers

Qt QML offline map

Is there a way to display offline maps in QtLocation without generating tiles? Like reading directly from a osm file. If it is not possible in QtLocation, is there any other modules available that I can use in QML? I want to achieve this without…
Roozbeh
  • 462
  • 3
  • 14
2
votes
1 answer

Qt/Qml: Repeater vs. MapItemView for map elements

I want to populate a Qml Map with map elements (like MapCircle, ...) from a QAbstractListModel. There seem to be two Qml tools suitable for this, MapItemView [1] and Repeater [2]. The Repeater is more powerful (e.g. it allows nested models) - so is…
Hyndrix
  • 4,282
  • 7
  • 41
  • 82
2
votes
1 answer

Making the border of a Mappolygon clickable - QML

I have been trying to make the border of a MapPolygon clickable in QML by the following code: MapPolygon{ id: _poly border.color: "black" border.width: 4 color: "transparent" visible: false path: [] …
saitej
  • 53
  • 1
  • 8
1
vote
0 answers

QtLocation test app freezes of startup using the open streetmap provider?

I'm trying to get qtlocation running with the osm provider but for some reason when the application starts up it just hangs. Cannot even close it. When I change it to use the "mapboxgl" provider it works fine. I've been using it for many years on…
Pibo
  • 11
  • 2
1
vote
0 answers

how can i add QtLocation plugin in pyside project to use Map in qml? - SOLVED

i created an app in qt creator that displays a simple map and i want to do the same in pyside project without using webengine. this is my code in qml: import QtQuick 2.0 import QtPositioning 5.5 import QtLocation 5.6 import QtQuick.Controls…
user17312099
  • 11
  • 1
  • 3
1
2 3 4 5