Skip to content
This repository was 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
pozdnyakov merged 6 commits into
masterfrom
mikhail_base_layer_setters
Mar 24, 2020
Merged

pozdnyakov merged 6 commits into
masterfrom
mikhail_base_layer_setters

Conversation

@pozdnyakov

@pozdnyakov pozdnyakov commented Mar 19, 2020 •

Copy link
Copy Markdown
Contributor

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 force-pushed the mikhail_base_layer_setters branch from 2e03ca1 to 80d7233 Compare March 24, 2020 13:39
@pozdnyakov
pozdnyakov marked this pull request as ready for review March 24, 2020 13:43
@pozdnyakov
pozdnyakov requested a review from alexshalamov March 24, 2020 13:48
@pozdnyakov pozdnyakov self-assigned this Mar 24, 2020
@pozdnyakov
pozdnyakov requested a review from tmpsantos March 24, 2020 13:49

@alexshalamov alexshalamov left a comment

Copy link
Copy Markdown
Contributor

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:

Comment thread src/mbgl/style/layer.cpp Outdated
return nullopt;
}
}
return error; // Must be Error{"layer doesn't support this property"}.

Copy link
Copy Markdown
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.

Comment thread src/mbgl/style/layer.cpp Resolved
Comment thread src/mbgl/style/layer.cpp Resolved
@pozdnyakov
pozdnyakov force-pushed the mikhail_base_layer_setters branch from 80d7233 to 0b33118 Compare March 24, 2020 16:26
@pozdnyakov
pozdnyakov force-pushed the mikhail_base_layer_setters branch from 0b33118 to ff8ffa1 Compare March 24, 2020 16:29
@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.

2 participants