-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Add highlight/query similar features example #2404
Conversation
}); | ||
|
||
// Change the cursor style as a UI indicator. | ||
map.getCanvas().style.cursor = (features.length) ? 'pointer' : ''; |
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.
No parens around features.length
.
8dffcd8
to
72788df
Compare
72788df
to
425ae63
Compare
🚢'd 5342aa9 |
How do I find the data stored in the source file (mapbox://mapbox.82pkq93d) so I can manipulate the contents differently. For example, select counties in certain states as well, but using "STATES" as the key in the filter argument of the setFilter method doesn't work. Any ideas? |
👋 @nitins1 sounds like you probably want |
@nitins1 — @tristen is right in that you can use Alternatively, you can look for that dataset's TileJSON — in this case, at
|
@tristen @lbud Thank you both for your responses! So I understand that I can use edit: I think "FIPS" is some sort of code for states? https://gist.github.com/wavded/1250983/bf7c1c08f7b1596ca10822baeb8049d7350b0a4b edit again: Yep, FIPS corresponds to states and I got it working. I wanted to highlight only the currently selected county. Thank you both for your help! one last edit: The FIPS code data that I posted earlier is only half right. Although each state's FIPS code is a two digit number, each county's FIPS property in the dataset starts with those two digits but is a five digit number. In my case, maryland FIPS code is 24 but each county's FIPS property was 24001, 24014, and the like. Baltimore city was an outlier being in the 24500 range with a FIPS code of 24510. I'm not sure how to select a state's worth of counties since the filters don't have any "starts with" type of operators. I had to use in and !in and included each county's FIPS code as a membership filter. |
cc @mourner @lucaswoj @jfirebaugh for review