Fixing high zoom levels, adding test. Addresses #48, needs confirmation
This commit is contained in:
parent
2a9f4d5523
commit
86e79b9b2c
@ -54,11 +54,11 @@ tree.Zoom.ranges = {
|
||||
16: 12500,
|
||||
17: 5000,
|
||||
18: 2500,
|
||||
19: 1000,
|
||||
20: 500,
|
||||
21: 250,
|
||||
22: 100,
|
||||
23: 50
|
||||
19: 1500,
|
||||
20: 750,
|
||||
21: 500,
|
||||
22: 250,
|
||||
23: 100
|
||||
};
|
||||
|
||||
// Only works for single range zooms. `[XXX....XXXXX.........]` is invalid.
|
||||
|
14
test/rendering/highzooms.mml
Normal file
14
test/rendering/highzooms.mml
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"srs": "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
|
||||
"Stylesheet": [
|
||||
"highzooms.mss"
|
||||
],
|
||||
"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 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over",
|
||||
"Datasource": {
|
||||
"file": "http://tilemill-data.s3.amazonaws.com/test_data/shape_demo.zip",
|
||||
"type": "shape"
|
||||
}
|
||||
}]
|
||||
}
|
9
test/rendering/highzooms.mss
Normal file
9
test/rendering/highzooms.mss
Normal file
@ -0,0 +1,9 @@
|
||||
#world {
|
||||
polygon-fill: #000;
|
||||
[zoom=22] { polygon-fill: #f00000; }
|
||||
[zoom=21] { polygon-fill: #0f0000; }
|
||||
[zoom=20] { polygon-fill: #00f000; }
|
||||
[zoom=19] { polygon-fill: #000f00; }
|
||||
[zoom=18] { polygon-fill: #0000f0; }
|
||||
[zoom=17] { polygon-fill: #00000f; }
|
||||
}
|
51
test/rendering/highzooms.result
Normal file
51
test/rendering/highzooms.result
Normal file
@ -0,0 +1,51 @@
|
||||
<?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 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
|
||||
|
||||
|
||||
<Style name="world" filter-mode="first">
|
||||
<Rule>
|
||||
<MaxScaleDenominator>5000</MaxScaleDenominator>
|
||||
<MinScaleDenominator>2500</MinScaleDenominator>
|
||||
<PolygonSymbolizer fill="#00000f" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MaxScaleDenominator>2500</MaxScaleDenominator>
|
||||
<MinScaleDenominator>1500</MinScaleDenominator>
|
||||
<PolygonSymbolizer fill="#0000f0" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MaxScaleDenominator>1500</MaxScaleDenominator>
|
||||
<MinScaleDenominator>750</MinScaleDenominator>
|
||||
<PolygonSymbolizer fill="#000f00" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MaxScaleDenominator>750</MaxScaleDenominator>
|
||||
<MinScaleDenominator>500</MinScaleDenominator>
|
||||
<PolygonSymbolizer fill="#00f000" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MaxScaleDenominator>500</MaxScaleDenominator>
|
||||
<MinScaleDenominator>250</MinScaleDenominator>
|
||||
<PolygonSymbolizer fill="#0f0000" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MaxScaleDenominator>250</MaxScaleDenominator>
|
||||
<PolygonSymbolizer fill="#f00000" />
|
||||
</Rule>
|
||||
<Rule>
|
||||
<MinScaleDenominator>5000</MinScaleDenominator>
|
||||
<PolygonSymbolizer fill="#000000" />
|
||||
</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 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
|
||||
<StyleName>world</StyleName>
|
||||
<Datasource>
|
||||
<Parameter name="file"><![CDATA[[absolute path]]]></Parameter>
|
||||
<Parameter name="type"><![CDATA[shape]]></Parameter>
|
||||
</Datasource>
|
||||
</Layer>
|
||||
|
||||
</Map>
|
Loading…
Reference in New Issue
Block a user