rinigus
|
2018-01-31
, 20:17
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#71
|
The Following User Says Thank You to rinigus For This Useful Post: | ||
|
2018-01-31
, 20:33
|
Posts: 1,746 |
Thanked: 1,832 times |
Joined on Dec 2010
|
#72
|
The Following User Says Thank You to m4r0v3r For This Useful Post: | ||
|
2018-01-31
, 20:40
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#73
|
sorry I mean how do I get the centre coords. I have a pin in the center of the screen, I move the map underneath the pin so lat and lng will change. how can I get the lat lng the pin is now at?
queryCoordinateForPixel(const QPointF p, const QVariant &tag = QVariant())
replyCoordinateForPixel(const QPointF pixel, QGeoCoordinate geocoordinate, qreal degLatPerPixel, qreal degLonPerPixel, const QVariant &tag)
The Following User Says Thank You to rinigus For This Useful Post: | ||
|
2018-01-31
, 20:42
|
Posts: 1,746 |
Thanked: 1,832 times |
Joined on Dec 2010
|
#74
|
Sorry, I misunderstood. I assume that you write an app and want to know API, right?
To get coordinate of any pixel, you call method
This method will return immediately and the reply you will get somewhat later (has to go through to other thread and so on) via signalCode:queryCoordinateForPixel(const QPointF p, const QVariant &tag = QVariant())
Code:replyCoordinateForPixel(const QPointF pixel, QGeoCoordinate geocoordinate, qreal degLatPerPixel, qreal degLonPerPixel, const QVariant &tag)
The signal will carry correct geocoordinate as well as its derivative per pixel (if you wish to apply some sensitivity analysis to the result).
See query example at https://github.com/rinigus/mapbox-gl...es-and-signals
So, in your case, find pixel coordinates of the pin and ask for its geolocation using queryCoordinateForPixel
|
2018-02-04
, 12:33
|
Posts: 58 |
Thanked: 223 times |
Joined on Apr 2017
@ Germany
|
#75
|
@jdrescher, would you mind to test whether it fixed also the issues woth longer workouts?
|
2018-02-04
, 12:56
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#76
|
Hi rinigus, I have tested your bugfix release.
First I setup an environment to reproduce the problem. For that I used Laufhelden 0.9.8-9 and mapboxgl-qml-1.1.1-10.29.1. Then I put an autosave file of a large workout into the /Laufelden directory and then started the app.
Then while loading the autosave the app crashed.
Then I just switched to your new release mapboxgl-qml-1.1.2-10.31.1. everything else I left untouched. When I now start the app, it still freezes for about 30 seconds, but then it recoveres and starts working normally.
So I can say: bug fixed, good job!
|
2018-02-05
, 06:41
|
Posts: 58 |
Thanked: 223 times |
Joined on Apr 2017
@ Germany
|
#77
|
When this happens, the client programs would have to enable layout properties for the symbols that they wish to keep always visible
//This is the first data point, draw the start icon map.addSourcePoint("pointStartImage", trackLoader.trackPointAt(i)); map.addImagePath("imageStartImage", Qt.resolvedUrl("../img/map_play.png")); map.addLayer("layerStartLayer", {"type": "symbol", "source": "pointStartImage"}); map.setLayoutProperty("layerStartLayer", "icon-image", "imageStartImage"); map.setLayoutProperty("layerStartLayer", "icon-size", 1.0 / map.pixelRatio); map.setLayoutProperty("layerStartLayer", "visibility", "visible"); map.setLayoutProperty("layerStartLayer", "icon-allow-overlap", true);
|
2018-02-05
, 07:41
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#78
|
I am working on making my app compatible to the new requirements. Just to make sure that I do it right, here is an example:
//This is the first data point, draw the start icon map.addSourcePoint("pointStartImage", trackLoader.trackPointAt(i)); map.addImagePath("imageStartImage", Qt.resolvedUrl("../img/map_play.png")); map.addLayer("layerStartLayer", {"type": "symbol", "source": "pointStartImage"}); map.setLayoutProperty("layerStartLayer", "icon-image", "imageStartImage"); map.setLayoutProperty("layerStartLayer", "icon-size", 1.0 / map.pixelRatio); map.setLayoutProperty("layerStartLayer", "icon-allow-overlap", true);
The Following 3 Users Say Thank You to rinigus For This Useful Post: | ||
|
2018-03-04
, 11:56
|
Posts: 1,414 |
Thanked: 7,547 times |
Joined on Aug 2016
@ Estonia
|
#79
|
The Following 4 Users Say Thank You to rinigus For This Useful Post: | ||
|
2018-03-09
, 17:02
|
|
Posts: 304 |
Thanked: 1,246 times |
Joined on Aug 2015
|
#80
|