Skip to content
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

Question about coloring U.S. states #6

Open
hjouhi opened this issue Feb 6, 2016 · 1 comment
Open

Question about coloring U.S. states #6

hjouhi opened this issue Feb 6, 2016 · 1 comment

Comments

@hjouhi
Copy link

hjouhi commented Feb 6, 2016

First off - great functionality, thank you a lot for sharing!

One question: how can I color certain states (example 3) programmatically without the need to click on them? E.g., if I have a changing variable "isSunny" for each state (to indicate whether it is sunny in its capital at that time) and I would like to color the state green or red based on whether isSunny is 1 or 0.

I notice that inside "map setClickHandler:^(NSString* identifier, CAShapeLayer* layer){" of -(void)initExample2 I can write, e.g., "layer.fillColor = [UIColor redColor].CGColor;" to color the clicked state red - but how can I do this without clicking? I.e., I guess the key detail I'm missing is how can I refer to a state's identifier and use that to color the state?

@kk143g
Copy link

kk143g commented Sep 6, 2017

Did you get your answer? I also need

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants