Created
December 18, 2012 17:20
-
-
Save tmcw/4329932 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#world { | |
polygon-opacity:1; | |
[zoom=1][Z_ABBREV = 6] { | |
polygon-opacity:0.2; | |
} | |
[zoom=1][Z_NAME = 6] { | |
polygon-opacity:0.3; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<!DOCTYPE Map[]> | |
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" maximum-extent="-20037508.34,-20037508.34,20037508.34,20037508.34"> | |
<Style name="world" filter-mode="first" > | |
<Rule> | |
<MaxScaleDenominator>500000000</MaxScaleDenominator> | |
<MinScaleDenominator>200000000</MinScaleDenominator> | |
<Filter>([Z_NAME] = 6)</Filter> | |
<PolygonSymbolizer fill-opacity="0.3" /> | |
</Rule> | |
<Rule> | |
<Filter>([Z_NAME] = 6)</Filter> | |
<PolygonSymbolizer fill-opacity="1" /> | |
</Rule> | |
<Rule> | |
<MaxScaleDenominator>500000000</MaxScaleDenominator> | |
<MinScaleDenominator>200000000</MinScaleDenominator> | |
<Filter>([Z_ABBREV] = 6)</Filter> | |
<PolygonSymbolizer fill-opacity="0.2" /> | |
</Rule> | |
<Rule> | |
<Filter>([Z_ABBREV] = 6)</Filter> | |
<PolygonSymbolizer fill-opacity="1" /> | |
</Rule> | |
<Rule> | |
<PolygonSymbolizer fill-opacity="1" /> | |
</Rule> | |
</Style> | |
<Layer name="world" | |
srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over"> | |
<StyleName>world</StyleName> | |
<Datasource> | |
<Parameter name="file"><![CDATA[/Users/tmcw/src/carto/test/rendering/layers/world/931c441e-shape_demo.shp]]></Parameter> | |
<Parameter name="type"><![CDATA[shape]]></Parameter> | |
</Datasource> | |
</Layer> | |
</Map> |
Current candidate is https://github.com/mapbox/carto/blob/master/lib/carto/renderer.js#L178 either calling addRules incorrect or its implementation.
Definition.prototype.addRules just dumbly adds rules to a definition.
Line 63 of filterset.js is also part of the trap.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Research:
This only affects zoom filters in the 'three rules when there should be two' case.