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

[core] Ability to set generic layer properties using setProperty method #16324

Merged
merged 6 commits into from
Mar 24, 2020

Conversation

pozdnyakov
Copy link
Contributor

@pozdnyakov pozdnyakov commented Mar 19, 2020

This change enables the following new keys for the mbgl::Layer::setProperty() API

  • "filter" invokes setFilter()
  • "minzoom" invokes setMinZoom()
  • "maxzoom" invokes setMaxZoom()
  • "source-layer" invokes setSourceLayer()

The newly-added API is used in the style-conversion code, which made this code much simpler.

Fixes https://github.com/mapbox/mapbox-gl-native-team/issues/220

@pozdnyakov pozdnyakov changed the title [core] Ability to set minzoom, maxzoom and filter using setProperty method [core] Ability to set generic layer properties using setProperty method Mar 24, 2020
@pozdnyakov pozdnyakov marked this pull request as ready for review March 24, 2020 13:43
@pozdnyakov pozdnyakov self-assigned this Mar 24, 2020
Copy link
Contributor

@alexshalamov alexshalamov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

few nits + tests + changelog => :shipit:

return nullopt;
}
}
return error; // Must be Error{"layer doesn't support this property"}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Could be conversion error.

src/mbgl/style/layer.cpp Show resolved Hide resolved
src/mbgl/style/layer.cpp Show resolved Hide resolved
@pozdnyakov pozdnyakov merged commit 77d95d2 into master Mar 24, 2020
@pozdnyakov pozdnyakov deleted the mikhail_base_layer_setters branch March 24, 2020 18:53
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants