Skip to content
This repository has been archived by the owner on Oct 7, 2024. It is now read-only.

Symbol switch based on zoom level example #929

Merged
merged 2 commits into from
Mar 29, 2019

Conversation

langsmith
Copy link
Contributor

@langsmith langsmith commented Dec 6, 2018

This pr resolves #810 and shows how to use a stop with a SymbolLayer to give the effect of an icon switching based on a particular zoom level.

ezgif com-optimize

@langsmith langsmith self-assigned this Dec 6, 2018
@langsmith langsmith force-pushed the ls-symbol-switch-based-on-zoom-level-example branch 3 times, most recently from 380204c to c83e697 Compare December 19, 2018 00:57
@langsmith langsmith requested a review from osana December 19, 2018 01:07
@langsmith langsmith force-pushed the ls-symbol-switch-based-on-zoom-level-example branch 2 times, most recently from 82ad51c to 34b6f9a Compare January 30, 2019 19:09
@langsmith
Copy link
Contributor Author

@LukasPaczos has confirmed my suspicion that iconImageId can be used with expressions/zoomLevel , rather than using setMaxZoom() and setMinZoom(), as I do in this example.

I will refactor this example to use expressions and iconImageId correctly.

@langsmith langsmith force-pushed the ls-symbol-switch-based-on-zoom-level-example branch from 34b6f9a to d9a4088 Compare March 6, 2019 19:13
@langsmith
Copy link
Contributor Author

Ok, just pushed a commit to refactor this example so that it uses the Expression.step() expression.

@langsmith langsmith force-pushed the ls-symbol-switch-based-on-zoom-level-example branch from 411fd44 to b170c2e Compare March 7, 2019 17:34
@langsmith langsmith force-pushed the ls-symbol-switch-based-on-zoom-level-example branch 3 times, most recently from ffb3b99 to b6df3b9 Compare March 28, 2019 21:27
@langsmith langsmith force-pushed the ls-symbol-switch-based-on-zoom-level-example branch from b837afa to f29e0ff Compare March 29, 2019 17:18
@langsmith langsmith force-pushed the ls-symbol-switch-based-on-zoom-level-example branch from f29e0ff to 8500be8 Compare March 29, 2019 17:43
@langsmith langsmith merged commit c7f4d90 into master Mar 29, 2019
@langsmith langsmith deleted the ls-symbol-switch-based-on-zoom-level-example branch March 29, 2019 17:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SymbollLayer icon switch based on zoom level example
2 participants