New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
min_display_zoom & max_display_zoom #944
Conversation
At this point, I've refactored |
Interesting, Travis caught that Android was missing the |
Can you rebase this with master? some of the commits you have above have already been merged! |
@@ -23,7 +23,8 @@ class ClientGeoJsonSource : public DataSource { | |||
|
|||
public: | |||
|
|||
ClientGeoJsonSource(const std::string& _name, const std::string& _url, int32_t _maxZoom = 18); | |||
ClientGeoJsonSource(const std::string& _name, const std::string& _url, | |||
int32_t _minDisplayZoom = 0, int32_t _maxDisplayZoom = INT32_MAX, int32_t _maxZoom = 18); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think its fine to use 18
as the maxDisplayZoom
default instead of INT32_MAX
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or a default value of -1
can be used to ignore any pruning of tiles based on min or max display zooms.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't the map actually proxy tile higher zooms than 18? What if we wanted to zoom to 28 and explore a map of the stores in a mall or something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup in that case what I suggested to use is -1
. Similar to how js does it and has a null
as default.
@tallytalwar - I implemented the proposed changes. Ready for another look. Thanks! |
@@ -12,6 +12,26 @@ | |||
#import <UIKit/UIKit.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How come these changes are in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From my understanding, that's because I did a rebase from tangrams/master to hallahan/minZoom. Git gets kinda weird when dealing with another origin sometimes. It's because I did commits at a point before this iOS work and then rebased yesterday. The nature of rebase is that history gets rewritten, so that commit, as you can see, has a different SHA1. The older problem where we saw old commits that have already been merged is because I branched off of hallahan/master instead of tangrams-es/master. It was up to date, but the fact that one origin merged into another created that effect.
The only way I could resolve this is to make a new branch and cherry pick my commits into a new one and open a new PR. However, I wonder, would it take me out of the commit message once you merge the PR? Since, all of my commits should say it was hallahan with tallytalwar? I can do a new PR if needed. Sorry this is such a headache!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also plan to "squash and merge" this PR, so it should say "hallahan with tallytalwar" when merged.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, when I delete c159079 in the interactive rebase, I get conflicts for each commit. When I resolve each, I then diff it with tangrams master, and it removes all of the iOS code. Continuing to look into this...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, after looking further into it. I don't think there is a solution to removing cc159079
from the rebased branch without actually removing the diff that that commit applies.
I went ahead and made a new branch and applied a diff of the minZoom
branch.
https://github.com/hallahan/tangram-es/tree/display_zoom
We can a) open a new PR with that, or b) just merge this PR as-is.
Sorry for the weird rebase.
Changes look good, once the comments are addressed and propertly rebased with master will merge. Thanks @hallahan |
* Implement camera handling APIs in objective-c Includes tilt, rotation, zoom, and position management, as well as camera type switching. Fixes tangrams#849, tangrams#850, tangrams#851, tangrams#858, tangrams#897 * Updated for consistency with android. Rebased against master * Re-set continuous rendering to be explicitly false. * Update ease type defaults, add animation functions for camera tilt. * Rename cameraTilt -> tilt * Tweak camera API names for consistency
…d an empty texture.
…s are not culled with this value.
This is good to go, merging when travis goes green. |
This PR allows you to set a
min_zoom
parameter in your sources block of your scene.yaml.When a source is given a
min_zoom
parameter, it does not fetch tiles below that min zoom. This includes the raster sub-sources we see with normals, as found in Walkabout and other terrain styles.As @bcamper mentioned, we might actually want to call this parameter
min_display_zoom
, since we don't under-zoom data at lower zooms--we simply don't provide it.I'm happy to re-factor that into this PR. Also, we could take a similar approach found here to implement
max_display_zoom
.tangrams/tangram#394
Thinking about also implementing
bounds
, we could build that intoDataSource#isActiveForZoom
, calling itisActive
instead.cc/ @tallytalwar @blair1618 @bcamper