-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Update layer immediately when changing its max/min zoom level #11399
Update layer immediately when changing its max/min zoom level #11399
Conversation
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.
Thanks for taking this on @LukasPaczos! Changes look good. It would be nice to have tests that verify this behavior. There are a few prerequisites to be able to do that though. How do you feel about learning:
- How to extend the node bindings so that they can exercise
setMin/MaxZoom
- How to add tests to our render test suite
I or someone else from the GL team would be happy to help walk you through these.
Sounds great @jfirebaugh! Please let me know whenever you or anybody else has a moment to hit those bullet points with me. |
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.
👍
return Nan::ThrowTypeError("Second and third arguments must be numbers"); | ||
} | ||
|
||
mbgl::style::Layer* layer = nodeMap->map->getStyle().getLayer(*Nan::Utf8String(info[0])); |
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.
You might want to check if the layer actually exists here.
platform/node/src/node_map.cpp
Outdated
|
||
void NodeMap::SetLayerZoomRange(const Nan::FunctionCallbackInfo<v8::Value>& info) { | ||
using namespace mbgl::style; | ||
using namespace mbgl::style::conversion; |
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.
Don't think you need the conversion namespace here right?
0404f2d
to
b9bffc2
Compare
* [android][core] update layer immediately when changing it's max/min zoom * [core] node bindings for layer zoom range (cherry picked from commit 22b4ef1)
Closes #11386.