I am attempting to create a choropleth using the actual polygons included in any one of the base Mapbox maps.
Specifically, I have a geojson structure with a data specific property in the properties object and I'd like to have a different color land fill for all countries, depending on where the fall on a certain scale.
So far the Map class appears to color all land at once:
Map {
background-color: red;
}
And I can't seem to do this:
Map {
[myVar > 0.4] { background-color: pink; }
[myVar <= 0.4] { background-color: green; }
}
I've tried to use my own polygons from my GeoJSON file but they aren't nearly as clean as the Mapbox polygons, even at the highest resolution I've found. Additionally, I want to be able to overlay the labels and other markers that Mapbox base styles have, just on top of my cholorpleth.
I've also tried to color the #admin[admin_level=2][maritime=0]
regions, but they don't appear to be polygons and result in something like this:
Thanks in advance!
myVar
property. It's effectively the same, except I have a few of them and they are more meaningfully named ;). My goal is to generate raster tiles I can use with mapbox.js/leaflet. – iros