0

I've styled some census tract tilesets and set filters in Mapbox Studio, where everything looks fantastic, but I want the tracts to appear shaded irrespective of the zoom level, and Studio won't let me set a minzoom lower than 8. I've tried changing the minzoom after load in javascript:

map.setLayerZoomRange ('ba_percent', 4, 22)

And I see the change reflected if I log

map.getLayer('ba_percent')

But that doesn't affect what appears in the browser. There must be a way to show census tract data at whatever zoom level I choose, right? Just for reference, this is how the map looks when tracts are shaded.

enter image description here

6
  • 1
    What is the source of your census tract data? It is possible that there are settings that cannot be overridden.
    – MaryBeth
    Commented Mar 18, 2016 at 15:21
  • geoJSON files from censusreporter.org. I'm not an expert at reading geoJSON files, but it just looks like a few properties and then geometry for each tract.
    – rswerve
    Commented Mar 18, 2016 at 15:24
  • The geoJSON file likely has only data to a certain extent, if you wanted to see things at any extent, you would likely need to grab the raw data from the census database and create a js file from that yourself.
    – MaryBeth
    Commented Mar 18, 2016 at 15:34
  • Huh, I didn't realize it worked that way. Thanks for the tip!
    – rswerve
    Commented Mar 18, 2016 at 15:36
  • I am not 100% sure how your JSON files are being created, but here is a little background on ArcGIS and why there is a need to limit the amount of data someone can pull at a time from the server, if you are interested: doc.arcgis.com/en/open-data/provider/…
    – MaryBeth
    Commented Mar 18, 2016 at 15:42

1 Answer 1

0

In case anyone else runs into this: I used Tippacanoe to change the zoom limits on my existing geoJSON file. You just have to be careful of your settings or you'll end up with enormous files.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.