CartoCSS: building polygon by tag

المشرف العام

Administrator
طاقم الإدارة
I'm using MapBox Studio to create a personalized map for slums.

In OSM we have many polygons representing buildings and I need to style them according to their "building" tag. For example, the building=hospital tag should have a red background.

I tried to select those polygons but I can't find a wayThis works ok as expected:

#building { polygon-fill: #2aeb38;}... but none of these work:

#building [building='hospital'],#building [amenity='clinic'],#building [class='clinic'],#building [class='hospital'],#buildings [type='hospital'],#buildings [type='clinic']{ polygon-fill: #e28600;}In Maperitive I could easily style polygons and point easily by doing:

hospital : amenity=hospital OR building=hospital OR amenity=clinictarget: hospital define.....but I can't replicate this on CartoCSS. Any ideas?



أكثر...
 
أعلى