Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Scaling of the map by given factor #13940

Closed
rinigus opened this issue Feb 18, 2019 · 5 comments
Closed

Scaling of the map by given factor #13940

rinigus opened this issue Feb 18, 2019 · 5 comments
Labels
archived Archived because of inactivity Qt Mapbox Maps SDK for Qt, aka Qt Location Mapbox GL

Comments

@rinigus
Copy link
Contributor

rinigus commented Feb 18, 2019

This is not a bug, but probably a missing feature.

I am developing Pure Maps (Sailfish, other mobile and desktop Linux'es using Qt/QML) and I am considering to add support for official Qt Location bindings. However, I am missing a feature which would allow me to scale the map style by some factor. Not sure what's the current official proposed way to tackle the following case:

  • on mobile, select map, calculate route and start navigation
  • during navigation, position the device further away (car's windscreen)

To be able to navigate comfortably, map labels have to be increased. So far, while using unofficial QML bindings to Mapbox GL in Qt, I use a parameter that allows me to draw mapboxgl map on framebuffer which is larger than a map (https://github.com/rinigus/mapbox-gl-qml/blob/master/src/qsgmapboxglnode.cpp#L74 ; pixelRatio >= 1). Works decently well and allows users to set the zoom (usually 2x) while driving.

Note that while Map constructor allows to specify pixelRatio, I am looking for dynamic setting that can be adjusted on a fly.

When looking into QtLocation API, I cannot find any similar way or some other way to zoom the map. I suspect that we are expected to provide different styles for exploring the map and navigation, probably with different zoom factors. Taking into account that users are different, it may be not best for all.

Hence the question: is there a way to zoom the map via official Qt API or QtLocation API? I presume the same issue is for other mobile platforms as well.

Please close the issue if you think it doesn't belong here.

@tobrun tobrun added the Qt Mapbox Maps SDK for Qt, aka Qt Location Mapbox GL label Feb 22, 2019
@brunoabinader
Copy link
Member

Hence the question: is there a way to zoom the map via official Qt API or QtLocation API? I presume the same issue is for other mobile platforms as well.

Are you talking about this? https://github.com/mapbox/mapbox-gl-native/blob/master/platform/qt/include/qmapboxgl.hpp#L212

If this is about dynamic pixel ratio changes, we don't provide support for it at the moment. If you need to update your pixel ratio, then the current solution is to re-create the map object.

@rinigus
Copy link
Contributor Author

rinigus commented Apr 1, 2019

Its about dynamic pixel ratio. What would be an alternative to allow users to scale map fonts and objects sizes when they put their phone on a car's windscreen, for example? Do you know how its resolved for Android apps? The only way I found that would lead to comfortable scale change was adjustment of FBO size, as in the code linked in my original message.

@1ec5
Copy link
Contributor

1ec5 commented Apr 2, 2019

A dynamic pixel ratio option would also fix the macOS map SDK’s behavior in multiple display scenarios: #7819 (comment).

@stale stale bot added the archived Archived because of inactivity label Sep 29, 2019
@stale
Copy link

stale bot commented Sep 29, 2019

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Sep 29, 2019
@julianrex julianrex reopened this Sep 30, 2019
@stale stale bot removed the archived Archived because of inactivity label Sep 30, 2019
@stale stale bot added the archived Archived because of inactivity label Mar 28, 2020
@stale
Copy link

stale bot commented Mar 28, 2020

This issue has been automatically detected as stale because it has not had recent activity and will be archived. Thank you for your contributions.

@stale stale bot closed this as completed Mar 28, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived Archived because of inactivity Qt Mapbox Maps SDK for Qt, aka Qt Location Mapbox GL
Projects
None yet
Development

No branches or pull requests

5 participants