Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Lock to integer zoom levels for raster sources? #14

Closed
otsaloma opened this issue Feb 25, 2018 · 10 comments
Closed

Lock to integer zoom levels for raster sources? #14

otsaloma opened this issue Feb 25, 2018 · 10 comments
Milestone

Comments

@otsaloma
Copy link
Owner

No description provided.

@otsaloma otsaloma added this to the 0.1 milestone Feb 25, 2018
@rinigus
Copy link
Contributor

rinigus commented Mar 2, 2018

Taking into account slight blurriness of the raster tiles (mapbox/mapbox-gl-native#10076), I don't think you have to lock the zoom levels. Not from the rendering quality POV, at least.

@otsaloma
Copy link
Owner Author

otsaloma commented Mar 2, 2018

There's also the issue of the amount of detail. It just looks bad when you overzoom and the map is very empty. It doesn't look too hard, so I think I'll just test it and see how it works. Do I understand correctly, that I should edit onPinchFinished in MapboxMapGestureArea? That's not exposed, but I can test by copying the whole file and if it works maybe we can add it to the MapboxMapGestureArea API?

@rinigus
Copy link
Contributor

rinigus commented Mar 3, 2018

I think so, editing onPitchFinished should allow you to use discrete zoom values. And if you find it useful, we can add that to the API. In the end, API was shaped by porting Poor Maps with the hope that it will be useful for all map applications.

@rinigus
Copy link
Contributor

rinigus commented Mar 3, 2018

PS: but I think over-zoom is handled via maximumZoomLevel property of the map object.

@otsaloma
Copy link
Owner Author

otsaloma commented Mar 3, 2018

By overzoom, in this case, I mean e.g. the map being at zoom 14.9, using tiles from zoom level 14.

@rinigus
Copy link
Contributor

rinigus commented Mar 3, 2018

14.9 should actually use 15 zoom. The shift should occur at .5 . There was a corresponding commit regarding it in Mapbox GL and I think we already use the version with it.

@otsaloma
Copy link
Owner Author

otsaloma commented Mar 3, 2018

Looks to me like the shift occurs at .0, but I'll see better when I can test with the locking on and off.

@rinigus
Copy link
Contributor

rinigus commented Mar 3, 2018

Confirmed for vector tiles - indeed, shift occurs at .0 and, for safety, you have to even add a little tolerance (0.01?) to force the shift. No idea, where did I remember this .5 from. Sorry for confusion

@otsaloma
Copy link
Owner Author

otsaloma commented Mar 3, 2018

Much better with integer zoom levels! I can send a PR, I'd suggest adding a boolean property integerZoomLevels for the Map component and check for that under onPitchFinished. Would that be fine? In WhoGo Maps I would then just update the property as part of setBasemap, setting it to true for raster maps, false for vectors.

@rinigus
Copy link
Contributor

rinigus commented Mar 3, 2018

Excellent! Please send the PR.

If you want to add integerZoomLevels to the Map, then it has to be C++, right? For pure QML, we could add it to the gesture area as a property since the logic is in that anyway. Against QML is the possibility (however quite distant) to try to get QtLocation map gesture area working with the widget. Then keeping the property in the map is better.

Whatever choice you will make, I am sure it will be fine.

I am working on cache cleaning. As soon as these both are in, we can push out new release for the widget so you could work with the up-to-date version.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants